I would like to scrape all the annual financial reports from 2016-03-01 to 2017-02-28 of the listed companies in Shanghai Stock Exchange.
http://www.sse.com.cn/disclosure/listedinfo/regular/
While the search is a hidden javascript, I am not sure how to input the date. Please help.
from selenium import webdriver
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support.ui import Select
from selenium.webdriver.common.action_chains import ActionChains
import bs4
from bs4 import BeautifulSoup
import urllib.request
url = "http://www.sse.com.cn/disclosure/listedinfo/regular/"
chrome_path = r"/chromedriver.exe"
driver = webdriver.Chrome(chrome_path)
driver.get(url)
start_date = "2016-03-01"
end_date = "2017-02-28"
start = driver.find_element_by_id("start_date")
end = driver.find_element_by_id("end_date")
search = driver.find_element_by_id("btnQuery")
actions = ActionChains(driver)
actions.send_keys_to_element(start, start_date) #can't send key
actions.send_keys_to_element(end, end_date) #can't send key
actions.click(search)
actions.perform()