首页 > 解决方案 > 如何使用 wget 下载网站为其生成 url 的文件?

问题描述

单击下载按钮后,网站会生成一个 zip 文件以供下载。我想使用 wget 下载它。我尝试取消下载并尝试复制下载链接,但它只是网站的一般 URL,而不是下载链接。我尝试打开开发人员工具并单击“复制 POST 数据”以获取

 csrfmiddlewaretoken=FPsq2lfGy******7file_B****001=on 

并单击复制为 cURL:

curl 'https://f********.eu/download/' -H 'Host: f****5-db.s***t.eu' -H 'User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/60.0' -H 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8' -H 'Accept-Language: en-GB,en;q=0.5' --compressed -H 'Referer: https://*******.s***t.eu/files/****/******' -H 'Content-Type: application/x-www-form-urlencoded' -H 'Cookie: csrftoken=FPs********qGy; sessionid=a4l4zaqtrtpvwts7pbadw9ny' -H 'Connection: keep-alive' -H 'Upgrade-Insecure-Requests: 1' --data ''

我尝试使用以前的答案,但无法理解如何下载此文件。请解释。

标签: firefoxcurldownloadwget

解决方案


推荐阅读