diff options
author | Jaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com> | 2013-07-14 14:29:15 +0200 |
---|---|---|
committer | Jaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com> | 2013-07-14 14:29:15 +0200 |
commit | ab2f744b906ad4a896746d1648505e8f5efa815a (patch) | |
tree | 3c069a25f2d2e9797e1275d91927611e88cece38 /youtube_dl/extractor/mtv.py | |
parent | 300fcad8a663fc0bebde541c00535b931ad1af67 (diff) |
GametrailersIE: make it a subclass of MTVIE to reuse most of the extraction process
Diffstat (limited to 'youtube_dl/extractor/mtv.py')
-rw-r--r-- | youtube_dl/extractor/mtv.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/youtube_dl/extractor/mtv.py b/youtube_dl/extractor/mtv.py index 45dbc007d..8f956571d 100644 --- a/youtube_dl/extractor/mtv.py +++ b/youtube_dl/extractor/mtv.py @@ -49,7 +49,10 @@ class MTVIE(InfoExtractor): if not m: raise ExtractorError(u'Cannot transform RTMP url') base = 'http://mtvnmobile.vo.llnwd.net/kip0/_pxn=1+_pxI0=Ripod-h264+_pxL0=undefined+_pxM0=+_pxK=18639+_pxE=mp4/44620/mtvnorigin/' - return base + m.group('finalid') + return base + m.group('finalid') + + def _get_thumbnail_url(self, uri, itemdoc): + return 'http://mtv.mtvnimages.com/uri/' + uri def _extract_video_url(self, metadataXml): if '/error_country_block.swf' in metadataXml: @@ -87,7 +90,7 @@ class MTVIE(InfoExtractor): description = None video_info.update({'title': itemdoc.find('title').text, 'id': video_id, - 'thumbnail': 'http://mtv.mtvnimages.com/uri/' + uri, + 'thumbnail': self._get_thumbnail_url(uri, itemdoc), 'description': description, }) return video_info |