From b1298d8e064e3c1d31bdfffe8a3b5cfed8b0b61d Mon Sep 17 00:00:00 2001 From: Adam Malcontenti-Wilson Date: Sun, 13 Jul 2014 21:15:18 +1000 Subject: [PATCH] Test for colon in mgid --- youtube_dl/extractor/mtv.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/youtube_dl/extractor/mtv.py b/youtube_dl/extractor/mtv.py index af9490ccc..228b42d2b 100644 --- a/youtube_dl/extractor/mtv.py +++ b/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') -- 2.22.2