]> git.bitcoin.ninja Git - youtube-dl/commitdiff
[imgur] Recognize /r/ URLs (closes #11071)
authorYen Chi Hsuan <yan12125@gmail.com>
Sun, 30 Oct 2016 09:01:48 +0000 (17:01 +0800)
committerYen Chi Hsuan <yan12125@gmail.com>
Sun, 30 Oct 2016 09:02:03 +0000 (17:02 +0800)
ChangeLog
youtube_dl/extractor/imgur.py

index b2aafcf0217d80cbb7459c269e62daad4833bf91..b9f8d92dabfcb0a3561120fb39cdf9c01e2ce54b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,7 @@
 version <unreleased>
 
 Extractors
+* [imgur] Recognize /r/ URLs (#11071)
 * [openload] Fix extraction (#10408)
 * [adultswim] Fix extraction (#10979)
 * [hornbunny] Fix extraction (#10981)
index d23489dcff4464c1294d9c6f5dca30aa480ad3a8..67c24a51c861f4dd9a1da8f790d61469c8e2220c 100644 (file)
@@ -13,7 +13,7 @@ from ..utils import (
 
 
 class ImgurIE(InfoExtractor):
-    _VALID_URL = r'https?://(?:i\.)?imgur\.com/(?:(?:gallery|topic/[^/]+)/)?(?P<id>[a-zA-Z0-9]{6,})(?:[/?#&]+|\.[a-z]+)?$'
+    _VALID_URL = r'https?://(?:i\.)?imgur\.com/(?:(?:gallery|(?:topic|r)/[^/]+)/)?(?P<id>[a-zA-Z0-9]{6,})(?:[/?#&]+|\.[a-z]+)?$'
 
     _TESTS = [{
         'url': 'https://i.imgur.com/A61SaA1.gifv',
@@ -43,6 +43,9 @@ class ImgurIE(InfoExtractor):
     }, {
         'url': 'http://imgur.com/topic/Funny/N8rOudd',
         'only_matching': True,
+    }, {
+        'url': 'http://imgur.com/r/aww/VQcQPhM',
+        'only_matching': True,
     }]
 
     def _real_extract(self, url):