aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--youtube/watch.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/youtube/watch.py b/youtube/watch.py
index 6ff0735..ec161df 100644
--- a/youtube/watch.py
+++ b/youtube/watch.py
@@ -247,12 +247,16 @@ def extract_info(video_id, use_invidious, playlist_id=None, index=None):
data = {
'video_id': video_id,
'eurl': 'https://youtube.googleapis.com/v/' + video_id,
+ 'html5': '1',
+ # See https://github.com/ytdl-org/youtube-dl/issues/29333#issuecomment-864049544
+ 'c': 'TVHTML5',
+ 'cver': '6.20180913',
}
- url = 'https://www.youtube.com/get_video_info?html5=1&'
+ url = 'https://www.youtube.com/get_video_info?'
url += urllib.parse.urlencode(data)
try:
video_info_page = util.fetch_url(
- url, headers=watch_headers, debug_name='get_video_info',
+ url, headers=util.mobile_ua, debug_name='get_video_info',
report_text='Fetched get_video_info page').decode('utf-8')
except util.FetchError as e:
if e.code == '404':