[英]How to download excel file from a specific website by clicking a button and using Python?
有問題的鏈接是
目前,我手動單擊屏幕截圖中顯示的黃色標記按鈕。 如何改用 Python將文件下載到特定文件夾並重命名?
您可以使用 Selenium。 設置驅動程序后;
右鍵單擊按鈕,檢查。 復制完整的 xpath。
driver.get("https://www.de.vanguard/professionell/produktart/etf/aktien/9505/ftse-all-world-ucits-etf-usd-distributing#portfoliodaten")
dlbutton = driver.find_element_by_xpath("/html/body/europe-core-root/europe-core-global-nav/div/europe-core-product-detail-page-component/section[4]/europe-core-market-allocation-container/europe-core-market-allocation/div/div/div[1]/div[2]/europe-core-download-button/button/span")
dlbutton.click()
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.