I am trying to get href from the link, please find my codes:
url ='http://money.finance.sina.com.cn/bond/notice/sz149412.html'
link = driver.find_element_by_xpath("//div[@class='blk01'])//ul//li[3]//a[contains(text(),'发行信息']").get_attribute('href')
print(link)
error
invalid selector: Unable to locate an element with the xpath expression
SyntaxError: Failed to execute 'evaluate' on 'Document': The string '//div[@class='blk01'])//ul/li[3]//a[contains(text(),'发行信息']' is not a valid XPath expression.
Seems it is not a valid xpath, but I cannot figure out the error, any help will be appreciated!
Thanks