projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
efb1bb9
)
[myspace] More robust mediatype check
author
Philipp Hagemeister
<phihag@phihag.de>
Mon, 20 Jan 2014 01:44:08 +0000
(
02:44
+0100)
committer
Philipp Hagemeister
<phihag@phihag.de>
Mon, 20 Jan 2014 01:44:08 +0000
(
02:44
+0100)
youtube_dl/extractor/myspace.py
patch
|
blob
|
history
diff --git
a/youtube_dl/extractor/myspace.py
b/youtube_dl/extractor/myspace.py
index 462b8b957a9e33bd78121ab102bf1425edbbd716..c16939f5437cf55b6d3e51e9d51ab45d1d12392f 100644
(file)
--- a/
youtube_dl/extractor/myspace.py
+++ b/
youtube_dl/extractor/myspace.py
@@
-10,7
+10,7
@@
from ..utils import (
class MySpaceIE(InfoExtractor):
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 = [
{
_TESTS = [
{
@@
-49,7
+49,7
@@
class MySpaceIE(InfoExtractor):
video_id = mobj.group('id')
webpage = self._download_webpage(url, video_id)
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,
# songs don't store any useful info in the 'context' variable
def search_data(name):
return self._search_regex(r'data-%s="(.*?)"' % name, webpage,