RetroFed Forum
Your home away from modern life.
[Linux/browser] Can I extract a session token/cookie to use with wget or curl?
Post Reply
AuthorMessage
printf("%s", name); piefed.blahaj.zone akunohana@piefed.blahaj.zone
Joined: 2026-03-30
Quote

A cloud provider's web GUI eats all my RAM when downloading big files. I would like to download the files using wget or curl instead, but I assume I'm going to need some cookie or token in the argument URL that authenticates the request?

Is there any browser add-on or other means to extract said information so that I can copy paste it into the terminal?

15   Original
Successful_Try543 feddit.org Successful_Try543@feddit.org
Joined: 2024-06-22
#2 · Quote Reply

Yes, but you need to install a browser addon first, that allows exporting the cookies as txt files.

https://scrapingant.com/blog/wget-cookies

4
MummifiedClient5000 feddit.dk MummifiedClient5000@feddit.dk
Joined: 2023-06-09
#3 · Quote Reply

If the token is sent in the header of the request (which is common) then Firefox and Chrome can export the exact request as a curl command from the dev console network tab.

5
hades feddit.uk hades@feddit.uk
Joined: 2025-06-04
#4 · Quote Reply

You can open developer tools, download one of the files, then right click the request in the Network tab and select “Copy as curl command”, this will generate a curl command with all the headers and cookies.

19
BehemothExplorer sh.itjust.works BehemothExplorer@sh.itjust.works
Joined: 2023-06-26
#5 · Quote Reply

I know almost nothing about this sort of thing, but I have managed to do what you're describing without an add-on. Go to where you go in the cloud to download. Open your browser console (Ctrl+Shift+C or F12) and go to the Networking tab. Filenames will appear in the Networking tab as you interact with the cloud through the browser. If you right-click on a Filename, a dialogue box for it will open. The first option is Copy Value, which will open a sub-menu that includes Copy as cURL. This option copies everything that your browser sent to the cloud (to get the file you right-clicked) to your clipboard as a cURL command, which you can then paste into a bash script.

This won't work for every cloud provider, but it does for some. Add-ons can be convenient, but there's something to be said for "popping the hood," so to speak. Good luck!

4
epyon22 sh.itjust.works epyon22@sh.itjust.works
Joined: 2023-06-10
#6 · Quote Reply

Depending on how they are downloading to your computer you may not have a single URL to download a file, which will increase the effort to do this from curl/wget. Given you are complaining about RAM usage they might have a custom multi-part downloader and assemble the file within the browser's logic. I've seen this on sites like MegaUpload before.

2
printf("%s", name); piefed.blahaj.zone akunohana@piefed.blahaj.zone
Joined: 2026-03-30
#7 · Quote Reply

Depending on how they are downloading to your computer you may not have a single URL to download a file, which will increase the effort to do this from curl/wget. Given you are complaining about RAM usage they might have a custom multi-part downloader and assemble the file within the browser's logic. I've seen this on sites like MegaUpload before.

Yeah, I feel like my bigger files are now trapped on their servers :(

1
Post Reply
Back to top