Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to locate the four elements using selenium in python

I am trying to post several parameters to this [url][1] and press 'submit' to download a csv file generated.

I think 5 steps are needed at least.

like image 732
questionhang Avatar asked Oct 17 '17 14:10

questionhang


1 Answers

Unfortunately, I don't think you're going to be able to do this via requests. As far as I can tell, there is no POST being made when you click "Submit". It appears as though all the data is being generated by JavaScript, which requests can't deal with.

You could try using something like Selenium to automate a browser (which can handle the JS) and then scrape data from there.

like image 119
SuperStew Avatar answered Oct 19 '22 10:10

SuperStew