I'd like to
- find all titles in the link with '2021' in it
- get all links, titles and dates
I use:
all_links=[link.get_attribute('href') for link in driver.find_elements_by_xpath("//span[contains(text(),'2021'/preceding::a)]")]
titles = [title.text for title in driver.find_elements_by_xpath("//span[contains(text(),'2021') ]")]
dates = [date.text for date in driver.find_elements_by_xpath("//span[contains(text(),'2021')]/following::td/span")]
for link, title, date in zip(links, titles, dates):
...
ERROR:SyntaxError: Failed to execute 'evaluate' on 'Document': Type conversion failed while evaluating the expression. (Session info: chrome=88.0.4324.182)
link:http://www.szse.cn/disclosure/bond/notice/index.html
Many thanks!