Re: How do I read this download button?
ToddAndMargo via curl-users <[email protected]>
| Newsgroups | gmane.comp.web.curl.general |
|---|---|
| Message-ID | <[email protected]> |
On 7/24/23 13:32, Dan Fandrich via curl-users wrote:
> On Mon, Jul 24, 2023 at 01:25:28PM -0700, ToddAndMargo via curl-users wrote:
>> I am not sure what that gives me?
>>
>> $ curl --remote-name --remote-header-name https://download.toolslib.net/download/file/1/2697?s=44UKj76LIX5pK8CEccNxAvjeAKhb2tBo
>> -o -
>
> The -o there un-does the --remote-name and is giving an error message; drop
> it. --remote-header-name will use the file name provided by the server in an
> HTTP header. However, I don't see such a header in that URL, and that URL
> actually doesn't look like it points to any kind of download, so it's probably
> not the one you want.
>
>> Also, how do I get/find the
>>
>> ?s=44UKj76LIX5pK8CEccNxAvjeAKhb2tBo
>>
>> from
>>
>> https://toolslib.net/downloads/viewdownload/1-adwcleaner/files/2697/
>
> Use an HTML parser.
>
> Dan
What am I missing?
$ curl --remote-name --remote-header-name
https://download.toolslib.net/download/file/1/2697
% Total % Received % Xferd Average Speed Time Time Time
Current
Dload Upload Total Spent Left
Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:--
--:--:-- 0
$ curl --remote-name --remote-header-name
https://download.toolslib.net/download/file/1/2697?s=44UKj76LIX5pK8CEccNxAvjeAKhb2tBo
% Total % Received % Xferd Average Speed Time Time Time
Current
Dload Upload Total Spent Left
Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:--
--:--:-- 0
Looking at the
view-source:https://toolslib.net/downloads/viewdownload/1-adwcleaner/files/2697/
Ah Ha!! Figure it out!!!
Parsing through the source code, looking for `?s=` it changes for each
time you load the page. All I have to do is extract the `"s=...` and I
can download the file I want. (Well before the scramble expires.)
$ curl --header 'Host: download.toolslib.net'
'https://download.toolslib.net/download/file/1/2697?s=a2bhDHNQhWOv2NGyTwo0qV2qVOG0wrTj'
--output eraseme.exe
Thank you!
-T
--
Unsubscribe: https://lists.haxx.se/mailman/listinfo/curl-users
Etiquette: https://curl.se/mail/etiquette.html