diff --git a/files/classes/streamers.py b/files/classes/streamers.py index 575481785..a98ce13ad 100644 --- a/files/classes/streamers.py +++ b/files/classes/streamers.py @@ -1,6 +1,6 @@ from files.helpers.const import SITE -if SITE == 'pcmemes.net': +if SITE == 'pcmemes.net' or True: from sqlalchemy import * from files.__main__ import Base diff --git a/files/helpers/cron.py b/files/helpers/cron.py index d472540c6..b7f4265d4 100644 --- a/files/helpers/cron.py +++ b/files/helpers/cron.py @@ -31,7 +31,7 @@ def cron(every_5m, every_1h, every_1d, every_1mo): lottery.check_if_end_lottery_task() spin_roulette_wheel() offsitementions.offsite_mentions_task() - if SITE == 'pcmemes.net': + if SITE == 'pcmemes.net' or True: x = route_static.live_cached() cache.set('live', x[0]) cache.set('offline', x[1]) diff --git a/files/routes/static.py b/files/routes/static.py index d0a9c8a24..336eee254 100644 --- a/files/routes/static.py +++ b/files/routes/static.py @@ -436,7 +436,7 @@ def donate(v): return render_template(f'donate_{SITE_NAME}.html', v=v) -if SITE == 'pcmemes.net': +if SITE == 'pcmemes.net' or True: from files.classes.streamers import * live_regex = re.compile('playerOverlayVideoDetailsRenderer":\{"title":\{"simpleText":"(.*?)"\},"subtitle":\{"runs":\[\{"text":"(.*?)"\},\{"text":" • "\},\{"text":"(.*?)"\}', flags=re.A) @@ -451,7 +451,7 @@ if SITE == 'pcmemes.net': db.close() for x in streamers: url = f'https://www.youtube.com/channel/{x}/live' - req = requests.get(url, cookies={'CONSENT': 'YES+1'}, timeout=5, proxies=proxies) + req = requests.get(url, cookies={'CONSENT': 'YES+1'}, timeout=5) text = req.text if '"videoDetails":{"videoId"' in text: t = live_thumb_regex.search(text) @@ -499,7 +499,7 @@ if SITE == 'pcmemes.net': send_repeatable_notification(KIPPY_ID, f"@{v.username} has added a [new YouTube channel](https://www.youtube.com/channel/{streamer.id})") url = f'https://www.youtube.com/channel/{id}/live' - req = requests.get(url, cookies={'CONSENT': 'YES+1'}, timeout=5, proxies=proxies) + req = requests.get(url, cookies={'CONSENT': 'YES+1'}, timeout=5) text = req.text if '"videoDetails":{"videoId"' in text: t = live_thumb_regex.search(text)