remotes/1693176582716663532/tmp_refs/heads/watchparty
Aevann1 2022-09-25 05:43:57 +02:00
parent 9ebea2c6e9
commit ea7803ef44
1 changed files with 3 additions and 4 deletions

View File

@ -451,7 +451,7 @@ if SITE == 'pcmemes.net' or True:
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)
req = requests.get(url, cookies={'CONSENT': 'YES+1'}, timeout=5, proxies=proxies)
text = req.text
if '"videoDetails":{"videoId"' in text:
t = live_thumb_regex.search(text)
@ -499,7 +499,7 @@ if SITE == 'pcmemes.net' or True:
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)
req = requests.get(url, cookies={'CONSENT': 'YES+1'}, timeout=5, proxies=proxies)
text = req.text
if '"videoDetails":{"videoId"' in text:
t = live_thumb_regex.search(text)
@ -511,9 +511,8 @@ if SITE == 'pcmemes.net' or True:
except:
print(id, flush=True)
else:
with open("files/assets/txt8.txt", "w", encoding='utf_8') as f:
with open("files/assets/txt9.txt", "w", encoding='utf_8') as f:
f.write(text)
return make_response(send_from_directory('assets', 'txt8.txt'))
y = offline_regex.search(text)
try:
offline.append((id, req.url.rstrip('/live'), y.group(2), y.group(1)))