X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=youtube_dl%2Fextractor%2Fvideott.py;h=591024eaded0cdddbb0779bd942c0fa8f63d86a6;hb=55801fc76e2813de9a84eaa830d70ed73cb44463;hp=1f938838cc9247e9e80c8ce32911cb40954c1830;hpb=c1777d5cb3fb1ae48de79badfe5b8db9963999b4;p=youtube-dl diff --git a/youtube_dl/extractor/videott.py b/youtube_dl/extractor/videott.py index 1f938838c..591024ead 100644 --- a/youtube_dl/extractor/videott.py +++ b/youtube_dl/extractor/videott.py @@ -13,9 +13,9 @@ from ..utils import ( class VideoTtIE(InfoExtractor): ID_NAME = 'video.tt' IE_DESC = 'video.tt - Your True Tube' - _VALID_URL = r'http://(?:www\.)?video\.tt/(?:video/|watch_video\.php\?v=)(?P[\da-zA-Z]{9})' + _VALID_URL = r'http://(?:www\.)?video\.tt/(?:(?:video|embed)/|watch_video\.php\?v=)(?P[\da-zA-Z]{9})' - _TEST = { + _TESTS = [{ 'url': 'http://www.video.tt/watch_video.php?v=amd5YujV8', 'md5': 'b13aa9e2f267effb5d1094443dff65ba', 'info_dict': { @@ -26,7 +26,10 @@ class VideoTtIE(InfoExtractor): 'upload_date': '20130827', 'uploader': 'joseph313', } - } + }, { + 'url': 'http://video.tt/embed/amd5YujV8', + 'only_matching': True, + }] def _real_extract(self, url): mobj = re.match(self._VALID_URL, url) @@ -40,7 +43,7 @@ class VideoTtIE(InfoExtractor): formats = [ { - 'url': base64.b64decode(res['u']).decode('utf-8'), + 'url': base64.b64decode(res['u'].encode('utf-8')).decode('utf-8'), 'ext': 'flv', 'format_id': res['l'], } for res in settings['res'] if res['u']