From ffcea86a015d2c5800d0ffc34077d27a08004271 Mon Sep 17 00:00:00 2001 From: girst Date: Thu, 17 Jun 2021 14:22:08 +0200 Subject: [PATCH] Revert "Revert "fix missing metadata"" This reverts commit 2115aa02e37b1d966ee33a618bee2b64b884c111. --- app/common/common.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/common/common.py b/app/common/common.py index a68e123..99ee331 100644 --- a/app/common/common.py +++ b/app/common/common.py @@ -211,10 +211,11 @@ def get_video_info(video_id, sts=0, algo=""): c = conn.cursor() c.execute("SELECT * FROM captcha_cookies") cookies = dict(c.fetchall()) - for el in ['WEB_EMBEDDED_PLAYER', 'WEB']: # sometimes, only one or the other works + for el in ['WEB', 'WEB_EMBEDDED_PLAYER']: # sometimes, only one or the other works today = datetime.now(timezone.utc).strftime("%Y%m%d") # XXX: anticaptcha hasn't been adapted # XXX: this is not cached any more! + # XXX: age-gated now broken: HtVdAasjOgU (embed ok), XgnwCQzjau8 (no embed) r = requests.post("https://www.youtube-nocookie.com/youtubei/v1/player?key=AIzaSyAO_FJ2SlqU8Q4STEHLGCilw_Y9_11qcW8", json={ 'videoId': video_id, 'context': { -- 2.39.3