mirror of
https://github.com/ytdl-org/youtube-dl
synced 2024-12-23 12:40:11 +09:00
[gfycat] Extract id correctly (fixes #6165)
This commit is contained in:
parent
7f220b2fac
commit
d7b4d5dd50
@ -10,8 +10,8 @@ from ..utils import (
|
|||||||
|
|
||||||
|
|
||||||
class GfycatIE(InfoExtractor):
|
class GfycatIE(InfoExtractor):
|
||||||
_VALID_URL = r'https?://(?:www\.)?gfycat\.com/(?P<id>[^/?#]+)'
|
_VALID_URL = r'https?://(?:www\.)?gfycat\.com/(?:ifr/)?(?P<id>[^/?#]+)'
|
||||||
_TEST = {
|
_TESTS = [{
|
||||||
'url': 'http://gfycat.com/DeadlyDecisiveGermanpinscher',
|
'url': 'http://gfycat.com/DeadlyDecisiveGermanpinscher',
|
||||||
'info_dict': {
|
'info_dict': {
|
||||||
'id': 'DeadlyDecisiveGermanpinscher',
|
'id': 'DeadlyDecisiveGermanpinscher',
|
||||||
@ -27,7 +27,23 @@ class GfycatIE(InfoExtractor):
|
|||||||
'categories': list,
|
'categories': list,
|
||||||
'age_limit': 0,
|
'age_limit': 0,
|
||||||
}
|
}
|
||||||
|
}, {
|
||||||
|
'url': 'http://gfycat.com/ifr/JauntyTimelyAmazontreeboa',
|
||||||
|
'info_dict': {
|
||||||
|
'id': 'JauntyTimelyAmazontreeboa',
|
||||||
|
'ext': 'mp4',
|
||||||
|
'title': 'JauntyTimelyAmazontreeboa',
|
||||||
|
'timestamp': 1411720126,
|
||||||
|
'upload_date': '20140926',
|
||||||
|
'uploader': 'anonymous',
|
||||||
|
'duration': 3.52,
|
||||||
|
'view_count': int,
|
||||||
|
'like_count': int,
|
||||||
|
'dislike_count': int,
|
||||||
|
'categories': list,
|
||||||
|
'age_limit': 0,
|
||||||
}
|
}
|
||||||
|
}]
|
||||||
|
|
||||||
def _real_extract(self, url):
|
def _real_extract(self, url):
|
||||||
video_id = self._match_id(url)
|
video_id = self._match_id(url)
|
||||||
|
Loading…
Reference in New Issue
Block a user