|
|
@ -8,31 +8,39 @@ from .common import InfoExtractor
|
|
|
|
|
|
|
|
|
|
|
|
class GfycatIE(InfoExtractor):
|
|
|
|
class GfycatIE(InfoExtractor):
|
|
|
|
_VALID_URL = r'https?://(?:www\.)?gfycat\.com/(?P<id>[^/?#]+)'
|
|
|
|
_VALID_URL = r'https?://(?:www\.)?gfycat\.com/(?P<id>[^/?#]+)'
|
|
|
|
_TESTS = [{
|
|
|
|
_TESTS = [
|
|
|
|
'url': 'http://gfycat.com/DeadlyDecisiveGermanpinscher',
|
|
|
|
{
|
|
|
|
'info_dict': {
|
|
|
|
'url': 'http://gfycat.com/DeadlyDecisiveGermanpinscher',
|
|
|
|
'id': 'DeadlyDecisiveGermanpinscher',
|
|
|
|
'info_dict': {
|
|
|
|
'title': 'Ghost in the Shell',
|
|
|
|
'id': 'DeadlyDecisiveGermanpinscher',
|
|
|
|
'ext': 'mp4',
|
|
|
|
'title': 'Ghost in the Shell',
|
|
|
|
'upload_date': '20140913'
|
|
|
|
'ext': 'mp4',
|
|
|
|
}
|
|
|
|
'upload_date': '20140913'
|
|
|
|
},{
|
|
|
|
}
|
|
|
|
'url': 'http://gfycat.com/pleasinghilariouskusimanse',
|
|
|
|
},{
|
|
|
|
'info_dict': {
|
|
|
|
'url': 'http://gfycat.com/pleasinghilariouskusimanse',
|
|
|
|
'id': 'pleasinghilariouskusimanse',
|
|
|
|
'info_dict': {
|
|
|
|
'title': 'PleasingHilariousKusimanse',
|
|
|
|
'id': 'pleasinghilariouskusimanse',
|
|
|
|
'ext': 'webm',
|
|
|
|
'title': 'PleasingHilariousKusimanse',
|
|
|
|
'upload_date': '20150412'
|
|
|
|
'ext': 'webm',
|
|
|
|
}
|
|
|
|
'upload_date': '20150412'
|
|
|
|
},{
|
|
|
|
},
|
|
|
|
'url': 'http://gfycat.com/requiredunkemptbuzzard',
|
|
|
|
'params': {
|
|
|
|
'info_dict': {
|
|
|
|
'format': 'webm',
|
|
|
|
'id': 'requiredunkemptbuzzard',
|
|
|
|
},
|
|
|
|
'title': 'Headshot!',
|
|
|
|
},{
|
|
|
|
'ext': 'gif',
|
|
|
|
'url': 'http://gfycat.com/requiredunkemptbuzzard',
|
|
|
|
'upload_date': '20150130'
|
|
|
|
'info_dict': {
|
|
|
|
}
|
|
|
|
'id': 'requiredunkemptbuzzard',
|
|
|
|
}]
|
|
|
|
'title': 'Headshot!',
|
|
|
|
|
|
|
|
'ext': 'gif',
|
|
|
|
|
|
|
|
'upload_date': '20150129'
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
'params': {
|
|
|
|
|
|
|
|
'format': 'gif',
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
|
|
def _real_extract(self, url):
|
|
|
|
def _real_extract(self, url):
|
|
|
|
video_id = self._match_id(url)
|
|
|
|
video_id = self._match_id(url)
|
|
|
|