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

[weibo] When downloading a GIF, an MP4 file was downloaded instead. #5183

Closed
vindia9 opened this issue Feb 9, 2024 · 5 comments
Closed

[weibo] When downloading a GIF, an MP4 file was downloaded instead. #5183

vindia9 opened this issue Feb 9, 2024 · 5 comments

Comments

@vindia9
Copy link

vindia9 commented Feb 9, 2024

Thanks to gallery-dl, I can save my favorite pictures conveniently and efficiently.

I encountered a strange problem when downloading pictures from a Weibo album.
When I download the album, all GIF files are saved as small-sized MP4 files.

I've looked through the documentation and searched in the issues, but still can't find how to solve this problem.
How should I configure it to download the correct GIF files?

This is the download command I used:
gallery-dl -o headers.Referer=https://weibo.com/ https://weibo.com/u/7776232700?tabtype=album

Thanks

@kattjevfel
Copy link
Contributor

Do you actually get a .gif file when downloading directly from the site? When I try it from here I do indeed get mp4's, so it appears the site encodes all gifs as mp4's just like twitter and many other social media sites.

@mikf
Copy link
Owner

mikf commented Feb 9, 2024

Disable videos (-o videos=0)
Not sure why I implemented it that way, though: 73f673e.

@vindia9
Copy link
Author

vindia9 commented Feb 10, 2024

Do you actually get a .gif file when downloading directly from the site? When I try it from here I do indeed get mp4's, so it appears the site encodes all gifs as mp4's just like twitter and many other social media sites.

I found that GIF images on Weibo are indeed displayed in MP4 format, and can only be opened in GIF format when you click "View Original Image".

@vindia9
Copy link
Author

vindia9 commented Feb 10, 2024

Disable videos (-o videos=0) Not sure why I implemented it that way, though: 73f673e.

Thank you. Running with -o videos=0 now correctly downloads the gif file.

This modification seems to be that when the image type is 'gif' and the video retrieval is allowed, the video link for 'gif' will be obtained. It might have been discovered at that time that Weibo outputs gif images in the form of videos.

@vindia9 vindia9 closed this as completed Feb 10, 2024
mikf added a commit that referenced this issue Feb 10, 2024
@mikf mikf changed the title When downloading a GIF, an MP4 file was downloaded instead. [weibo] When downloading a GIF, an MP4 file was downloaded instead. Feb 10, 2024
@mikf
Copy link
Owner

mikf commented Feb 10, 2024

Added a gifs option (c83d0a1).

By default, without -o videos=0, GIFs are now downloaded as such.
Set gifs to "video" to have them downloaded as MP4 like before.

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

3 participants