mikf / gallery-dl

Command-line program to download image galleries and collections from several image hosting sites
GNU General Public License v2.0
12.07k stars 982 forks source link

Help me Understand this Code #3227

Open PrUp96 opened 2 years ago

PrUp96 commented 2 years ago

I know this isn't an "issue" per se but I didn't know where else to ask this.

I have been using the following code, that I found somewhere here, to download from Instagram.

gallery-dl --cookies="...\instagram.com_cookies.txt" -o browser=chrome --sleep-request 15-45 --sleep 2-10 https://instagram.com/...

It works fine but I want to undearstand what it all means. I have no knowledge of programming what-so-ever.

I know about the --cookies function but what does "-o browser=chrome" do? It is necessary to include it in the code?

Moreover, what does "--sleep-request 15-45" and "--sleep 2-10" mean? Is there a better code that can be written?

Anyways, thank you to the developer and anyone who helps.

rautamiekka commented 2 years ago

Execute gallery-dl --help to see the help text.

mikf commented 2 years ago

The browser option attempts to emulate a real browser's HTTP headers and TLS ciphers, but the ones used for chrome are very outdated. You are better off using a recent Chrome User-Agent with -o user-agent="..." or nothing at all in this regard.

afterdelight commented 2 years ago

what about firefox