From 8a85c2413cfd31bafe02cf2ddc2ca6538c907adf Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Sun, 25 Sep 2022 08:31:46 +0200 Subject: [PATCH] add consent --- files/routes/static.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/files/routes/static.py b/files/routes/static.py index 72f2b6eea..e1d15bb9d 100644 --- a/files/routes/static.py +++ b/files/routes/static.py @@ -547,9 +547,7 @@ if SITE == 'pcmemes.net': id = request.values.get('id').strip() if not id.startswith('UC'): - text = requests.get(f'https://www.youtube.com/c/{id}', timeout=5, proxies=proxies).text - with open('files/assets/t3.txt', 'w', encoding='utf-8') as f: - f.write(text) + text = requests.get(f'https://www.youtube.com/c/{id}', cookies={'CONSENT': 'YES+1'}, timeout=5, proxies=proxies).text try: id = id_regex.search(text).group(1) except: return {"error": "Invalid ID"}