From 5b1e873e54e82985d344d92185271bd729a9e295 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Thu, 29 Sep 2022 20:25:01 +0200 Subject: [PATCH] fix /live --- files/routes/static.py | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/files/routes/static.py b/files/routes/static.py index e5e2a6270..89b2ee908 100644 --- a/files/routes/static.py +++ b/files/routes/static.py @@ -454,16 +454,14 @@ if SITE == 'pcmemes.net': if '"videoDetails":{"videoId"' in text: y = live_regex.search(text) count = y.group(3) + + if count == '1 παρακολουθεί τώρα': + count = 1 + if 'περιμένει' in count: return process_streamer(id, '') - try: count = int(count.replace('.', '')) - except Exception as e: - print('count error', flush=True) - print(e, flush=True) - with open('files/assets/count.txt', 'w', encoding='utf-8') as f: - f.write(text) - return None + count = int(count.replace('.', '')) t = live_thumb_regex.search(text) @@ -509,14 +507,8 @@ if SITE == 'pcmemes.net': actual = '???' views = 0 - print(req.url, flush=True) try: thumb = t.group(2) - except Exception as e: - print('thumb error', flush=True) - print(e, flush=True) - with open('files/assets/thumb.txt', 'w', encoding='utf-8') as f: - f.write(text) - return None + except: return None name = t.group(1)