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

[Redgifs] Some redgifs v3 links not working #5898

Closed
reasonabledoubt opened this issue Jul 28, 2024 · 2 comments · Fixed by #5899
Closed

[Redgifs] Some redgifs v3 links not working #5898

reasonabledoubt opened this issue Jul 28, 2024 · 2 comments · Fixed by #5899

Comments

@reasonabledoubt
Copy link
Contributor

(label nsfw)

Attempting to extract a v3-watch-type redgifs URL via reddit isn't working for me currently:

./gallery-dl-1.27.1.bin --verbose https://www.reddit.com/r/adorableporn/comments/1edg5t8/a_simple_nude_post_today/

[gallery-dl][debug] Version 1.27.1 - Executable (stable/linux)
[gallery-dl][debug] Python 3.10.12 - Linux-5.19.0-38-generic-x86_64-with-glibc2.35
[gallery-dl][debug] requests 2.31.0 - urllib3 2.2.2
[gallery-dl][debug] Configuration Files ['gallery-dl.conf']
[gallery-dl][debug] Starting DownloadJob for 'https://www.reddit.com/r/adorableporn/comments/1edg5t8/a_simple_nude_post_today/'
[reddit][debug] Using RedditSubmissionExtractor for 'https://www.reddit.com/r/adorableporn/comments/1edg5t8/a_simple_nude_post_today/'
[reddit][debug] Using custom API credentials (client-id *****************)
[urllib3.connectionpool][debug] Starting new HTTPS connection (1): oauth.reddit.com:443
[urllib3.connectionpool][debug] https://oauth.reddit.com:443 "GET /comments/1edg5t8/.json?limit=0&raw_json=1 HTTP/11" 200 3795
[reddit][debug] Using download archive './gallery-dl-archive-file.sqlite3'

Trying the redgifs URL directly:

./gallery-dl-1.27.1.bin --verbose https://v3.redgifs.com/watch/605025947780972895

[gallery-dl][debug] Version 1.27.1 - Executable (stable/linux)
[gallery-dl][debug] Python 3.10.12 - Linux-5.19.0-38-generic-x86_64-with-glibc2.35
[gallery-dl][debug] requests 2.31.0 - urllib3 2.2.2
[gallery-dl][debug] Configuration Files ['gallery-dl.conf']
[gallery-dl][debug] Starting DownloadJob for 'https://v3.redgifs.com/watch/605025947780972895'
[gallery-dl][error] Unsupported URL 'https://v3.redgifs.com/watch/605025947780972895'

From what I can tell from #3589 and looking at the extractor directly at

class RedgifsImageExtractor(RedgifsExtractor):
"""Extractor for individual gifs from redgifs.com"""
subcategory = "image"
pattern = (r"(?:https?://)?(?:"
r"(?:\w+\.)?redgifs\.com/(?:watch|ifr)|"
r"(?:\w+\.)?gfycat\.com(?:/gifs/detail|/\w+)?|"
r"(?:www\.)?gifdeliverynetwork\.com|"
r"i\.redgifs\.com/i)/([A-Za-z]+)")
example = "https://redgifs.com/watch/ID"
def gifs(self):
return (self.api.gif(self.key),)
the regex thinks it's not supported because it was shared with a URL containing only numbers as an ID and not its [A-Za-z] ID (humblegrippingmole) (which is what's shown in the "share" button on the actual page).

I believe this is a simple fix and have a pull request forthcoming.

@Hrxn
Copy link
Contributor

Hrxn commented Jul 28, 2024

That's weird, why is it not returning the actual URL (https://www.redgifs.com/watch/humblegrippingmole?from=embed)? Is it just this one reddit post, or is it some recent site change?

@reasonabledoubt
Copy link
Contributor Author

The v3 605025947780972895 URL was posted to reddit by the OP of that post, I imagine the URL had to have been given to them by the redgifs interface at some point. I just tried uploading a test video but I just got a normal [A-Za-Z] URL and couldn't find any option for an alternative numbers-only URL.

It might be some setting the user has? Most of their posts going back about 6 weeks are of the v3 [0-9] variety (and prior to that they're the [A-Za-z] variety).

Though looking through all v3 posts to reddit via (nsfw) https://www.reddit.com/domain/v3.redgifs.com/new/ I can see others posting with [0-9] URLs, but there's still plenty of [A-Za-z].

The api documentation still doesn't have anything about v3 https://api.redgifs.com/docs/index.html (same situation as back in February 2023 as noted in #3588 (comment))

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

Successfully merging a pull request may close this issue.

3 participants