[英]Download file that requires clicking "download button" from command line
I am wanting to automate the download of file from https://eoddata.com/download.aspx?e=FOREX .我想自动从https://eoddata.com/download.aspx?e=FOREX下载文件。 I have an account with them.
我在他们那里有一个帐户。 The usual process involves logging in to the portal, then choosing the options as shown below & clicking the download button to download the file
通常的过程包括登录门户,然后选择如下所示的选项并单击下载按钮下载文件
The challenge is to repeat this manual process for different dates which gets cumbersome & taxing after a while.挑战在于为不同的日期重复此手动过程,这会在一段时间后变得麻烦和费力。 I don't mind the choice of tooling.
我不介意工具的选择。 It could be curl, wget or anything else.
它可以是 curl、wget 或其他任何东西。
Please could I request help with this.请问我可以请求帮助吗?
CODE -代码 -
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"
OUTPUT - OUTPUT -
cat output_here.txt猫输出_here.txt
<html><head><title>Object moved</title></head><body>
<h2>Object moved to <a href="/data/filedownload.aspx?e=FOREX&sd=20210722&ed=20210722&d=4&k=gi2bpin4xa&o=d&ea=1&p=0&AspxAutoDetectCookieSupport=1">here</a>.</h2>
</body></html>
I wrote a selenium program to achieve this.我写了一个 selenium 程序来实现这个。 Thanks to everyone for helping.
感谢大家的帮助。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.