简体   繁体   English

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

[英]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&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>

I wrote a selenium program to achieve this.我写了一个 selenium 程序来实现这个。 Thanks to everyone for helping.感谢大家的帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 通过使用Python单击下载按钮来下载文件 - Download a file by clicking on download button using Python 无需单击按钮即可下载文件的脚本 - Script to download file without clicking a button Python 从单击按钮后提供文件的网站下载 NetCDF 文件 - Python Download NetCDF file from a website which provides the file after clicking a button 单击按钮时,如何让用户从s3存储桶下载文件? - How can I let a user download a file from an s3 bucket when clicking on a button? 如何通过单击按钮并使用 Python 从特定网站下载 excel 文件? - How to download excel file from a specific website by clicking a button and using Python? 单击提交按钮后,使用python下载文件 - Using python to download a file after clicking the submit button 通过使用 Python 单击网站按钮下载 xlsx 文件 - Download a xlsx file by clicking a website button using Python 如何使用 Python3 通过单击网页中的按钮来安排 pdf 的下载 - How to scheduling the download of pdf from clicking a button in webpage with Python3 从需要使用python进行身份验证的网站上下载文件 - download a file from a website which requires authetication using python 如何使用 Python 从需要登录信息的网站下载文件? - How to download file from website that requires login information using Python?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM