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

[Reddit] Original GIF images from dead Lensdump links available at a different location in the preview metadata #5315

Closed
taskhawk opened this issue Mar 10, 2024 · 4 comments

Comments

@taskhawk
Copy link

Found out that for Reddit posts linking to dead Lensdump GIF files the original GIF is still available for recovery in the preview at a slightly different location.

The current code downloads the fallback from here but this ends up being a still image:
preview['images'][N]['source']['url']

The GIF file can be found at:
preview['images'][N]['variants']['gif']['source']['url']

There's also a MP4 variant available:
preview['images'][N]['variants']['mp4']['source']['url']

Examples (NSFW):
https://new.reddit.com/r/NewYorkNine/comments/13qok1t/
https://new.reddit.com/r/NewYorkNine/comments/174qdbn/
https://new.reddit.com/r/NewYorkNine/comments/17ljnx1/
https://new.reddit.com/r/NewYorkNine/comments/14az0wx/

@mikf
Copy link
Owner

mikf commented Mar 11, 2024

Which variant should be prioritized here? I personally lean towards gif since they are closer to the original file, I'd think, but mp4s are significantly smaller.

@taskhawk
Copy link
Author

gif since they are actually the original file and what would have been downloaded if the file still existed on Lensdump (I think they don't serve mp4 variants, right?).

NSFW:

https://new.reddit.com/r/NewYorkNine/comments/13qok1t/

gallery-dl -K "https://new.reddit.com/r/NewYorkNine/comments/13qok1t/"
...
url
  https://i3.lensdump.com/i/kw8bix.gif
...

https://web.archive.org/web/20230524201956/https://i3.lensdump.com/i/kw8bix.gif

Same file size as the Reddit preview gif.

Don't know if this would be worth an option to choose preview format.

@taskhawk
Copy link
Author

Related, what's your opinion on supporting Archive.org files for dead links? I saw it mentioned on this issue: #4322

Taking as example one of my previous issues (#5296):

NSFW:
https://www.reddit.com/r/NewYorkNine/comments/11pgu91/

gallery-dl -K "https://www.reddit.com/r/NewYorkNine/comments/11pgu91/"
...
preview['reddit_video_preview']['fallback_url']
  https://v.redd.it/qnz7y43g40bb1/DASH_1080.mp4
...
url
  https://i.imgur.com/d3xDLw9.gifv
...

https://web.archive.org/web/20230508182847/https://i.imgur.com/d3xDLw9.gifv

The highest quality preview Reddit offers is a 9.6 MiB video with a resolution of 608x1080 px, while the Archive.org copy is a 20.8 MiB video with a resolution of 960x1706 px.

@mikf
Copy link
Owner

mikf commented Mar 12, 2024

Related, what's your opinion on supporting Archive.org files for dead links?

Eventually, but not with the current code base. There's just too much duct tape holding everything somewhat together to be adding a bigger feature like this.

@mikf mikf closed this as completed Mar 12, 2024
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