aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl
diff options
context:
space:
mode:
authorTithen-Firion <Tithen-Firion@users.noreply.github.com>2014-11-30 19:06:23 +0100
committerJaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com>2014-12-01 00:10:11 +0100
commitf2b44a2513d788e0e6a7f54497a7ac0e4090c1ff (patch)
treed4bc38c35c26ce3496d724e3a1b536f3c4757592 /youtube_dl
parentc522adb1f0747c5b7f4c8c60e6edcc6f1809f718 (diff)
[myspace] Use player_url for faster download
It keeps reconnecting without it. Download time decreased from 7+ minutes to 25 seconds for me.
Diffstat (limited to 'youtube_dl')
-rw-r--r--youtube_dl/extractor/myspace.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/youtube_dl/extractor/myspace.py b/youtube_dl/extractor/myspace.py
index c3c1a27c3..24da36212 100644
--- a/youtube_dl/extractor/myspace.py
+++ b/youtube_dl/extractor/myspace.py
@@ -48,6 +48,8 @@ class MySpaceIE(InfoExtractor):
mobj = re.match(self._VALID_URL, url)
video_id = mobj.group('id')
webpage = self._download_webpage(url, video_id)
+ player_url = self._search_regex(
+ r'playerSwf":"([^"?]*)', webpage, 'player URL')
if mobj.group('mediatype').startswith('music/song'):
# songs don't store any useful info in the 'context' variable
@@ -79,6 +81,7 @@ class MySpaceIE(InfoExtractor):
info.update({
'url': rtmp_url,
'play_path': play_path,
+ 'player_url': player_url,
'ext': 'flv',
})
return info