Jan-28-2019, 10:04 AM
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]](https://drive.google.com/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)'
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
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)'