Skip to content

A feature-rich command-line audio/video downloader

Fix the extraction of full-episodes urls from southpark.com (fixes #2278)

Jaime Marquínez Ferrándizb9381e43c2ee
diff --git a/youtube_dl/extractor/mtv.py b/youtube_dl/extractor/mtv.py
index f6f31bfdc5..4521451ac9 100644
--- a/youtube_dl/extractor/mtv.py
+++ b/youtube_dl/extractor/mtv.py
@@ -119,7 +119,9 @@ class MTVServicesInfoExtractor(InfoExtractor):
if mgid.endswith('.swf'):
mgid = mgid[:-4]
except RegexNotFoundError:
- mgid = self._search_regex(r'data-mgid="(.*?)"', webpage, u'mgid')
+ mgid = self._search_regex(
+ [r'data-mgid="(.*?)"', r'swfobject.embedSWF\(".*?(mgid:.*?)"'],
+ webpage, u'mgid')
return self._get_videos_info(mgid)