From: Philipp Hagemeister Date: Mon, 20 Jan 2014 01:44:08 +0000 (+0100) Subject: [myspace] More robust mediatype check X-Git-Url: http://git.oshgnacknak.de/?a=commitdiff_plain;h=5016f3eac879455a08cf7df0282fe59af9f3facf;p=youtube-dl [myspace] More robust mediatype check --- diff --git a/youtube_dl/extractor/myspace.py b/youtube_dl/extractor/myspace.py index 462b8b957..c16939f54 100644 --- a/youtube_dl/extractor/myspace.py +++ b/youtube_dl/extractor/myspace.py @@ -10,7 +10,7 @@ from ..utils import ( class MySpaceIE(InfoExtractor): - _VALID_URL = r'https?://myspace\.com/([^/]+)/(?:video/[^/]+/|music/song/.*?)(?P\d+)' + _VALID_URL = r'https?://myspace\.com/([^/]+)/(?Pvideo/[^/]+/|music/song/.*?)(?P\d+)' _TESTS = [ { @@ -49,7 +49,7 @@ class MySpaceIE(InfoExtractor): video_id = mobj.group('id') webpage = self._download_webpage(url, video_id) - if 'music/song' in url: + if mobj.group('mediatype').startswith('music/song'): # songs don't store any useful info in the 'context' variable def search_data(name): return self._search_regex(r'data-%s="(.*?)"' % name, webpage,