我想下载F&;O Bhavcopy来自
"https://www.nseindia.com/all-reports-derivatives#cr_deriv_equity_archives"
在Python中使用selenium
F&;O Bhavcopy位于其中一个分区中。该分区中有下载链接
我尝试了以下代码:
WebDriverWait(driver,10).until(EC.element_to_be_clickable((By.XPATH,"//div[@class='card-body']/span[@class='reportDownloadIcon']/a[@class='pdf-download-link']"))).click()
或
driver.find_element_by_xpath("//div[@class='card-body']/span[@class='reportDownloadIcon']/a").click()
或
driver.find_element_by_css_selector("div.card-body span.reportDownloadIcon a.pdf-download-link").click()
对我来说什么都不管用。因为有很多div是由下载链接组成的。我想点击特定的下载链接
提前谢谢
使用
a[onclick*=cr_deriv_equity_archives]
css选择器下载,但首先必须在页面上选择日期:你可以点击F&;的下载按钮;O使用以下xpath复制Bhavcopy(csv):
如果你点击F&;O-Bhavcopy(fo.zip),然后您可以使用:
对答案的添加
使用JavaScriptExecutor单击按钮单击
相关问题 更多 >
编程相关推荐