-
|
Hi, I'm making an auto install script for my windows installer. So I wanted to download this file https://www.irfanview.info/files/iview473_x64.zip But that doesn't work with curl, it downloads a file which is just html saying to press a button So I looked in the .json in the extra bucket Line 4 in 05fbcce and they're using the same URL as me So I tried a variety of commands to try and do it like scoop does it But none of these worked And I looked into the scoop files core.ps1 and download.ps1 https://github.com/ScoopInstaller/Scoop/blob/b588a06e41d920d2123ec70aee682bae14935939/lib/core.ps1 and I can't find what they're doing different ? And it does work I will try and run tcpdump and see what is going on as I'm stumped, how does it even work ?? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
|
Please check your request headers. It's always caused by a missing or incorrect Referer/User-Agent header; many servers block requests that don't originate from their own domain or don't come from a real browser. curl -e https://www.irfanview.info/files -O https://www.irfanview.info/files/iview473_x64.zip |
Beta Was this translation helpful? Give feedback.
https://github.com/ScoopInstaller/Scoop/blob/b588a06e41d920d2123ec70aee682bae14935939/lib/download.ps1#L94-L96
Please check your request headers. It's always caused by a missing or incorrect Referer/User-Agent header; many servers block requests that don't originate from their own domain or don't come from a real browser.