mirror of
				https://github.com/yt-dlp/yt-dlp.git
				synced 2025-10-31 14:45:14 +00:00 
			
		
		
		
	| @@ -1,6 +1,8 @@ | ||||
| # coding: utf-8 | ||||
| from __future__ import unicode_literals | ||||
|  | ||||
| import re | ||||
|  | ||||
| from .common import InfoExtractor | ||||
| from ..utils import ( | ||||
|     int_or_none, | ||||
| @@ -11,7 +13,7 @@ from ..utils import ( | ||||
|  | ||||
|  | ||||
| class GfycatIE(InfoExtractor): | ||||
|     _VALID_URL = r'https?://(?:(?:www|giant|thumbs)\.)?gfycat\.com/(?:ru/|ifr/|gifs/detail/)?(?P<id>[^-/?#\.]+)' | ||||
|     _VALID_URL = r'(?i)https?://(?:(?:www|giant|thumbs)\.)?gfycat\.com/(?:ru/|ifr/|gifs/detail/)?(?P<id>[^-/?#\."\']+)' | ||||
|     _TESTS = [{ | ||||
|         'url': 'http://gfycat.com/DeadlyDecisiveGermanpinscher', | ||||
|         'info_dict': { | ||||
| @@ -78,8 +80,19 @@ class GfycatIE(InfoExtractor): | ||||
|     }, { | ||||
|         'url': 'https://giant.gfycat.com/acceptablehappygoluckyharborporpoise.mp4', | ||||
|         'only_matching': True | ||||
|     }, { | ||||
|         'url': 'http://gfycat.com/IFR/JauntyTimelyAmazontreeboa', | ||||
|         'only_matching': True | ||||
|     }] | ||||
|  | ||||
|     @staticmethod | ||||
|     def _extract_urls(webpage): | ||||
|         return [ | ||||
|             mobj.group('url') | ||||
|             for mobj in re.finditer( | ||||
|                 r'<(?:iframe|source)[^>]+\bsrc=["\'](?P<url>%s)' % GfycatIE._VALID_URL, | ||||
|                 webpage)] | ||||
|  | ||||
|     def _real_extract(self, url): | ||||
|         video_id = self._match_id(url) | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 coletdjnz
					coletdjnz