logo

youtube-dl

[mirror] Download/Watch videos from video hosters
commit: 12b0d4e0e1df6d6a8b9ce10b9a69013497adc2b0
parent 106c8c3edbc5b7e95cfba79ddc6252fad0adb859
Author: Meneth32 <meneth@hotmail.com>
Date:   Sun, 29 Apr 2018 16:59:40 +0200

[redditr] Add support for old.reddit.com URLs


Diffstat:

Myoutube_dl/extractor/reddit.py6+++++-
1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/youtube_dl/extractor/reddit.py b/youtube_dl/extractor/reddit.py @@ -47,7 +47,7 @@ class RedditIE(InfoExtractor): class RedditRIE(InfoExtractor): - _VALID_URL = r'(?P<url>https?://(?:www\.)?reddit\.com/r/[^/]+/comments/(?P<id>[^/?#&]+))' + _VALID_URL = r'(?P<url>https?://(?:(?:www|old)\.)?reddit\.com/r/[^/]+/comments/(?P<id>[^/?#&]+))' _TESTS = [{ 'url': 'https://www.reddit.com/r/videos/comments/6rrwyj/that_small_heart_attack/', 'info_dict': { @@ -75,6 +75,10 @@ class RedditRIE(InfoExtractor): 'url': 'https://www.reddit.com/r/MadeMeSmile/comments/6t7wi5/wait_for_it/', 'only_matching': True, }, { + # imgur @ old reddit + 'url': 'https://old.reddit.com/r/MadeMeSmile/comments/6t7wi5/wait_for_it/', + 'only_matching': True, + }, { # streamable 'url': 'https://www.reddit.com/r/videos/comments/6t7sg9/comedians_hilarious_joke_about_the_guam_flag/', 'only_matching': True,