From 5d3c7211bd4b23898112ab4a218564e7d2217122 Mon Sep 17 00:00:00 2001 From: Meneth32 Date: Thu, 26 Apr 2018 19:05:16 +0200 Subject: [PATCH 1/3] Add support for old.reddit.com URLs. --- youtube_dl/extractor/reddit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/youtube_dl/extractor/reddit.py b/youtube_dl/extractor/reddit.py index 53b1c967e..5d72698c4 100644 --- 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'(?Phttps?://(?:www\.)?reddit\.com/r/[^/]+/comments/(?P[^/?#&]+))' + _VALID_URL = r'(?Phttps?://(?:www\.|old\.)?reddit\.com/r/[^/]+/comments/(?P[^/?#&]+))' _TESTS = [{ 'url': 'https://www.reddit.com/r/videos/comments/6rrwyj/that_small_heart_attack/', 'info_dict': { From 8b479f256e54e431682c9469106ae00b550a69c4 Mon Sep 17 00:00:00 2001 From: Meneth32 Date: Thu, 26 Apr 2018 19:05:34 +0200 Subject: [PATCH 2/3] Added a test for old.reddit.com. --- youtube_dl/extractor/reddit.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/youtube_dl/extractor/reddit.py b/youtube_dl/extractor/reddit.py index 5d72698c4..505442332 100644 --- a/youtube_dl/extractor/reddit.py +++ b/youtube_dl/extractor/reddit.py @@ -74,6 +74,10 @@ class RedditRIE(InfoExtractor): # imgur '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/', From f582ee1bde351586a59eb63b0885d4964ea56d6e Mon Sep 17 00:00:00 2001 From: Sergey M Date: Sun, 29 Apr 2018 21:58:39 +0700 Subject: [PATCH 3/3] Update reddit.py --- youtube_dl/extractor/reddit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/youtube_dl/extractor/reddit.py b/youtube_dl/extractor/reddit.py index 505442332..8372925be 100644 --- 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'(?Phttps?://(?:www\.|old\.)?reddit\.com/r/[^/]+/comments/(?P[^/?#&]+))' + _VALID_URL = r'(?Phttps?://(?:(?:www|old)\.)?reddit\.com/r/[^/]+/comments/(?P[^/?#&]+))' _TESTS = [{ 'url': 'https://www.reddit.com/r/videos/comments/6rrwyj/that_small_heart_attack/', 'info_dict': {