]> jfr.im git - yt-dlp.git/commitdiff
[youtube] Add `html5=1` param to `get_video_info` page requests (#329)
authorcoletdjnz <redacted>
Thu, 20 May 2021 10:12:53 +0000 (10:12 +0000)
committerpukkandan <redacted>
Thu, 20 May 2021 10:26:57 +0000 (15:56 +0530)
Workaround for #319, https://github.com/ytdl-org/youtube-dl/issues/29086
Authored by: colethedj

yt_dlp/extractor/youtube.py

index 3f021c281e876c7c5601dced21ba08213ba9620a..48b48952310d8a0854a9b4b126d84b83fe811892 100644 (file)
@@ -1903,7 +1903,8 @@ def get_text(x):
                         'el': 'detailpage',
                         'c': 'WEB_REMIX',
                         'cver': '0.1',
-                        'cplayer': 'UNIPLAYER'
+                        'cplayer': 'UNIPLAYER',
+                        'html5': '1',
                     }, fatal=False)),
                 lambda x: x['player_response'][0],
                 compat_str) or '{}', video_id)
@@ -1929,6 +1930,7 @@ def get_text(x):
                     'unable to download video info webpage', query={
                         'video_id': video_id,
                         'eurl': 'https://youtube.googleapis.com/v/' + video_id,
+                        'html5': '1',
                     }, fatal=False)),
                 lambda x: x['player_response'][0],
                 compat_str) or '{}', video_id)