Python Forum

Full Version: Website Javascript
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,

I am new to python,

There is a website where two text box are given, where you need to enter the start date and end date, and on clicking download results will download the .csv file which then we use to upload in db.

The result in the website is through the java script and wanted to know how to make python to do this job on daily basis.

Kindly advice :)

Thanks in Advance
Have to analyse what happens when click the download button,eg with Chrome dev tools/FireFox dev tools.
Se what's is send as Post when push button and then use Requests to do the same.

The easier way in many cases with JavaScript is to use Selenium in combo with PhantomJS.
First fill in start date and end date and click button with Selenium,this is all visible as it load a browser. 
The to not load a browser use PhantomJS as a webdriver,or just close Selenium as soon as task is done if problem with PhantomJS.
Quote:The result in the website is through the java script and wanted to know how to make python to do this job on daily basis.
There are serval way to do this example with schedule in Python,or use the build in scheduler that all OS has.