Python Forum
How to chang start date for my request
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to chang start date for my request
#1
He every body, sorry about my englist not very good!
I have one question about to chang web start date.
This is chinese stock web, I want to catch the history data,
but I can`t chang the date for my request.
I had try to search google, but i according to do, it only clear the start date.

So, please please tell me, is python can`t to catch??

my code name is chanese, if want to run it, please put at E:\Information\Investment
web address : http://www.cnyes.com/twstock/ps_historyprice/1101.htm
code address: https://drive.google.com/open?id=1qK5JBY...1g6xbQtMFI

[Image: open?id=1S2DJRrn-Vdjc7mT3uv0c2I2yztPr74t6]

I had try some code,as follows but can`t chang web date

jsstart = "document.getElementById('ctl00_ContentPlaceHolder1_startText').removeAttribute('value')"
jsstart = "$('input [id=ctl00_ContentPlaceHolder1_startText]').removeAttr('readonly')"
jsstart = "$('input [id=ctl00_ContentPlaceHolder1_startText]').attr('readonly',false)"
jsstart = "$('input[id=ctl00_ContentPlaceHolder1_startText]').attr('value','classSelectTextStart')"

driver.find_element_by_id('ctl00_ContentPlaceHolder1_startText').send_keys(classSelectTextStart)
driver.find_element_by_id('ctl00_ContentPlaceHolder1_startText').removeAttr('value','')
driver.find_element_by_id('ctl00_ContentPlaceHolder1_startText').clear()
driver.find_element_by_id('ctl00_ContentPlaceHolder1_startText').send_keys(classSelectTextStart)
jsstart_value = 'document.getElementById("ctl00_ContentPlaceHolder1_startText").value=(classSelectTextStart)'
Reply
#2
Hi sirs!
maybe you dont konw chinese, so i change file name & dont input drive or stock name,

& file download, pleas put they at C:\stock, then can running
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Compare current date on calendar with date format file name Fioravanti 1 103 Mar-26-2024, 08:23 AM
Last Post: Pedroski55
  Python date format changes to date & time 1418 4 512 Jan-20-2024, 04:45 AM
Last Post: 1418
  Date format and past date check function Turtle 5 4,066 Oct-22-2021, 09:45 PM
Last Post: deanhystad
  how can I correct the Bad Request error on my curl request tomtom 8 4,964 Oct-03-2021, 06:32 AM
Last Post: tomtom
  How to add previous date infront of every unique customer id's invoice date ur_enegmatic 1 2,190 Feb-06-2021, 10:48 PM
Last Post: eddywinch82
  How to add date and years(integer) to get a date NG0824 4 2,802 Sep-03-2020, 02:25 PM
Last Post: NG0824
  ImportError: cannot import name 'Request' from 'request' abhishek81py 1 3,859 Jun-18-2020, 08:07 AM
Last Post: buran
  HELP: Combine records in a table with missing start or end date Techy_RN 1 1,605 Dec-16-2019, 08:51 PM
Last Post: Clunk_Head
  Substracting today's date from a date in column of dates to get an integer value firebird 1 2,099 Jul-04-2019, 06:54 PM
Last Post: Axel_Erfurt
  How to change existing date to current date in a filename? shankar455 1 2,271 Apr-17-2019, 01:53 PM
Last Post: snippsat

Forum Jump:

User Panel Messages

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