1
1
mirror of https://github.com/ytdl-org/youtube-dl synced 2024-11-30 19:02:55 +01:00

[tinypic] Tweak VALID_URL regex (Closes #4754)

This commit is contained in:
Sergey M․ 2015-01-21 02:15:28 +06:00
parent 2df54b4ba8
commit 564bb5e964

View File

@ -9,17 +9,23 @@ from ..utils import ExtractorError
class TinyPicIE(InfoExtractor): class TinyPicIE(InfoExtractor):
IE_NAME = 'tinypic' IE_NAME = 'tinypic'
IE_DESC = 'tinypic.com videos' IE_DESC = 'tinypic.com videos'
_VALID_URL = r'http://tinypic\.com/player\.php\?v=(?P<id>[^&]+)&s=\d+' _VALID_URL = r'http://(?:.+?\.)?tinypic\.com/player\.php\?v=(?P<id>[^&]+)&s=\d+'
_TEST = { _TESTS = [
'url': 'http://tinypic.com/player.php?v=6xw7tc%3E&s=5#.UtqZmbRFCM8', {
'md5': '609b74432465364e72727ebc6203f044', 'url': 'http://tinypic.com/player.php?v=6xw7tc%3E&s=5#.UtqZmbRFCM8',
'info_dict': { 'md5': '609b74432465364e72727ebc6203f044',
'id': '6xw7tc', 'info_dict': {
'ext': 'flv', 'id': '6xw7tc',
'title': 'shadow phenomenon weird', 'ext': 'flv',
'title': 'shadow phenomenon weird',
},
},
{
'url': 'http://de.tinypic.com/player.php?v=dy90yh&s=8',
'only_matching': True,
} }
} ]
def _real_extract(self, url): def _real_extract(self, url):
mobj = re.match(self._VALID_URL, url) mobj = re.match(self._VALID_URL, url)