mikf / gallery-dl

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

[Instagram] I'm still concerned about my downloaded Instagram files, even after downloading the archive #3984

Open OriginOfAbsolution opened 1 year ago

OriginOfAbsolution commented 1 year ago

I have already activated "archive" in the main configuration. Does this mean that I can now modify or delete my downloaded Instagram files, or will gallery-dl end up redownloading certain files instead of only downloading newer ones?

This is my config :

"archive": "~/archive.sqlite3", "archive-pragma": ["journal_mode=WAL", "synchronous=NORMAL"], "instagram": { "cookies": ["brave"]

And yeah, gallery-dl will check every cookie in my browser. How can I tell it to only look for Instagram cookies ?

mikf commented 1 year ago

As long as a file is included in the archive database, you can delete/rename or do whatever with it and gallery-dl will still not redownload it.

And yeah, gallery-dl will check every cookie in my browser. How can I tell it to only look for Instagram cookies ?

At the moment not possible when using the --cookies-from-browser feature.

You can use a browser addon to export your cookies as cookies.txt file. Those usually support exporting for only the current domain.

rautamiekka commented 1 year ago

And yeah, gallery-dl will check every cookie in my browser. How can I tell it to only look for Instagram cookies ?

How do you suppose you can look for something specific if you don't check everything for that specific one ?

mikf commented 1 year ago

And yeah, gallery-dl will check every cookie in my browser. How can I tell it to only look for Instagram cookies ?

How do you suppose you can look for something specific if you don't check everything for that specific one ?

gallery-dl will try to decrypt all encrypted cookies, even though it would only need to decrypt Instagram ones, and that can take a lot of time.

OriginOfAbsolution commented 1 year ago

As long as a file is included in the archive database, you can delete/rename or do whatever with it and gallery-dl will still not redownload it.

Thanks for this confirmation

gallery-dl will try to decrypt all encrypted cookies, even though it would only need to decrypt Instagram ones, and that can take a lot of time.

That's what I see. A lot of warnings before gallery dl get my Instagram cookie. I see the one of general options : --cookies-from-browser BROWSER[+KEYRING][:PROFILE][::CONTAINER]. But I didn't know where to get the value of one of them (keyring, profile, container). And I tried to read the extractor.*.cookies option for the config. I still don't know how.

It's not really a problem for now. I didn't wait that long. But, I just wanna get rid of all that lines : [cookies][warning] failed to decrypt cookie (AES-GCM) because MAC check failed. Possibly the key is wrong?

Every time I try to download Instagram files again. So, I assume I need to tell gallery-dl to only looking my Instagram cookies

GotoConsol commented 1 year ago

As long as a file is included in the archive database, you can delete/rename or do whatever with it and gallery-dl will still not redownload it.

Does this also aplly to modifying file naming rules in config file?

taskhawk commented 1 year ago

Yes, you can change the filename format without issues too, just the name of the files from then on will be different but media already downloaded using an archive won't be downloaded again.

The archive uses a unique name internally to identify each media file for each extractor, you would only have issues if you change the options archive-format and archive-prefix in your config.

taskhawk commented 1 year ago

But I didn't know where to get the value of one of them (keyring, profile, container).

In Firefox you can find your profile directory by typing about:support or about:profiles in the address bar. It seems containers is just a Firefox thing, so if you use containers there you probably already know their name.

In Chrome you can find it by typing chrome://version in the address bar.

Other browsers you can Google "browser system profile folder".

Something that's no clear to me from the documentation though is if the profile name refers to the user edited profile name, or the profile directory name.