aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilipp Hagemeister <phihag@phihag.de>2014-01-20 02:44:08 +0100
committerPhilipp Hagemeister <phihag@phihag.de>2014-01-20 02:44:08 +0100
commit5016f3eac879455a08cf7df0282fe59af9f3facf (patch)
tree087b771702371c776ac7a74d69397937c3f5ce7b
parentefb1bb90a06d95f838e2854b6dd523749d8e8955 (diff)
[myspace] More robust mediatype check
-rw-r--r--youtube_dl/extractor/myspace.py4
1 files changed, 2 insertions, 2 deletions
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<id>\d+)'
+ _VALID_URL = r'https?://myspace\.com/([^/]+)/(?P<mediatype>video/[^/]+/|music/song/.*?)(?P<id>\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,