簡體   English   中英

如何通過單擊按鈕並使用 Python 從特定網站下載 excel 文件?

[英]How to download excel file from a specific website by clicking a button and using Python?

有問題的鏈接是

https://www.de.vanguard/professionell/produktart/etf/aktien/9505/ftse-all-world-ucits-etf-usd-distributing#portfoliodaten

目前,我手動單擊屏幕截圖中顯示的黃色標記按鈕。 如何改用 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.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM