Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Website Javascript
#1
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
Reply
#2
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.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Scrapping javascript website with Selenium where pages randomly fail to load JuanJuan 14 7,189 Dec-27-2019, 12:32 PM
Last Post: JuanJuan

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020