Skip to content

Commit

Permalink
[imgur] Recognize /r/ URLs (closes ytdl-org#11071)
Browse files Browse the repository at this point in the history
  • Loading branch information
Yen Chi Hsuan committed Oct 30, 2016
1 parent 2a048f9 commit e1a0b3b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
version <unreleased>

Extractors
* [imgur] Recognize /r/ URLs (#11071)
* [openload] Fix extraction (#10408)
* [adultswim] Fix extraction (#10979)
* [hornbunny] Fix extraction (#10981)
Expand Down
5 changes: 4 additions & 1 deletion youtube_dl/extractor/imgur.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@


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',
Expand Down Expand Up @@ -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):
Expand Down

0 comments on commit e1a0b3b

Please sign in to comment.