从命令行下载需要单击“下载按钮”的文件

2024-09-29 20:23:20 发布

您现在位置:Python中文网/ 问答频道 /正文

我想从https://eoddata.com/download.aspx?e=FOREX自动下载文件。我在他们那里有一个帐户。通常的过程包括登录门户,然后选择如下所示的选项&;单击下载按钮下载文件

enter image description here

面临的挑战是在不同的日期重复此手动过程,这会变得很麻烦&;过了一会儿就开始征税了。我不介意工具的选择。它可以是卷发,wget或其他任何东西

请允许我请求帮助

代码-

curl -o output_here.txt "https://<username>:<password>@www.eoddata.com/data/filedownload.aspx?e=FOREX&sd=20210722&ed=20210722&d=4&k=gi2bpin4xa&o=d&ea=1&p=0"

输出-

cat output_here.txt

<html><head><title>Object moved</title></head><body>
<h2>Object moved to <a href="/data/filedownload.aspx?e=FOREX&amp;sd=20210722&amp;ed=20210722&amp;d=4&amp;k=gi2bpin4xa&amp;o=d&amp;ea=1&amp;p=0&amp;AspxAutoDetectCookieSupport=1">here</a>.</h2>
</body></html>

Tags: 文件httpstxtcomoutputdatahere过程

热门问题