From cd26f583d6dd8eb3dab7a98210ba1f160241b408 Mon Sep 17 00:00:00 2001 From: girst Date: Sun, 23 Apr 2023 15:44:33 +0000 Subject: [PATCH] common/g_v_i: improve 18+ playablility cargo-cults some additional parameters. the following ones are sometimes included, but don't seem to have an effect: "user": { "lockedSafetyMode": False, }, "playbackContext": { "contentPlaybackContext": { "html5Preference": "HTML5_PREF_WANTS", }, }, https://github.com/yt-dlp/yt-dlp/pull/545 https://github.com/TeamNewPipe/NewPipeExtractor/pull/780 --- app/common/common.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/common/common.py b/app/common/common.py index 3087013..42a53a1 100644 --- a/app/common/common.py +++ b/app/common/common.py @@ -241,6 +241,8 @@ def get_video_info(video_id, *, metaOnly=False, _agegate_bypass=False): }, 'thirdParty': {'embedUrl': 'https://www.youtube.com/'} }, + "racyCheckOk": True, # seems to do nothing, cargo-culted + "contentCheckOk": True, # fix "This video may be inappropriate for some users." }, cookies=cookies, headers={"User-Agent": "com.google.android.youtube/17.31.35 (Linux; U; Android 11) gzip"}) if not r or r.status_code == 429: -- 2.39.3