testin on devrama

master
Aevann1 2022-09-25 05:36:11 +02:00
parent 8ce942dcc0
commit a83821ebdb
3 changed files with 5 additions and 5 deletions

View File

@ -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

View File

@ -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])

View File

@ -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)