فهرست منبع

Test for colon in mgid

Adam Malcontenti-Wilson 11 سال پیش
والد
کامیت
b1298d8e06
1فایلهای تغییر یافته به همراه3 افزوده شده و 0 حذف شده
  1. 3 0
      youtube_dl/extractor/mtv.py

+ 3 - 0
youtube_dl/extractor/mtv.py

@@ -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')