From 12bc3775d963039efaf4a36b0ea124a6b5e5ca8a Mon Sep 17 00:00:00 2001 From: dirkf Date: Sat, 14 Dec 2024 11:18:34 +0000 Subject: [PATCH] [YouTube] Always extract using MWEB API client * temporary fix-up for 403 on download * MWEB parameters from yt-dlp 2024-12-06 --- youtube_dl/extractor/youtube.py | 84 ++++++++++++++++++++++++++++++--- 1 file changed, 77 insertions(+), 7 deletions(-) diff --git a/youtube_dl/extractor/youtube.py b/youtube_dl/extractor/youtube.py index 7e0ba04c0..1f83acf7c 100644 --- a/youtube_dl/extractor/youtube.py +++ b/youtube_dl/extractor/youtube.py @@ -3,11 +3,13 @@ from __future__ import unicode_literals import collections +import hashlib import itertools import json import os.path import random import re +import time import traceback from .common import InfoExtractor, SearchInfoExtractor @@ -290,6 +292,33 @@ class YoutubeBaseInfoExtractor(InfoExtractor): _YT_INITIAL_PLAYER_RESPONSE_RE = r'ytInitialPlayerResponse\s*=\s*({.+?})\s*;' _YT_INITIAL_BOUNDARY_RE = r'(?:var\s+meta|