[youtube] Simplify code for getting the dash manifest url
authorJaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com>
Sun, 30 Nov 2014 20:07:50 +0000 (21:07 +0100)
committerJaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com>
Sun, 30 Nov 2014 20:07:50 +0000 (21:07 +0100)
video_info contains now the 'ytplayer.config.args' dictionary

youtube_dl/extractor/youtube.py

index 6d48761c6559d8125c9008ca53ff5601341640db..6268b012f8fb1d80a92ebdf06cf8ccb702e4e3ee 100644 (file)
@@ -933,10 +933,7 @@ class YoutubeIE(YoutubeBaseInfoExtractor, SubtitlesInfoExtractor):
                 # However, in the case of an age restriction there won't be any embedded dashmpd in the video_webpage.
                 # Luckily, it seems, this case uses some kind of default signature (len == 86), so the
                 # combination of get_video_info and the _static_decrypt_signature() decryption fallback will work here.
-                if age_gate:
-                    dash_manifest_url = video_info.get('dashmpd')[0]
-                else:
-                    dash_manifest_url = ytplayer_config['args']['dashmpd']
+                dash_manifest_url = video_info.get('dashmpd')[0]
 
                 def decrypt_sig(mobj):
                     s = mobj.group(1)