Test for colon in mgid
authorAdam Malcontenti-Wilson <adman.com@gmail.com>
Sun, 13 Jul 2014 11:15:18 +0000 (21:15 +1000)
committerAdam Malcontenti-Wilson <adman.com@gmail.com>
Sun, 13 Jul 2014 11:15:18 +0000 (21:15 +1000)
youtube_dl/extractor/mtv.py

index af9490cccf05a372134585b8ac8957bb26e1c985..228b42d2b940d8eadd0fa3d5e61d0836fd19b7b7 100644 (file)
@@ -158,6 +158,9 @@ class MTVServicesInfoExtractor(InfoExtractor):
             if mgid.endswith('.swf'):
                 mgid = mgid[:-4]
         except RegexNotFoundError:
+            mgid = None
+
+        if mgid is None or ':' not in mgid:
             mgid = self._search_regex(
                 [r'data-mgid="(.*?)"', r'swfobject.embedSWF\(".*?(mgid:.*?)"'],
                 webpage, u'mgid')