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 downloads don't work when you use shortlinks #6665
Closed
9 of 11 tasks
Labels
good first issue
Good for new devs
patch-available
There is patch available that should fix this issue. Someone needs to make a PR with it
site-bug
Issue with a specific website
Comments
TimothyRichardGreen
added
site-bug
Issue with a specific website
triage
Untriaged issue
labels
Mar 28, 2023
since diff --git a/yt_dlp/extractor/reddit.py b/yt_dlp/extractor/reddit.py
index 9dba3eca8..4aa935ac2 100644
--- a/yt_dlp/extractor/reddit.py
+++ b/yt_dlp/extractor/reddit.py
@@ -14,7 +14,7 @@
class RedditIE(InfoExtractor):
- _VALID_URL = r'https?://(?P<subdomain>[^/]+\.)?reddit(?:media)?\.com/(?P<slug>(?:r|user)/[^/]+/comments/(?P<id>[^/?#&]+))'
+ _VALID_URL = r'https?://(?P<subdomain>[^/]+\.)?reddit(?:media)?\.com/(?P<slug>(?:(?:r|user)/[^/]+/)?comments/(?P<id>[^/?#&]+))'
_TESTS = [{
'url': 'https://www.reddit.com/r/videos/comments/6rrwyj/that_small_heart_attack/',
'info_dict': {
|
bashonly
added
good first issue
Good for new devs
patch-available
There is patch available that should fix this issue. Someone needs to make a PR with it
and removed
triage
Untriaged issue
labels
Mar 28, 2023
9 tasks
bashonly
added a commit
that referenced
this issue
Apr 16, 2023
aalsuwaidi
pushed a commit
to aalsuwaidi/yt-dlp
that referenced
this issue
Apr 21, 2024
Closes yt-dlp#6665, Closes yt-dlp#6753 Authored by: bashonly
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
good first issue
Good for new devs
patch-available
There is patch available that should fix this issue. Someone needs to make a PR with it
site-bug
Issue with a specific website
DO NOT REMOVE OR SKIP THE ISSUE TEMPLATE
Checklist
Region
Ireland
Provide a description that is worded well enough to be understood
Reddit's shortlinks (at redd.it) probably don't need special-casing, as they issue a normal HTTP 301 redirect response, but the page to which they redirect is not a page that yt-dlp knows how to cope with. In a browser, Reddit loads the page and then (I think) uses history.pushState() to update the URL to the normal one that yt-dlp expects.
Since the page initially loaded does contain the video, I imagine that it would be a relatively minor tweak to yt-dlp to support these URLs.
(Te example video provided is safe for work, by the way.)
Provide verbose output that clearly demonstrates the problem
yt-dlp -vU <your command line>
)'verbose': True
toYoutubeDL
params instead[debug] Command-line config
) and insert it belowComplete Verbose Output
The text was updated successfully, but these errors were encountered: