From a28a4664c2f00755102c0813e9b3a21e1f3c03bd Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Sun, 25 Sep 2022 08:30:49 +0200 Subject: [PATCH] huh? --- files/routes/static.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/files/routes/static.py b/files/routes/static.py index 8c003ab12..72f2b6eea 100644 --- a/files/routes/static.py +++ b/files/routes/static.py @@ -548,14 +548,16 @@ if SITE == 'pcmemes.net': 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) try: id = id_regex.search(text).group(1) - except: return render_template('live.html', v=v, live=live, offline=offline, error="Invalid ID") + except: return {"error": "Invalid ID"} live = cache.get('live') or [] offline = cache.get('offline') or [] if not id or len(id) != 24: - return render_template('live.html', v=v, live=live, offline=offline, error="Invalid ID") + return {"error": "Invalid ID"} existing = g.db.get(Streamer, id) if not existing: