mirror of
https://github.com/l1ving/youtube-dl
synced 2020-11-18 19:53:54 -08:00
The parsing for the SWF url was wrong (the "//" are now escaped and the initial .*match needs to be 'ungreedy'), so the -W setting to rtmpdump was not set, causing the decryption of the video to be wrong.
Also only setting "-q" to rtmpdump if "-q" is sent to youtube-dl Finally, add "&has_verified=1" to the fetch of the HMTL page to allow fetching of age-restricted videos
This commit is contained in:
parent
5e596cac0a
commit
62ba86e8a1
8
youtube-dl
Executable file → Normal file
8
youtube-dl
Executable file → Normal file
@ -494,7 +494,7 @@ class FileDownloader(object):
|
||||
# Download using rtmpdump. rtmpdump returns exit code 2 when
|
||||
# the connection was interrumpted and resuming appears to be
|
||||
# possible. This is part of rtmpdump's normal usage, AFAIK.
|
||||
basic_args = ['rtmpdump', '-q'] + [[], ['-W', player_url]][player_url is not None] + ['-r', url, '-o', filename]
|
||||
basic_args = ['rtmpdump'] + [[], ['-q']][self.params.get('quiet', False)] + [[], ['-W', player_url]][player_url is not None] + ['-r', url, '-o', filename]
|
||||
retval = subprocess.call(basic_args + [[], ['-e', '-k', '1']][self.params.get('continuedl', False)])
|
||||
while retval == 2 or retval == 1:
|
||||
prevsize = os.path.getsize(filename)
|
||||
@ -839,9 +839,9 @@ class YoutubeIE(InfoExtractor):
|
||||
return
|
||||
|
||||
# Attempt to extract SWF player URL
|
||||
mobj = re.search(r'swfConfig.*"(http://.*?watch.*?-.*?\.swf)"', video_webpage)
|
||||
mobj = re.search(r'swfConfig.*?"(http:\\/\\/.*?watch.*?-.*?\.swf)"', video_webpage)
|
||||
if mobj is not None:
|
||||
player_url = mobj.group(1)
|
||||
player_url = re.sub(r'\\(.)', r'\1', mobj.group(1))
|
||||
else:
|
||||
player_url = None
|
||||
|
||||
@ -1027,7 +1027,7 @@ class MetacafeIE(InfoExtractor):
|
||||
# Check if video comes from YouTube
|
||||
mobj2 = re.match(r'^yt-(.*)$', video_id)
|
||||
if mobj2 is not None:
|
||||
self._youtube_ie.extract('http://www.youtube.com/watch?v=%s' % mobj2.group(1))
|
||||
self._youtube_ie.extract('http://www.youtube.com/watch?v=%s&has_verified=1' % mobj2.group(1))
|
||||
return
|
||||
|
||||
# At this point we have a new video
|
||||
|
Loading…
x
Reference in New Issue
Block a user