aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/extractor/mtv.py
diff options
context:
space:
mode:
authorSergey M․ <dstftw@gmail.com>2015-09-26 19:45:43 +0600
committerSergey M․ <dstftw@gmail.com>2015-09-26 19:45:43 +0600
commitfc42bc6ec9ab4858ec6bf1c8fe348ec47126375a (patch)
tree68a6cee7b1d3a5a420fee4453a7ed1f1c27a9ccc /youtube_dl/extractor/mtv.py
parentfe6ad195ae734951c879be41036cadbcf84eb8a7 (diff)
[mtv] Look for sm4:video:embed (Closes #6936, closes #6970)
Diffstat (limited to 'youtube_dl/extractor/mtv.py')
-rw-r--r--youtube_dl/extractor/mtv.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/youtube_dl/extractor/mtv.py b/youtube_dl/extractor/mtv.py
index a597714e9..4020cc2a9 100644
--- a/youtube_dl/extractor/mtv.py
+++ b/youtube_dl/extractor/mtv.py
@@ -200,7 +200,13 @@ class MTVServicesInfoExtractor(InfoExtractor):
if mgid is None or ':' not in mgid:
mgid = self._search_regex(
[r'data-mgid="(.*?)"', r'swfobject.embedSWF\(".*?(mgid:.*?)"'],
- webpage, 'mgid')
+ webpage, 'mgid', default=None)
+
+ if not mgid:
+ sm4_embed = self._html_search_meta(
+ 'sm4:video:embed', webpage, 'sm4 embed', default='')
+ mgid = self._search_regex(
+ r'embed/(mgid:.+?)["\'&?/]', sm4_embed, 'mgid')
videos_info = self._get_videos_info(mgid)
return videos_info