Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[instagram] lots of webp downloads #6541

Closed
cheese1218 opened this issue Nov 27, 2024 · 9 comments
Closed

[instagram] lots of webp downloads #6541

cheese1218 opened this issue Nov 27, 2024 · 9 comments

Comments

@cheese1218
Copy link

So I just started using gallery-dl again to download from instagram after a couple years and I noticed that it's giving me tons of webp files as well - would anyone here have any insights at all to why this might be and if there is a solution to this? I'd rather get a png or jpg instead of a webp file if possible to clarify some sort of option for this.

@mikf
Copy link
Owner

mikf commented Nov 28, 2024

Could you provide an example post with .webp files?
I searched a bit and can't find any.

@cheese1218
Copy link
Author

cheese1218 commented Nov 28, 2024

also @mikf this is unrelated but i wanted to avoid making a new issue just for this but how would i get gallery-dl to use my custom yt-dlp config for instagram? i tried doing this but the output with this is that it just ends up using yt-dlp entirely and it ignores my instagram config so i get a file in my users folder which looks like this 3445461475109894922.mp4 instead of misssjuline 2024-08-29 3445461475109894922_67778197194_1.mp4

        {
			"filename": "{username} {date:%Y-%m-%d} {post_id}_{owner_id}_{num}.{extension}",
            "api": "rest",
            "cookies": null,
            "include": "stories",
            "sleep-request": [6.0, 12.0],
            "videos": yt-dlp/testers,
			"saved": {
                "directory": ["{category}", "Saved"],
                "highlights": {
                    "directory": ["Highlights", "{highlight_title}"],
                    "filename": "{date:%Y-%m-%d} {post_id}_{num}.{extension}"
                }
            }
        },```
        

mikf added a commit that referenced this issue Nov 28, 2024
Many '.webp' download URLs are actually '.jpg' files, which usually get
renamed by 'http.adjust-extensions'
@mikf
Copy link
Owner

mikf commented Nov 28, 2024

Fixed in 5cc9ca7
Not disabling downloader.http.adjust-extensions would have "fixed" this as well.


but how would i get gallery-dl to use my custom yt-dlp config for instagram?

Using yt-dlp to download IG videos is not supported.

and it ignores my instagram config

"videos": yt-dlp/testers, is invalid JSON, so it causes gallery-dl to ignore all your config settings.

@mikf mikf closed this as completed Nov 28, 2024
@cheese1218
Copy link
Author

Using yt-dlp to download IG videos is not supported.

Oh I see, is there any plans on supporting it in the future?

@mikf
Copy link
Owner

mikf commented Nov 29, 2024

No, not really. Handling posts with mixed images and videos would be rather complicated I think.

@cheese1218
Copy link
Author

@mikf the webp bug is still there btw if the posts you are downloading are saved inside your saved posts they will continue to download as those webp files, but if you download 1 post using it's specific url you get the jpg.

@cheese1218
Copy link
Author

let me know if you want me to post a verbose log for this or you could just save any of the links i sent you earlier into your saved posts and then try downloading https://www.instagram.com/user/saved/

@mikf
Copy link
Owner

mikf commented Dec 2, 2024

I've added your examples to my saved posts and they all have the correct .jpg filename extension:

$ gallery-dl --print extension https://www.instagram.com/user/saved/all-posts/
jpg
./instagram/90smoment/3489599198812897070_3489599191691029619.jpg
jpg
./instagram/90smoment/3489599198812897070_3489599191497913247.jpg
jpg
./instagram/90smoment/3489599198812897070_3489599191489578298.jpg

Given that these .webp files aren't actually WebP files but JPEGs with the wrong filename extension (which adjust-extensions would fix, by the way), you could use extension-map to have them renamed to jpg.

    "extension-map": {"webp": "jpg"}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants