From f6989c153a68c3ddf483d27b2578ee76dbce3460 Mon Sep 17 00:00:00 2001 From: girst Date: Sat, 8 Aug 2020 20:54:00 +0200 Subject: [PATCH] make version closer to youtube don't think it makes a difference compat-wise (invidious only has "2.") --- app/dangerous/lib.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/dangerous/lib.py b/app/dangerous/lib.py index c798b0d..a94773b 100644 --- a/app/dangerous/lib.py +++ b/app/dangerous/lib.py @@ -11,7 +11,7 @@ def fetch_searchresults(q=None, page=1, sp=None): 'sp': sp, }, headers={ 'x-youtube-client-name': '1', - 'x-youtube-client-version': f'2.{today}.0.0', # the version is parsed as a date, and if it's invalid (e.g. month>12 or even feb>=30), youtube throws an encrypted stacktrace :D (but any random date >= 20160323 as of 20200802 works (even year 3000) + 'x-youtube-client-version': f'2.{today}.01.01', # the version is parsed as a date, and if it's invalid (e.g. month>12 or even feb>=30), youtube throws an encrypted stacktrace :D (but any random date >= 20160323 as of 20200802 works (even year 3000) }) if not r.ok: return None @@ -32,7 +32,7 @@ def fetch_ajax(params): 'hl': 'en', }, headers={ 'x-youtube-client-name': '1', - 'x-youtube-client-version': f'2.{today}.0.0', # see fetch_searchresults() + 'x-youtube-client-version': f'2.{today}.01.01', # see fetch_searchresults() }) try: # TODO: cleanup -- 2.39.3