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

Imgur redirector #137

Open
pxssy opened this issue Mar 27, 2017 · 1 comment
Open

Imgur redirector #137

pxssy opened this issue Mar 27, 2017 · 1 comment

Comments

@pxssy
Copy link

pxssy commented Mar 27, 2017

Say an imgur link, i.imgur.com/img_id.ext

At the moment there's a redirector that removes the current extension and reapphends the native extension the media came with. How it does this is magic to me, but i believe it looks into the img_id and extracts out the title and its native extension as it appears on imgur.

What i've found out is that img_ids are always 5 or 7 alphanumeric characters. However, it is possible to apphend an b/s/h/l at the end of img_ids to generate a thumbnail of sorts.

This is not normally problematic. However, a significant number of people do post thumbnails links accidentally. (compare http://i.imgur.com/tuKC1nz.jpg vs http://i.imgur.com/tuKC1nzh.jpg the difference is subtle but 1 cripples the redirector) To the redirector, this thumbnail img_id appears to be a 6 or 8 alphanumeric which does not exist on imgur.

This really messes up the redirector i believe, as the additional b/s/h/l misleads the redirector from being able to find the correct extension, and making it fail to download.

This should be an easy fix, since the only possible img_ids are 5 or 7, an img_id with 6 or 8 chars must necessarily be the thumbnail versions of the original photo, and need only replace away the b/s/h/l suffix.

@pxssy
Copy link
Author

pxssy commented Mar 27, 2017

Additionally, the downloader seems to insist on downloading .gif files as mp4. This wouldn't bother me usually but all of them fail. Checking the offending links, all of them are now appearing at .gifv.

Is it possible to also fix the redirector to apphend .gifv to .gif files instead of .mp4?

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

No branches or pull requests

1 participant