forked from rDrama/rDrama
testing on devrama
parent
18a5bc6108
commit
8ce942dcc0
|
@ -452,17 +452,17 @@ if SITE == 'pcmemes.net':
|
||||||
for x in streamers:
|
for x in streamers:
|
||||||
url = f'https://www.youtube.com/channel/{x}/live'
|
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, proxies=proxies)
|
||||||
txt = req.text
|
text = req.text
|
||||||
if '"videoDetails":{"videoId"' in txt:
|
if '"videoDetails":{"videoId"' in text:
|
||||||
t = live_thumb_regex.search(txt)
|
t = live_thumb_regex.search(text)
|
||||||
y = live_regex.search(txt)
|
y = live_regex.search(text)
|
||||||
try:
|
try:
|
||||||
count = int(y.group(3))
|
count = int(y.group(3))
|
||||||
live.append((x, req.url, t.group(1), y.group(2), y.group(1), count))
|
live.append((x, req.url, t.group(1), y.group(2), y.group(1), count))
|
||||||
except:
|
except:
|
||||||
print(x)
|
print(x)
|
||||||
else:
|
else:
|
||||||
y = offline_regex.search(txt)
|
y = offline_regex.search(text)
|
||||||
try: offline.append((x, req.url.rstrip('/live'), y.group(2), y.group(1)))
|
try: offline.append((x, req.url.rstrip('/live'), y.group(2), y.group(1)))
|
||||||
except: print(x)
|
except: print(x)
|
||||||
|
|
||||||
|
@ -500,10 +500,10 @@ if SITE == 'pcmemes.net':
|
||||||
|
|
||||||
url = f'https://www.youtube.com/channel/{id}/live'
|
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, proxies=proxies)
|
||||||
txt = req.text
|
text = req.text
|
||||||
if '"videoDetails":{"videoId"' in txt:
|
if '"videoDetails":{"videoId"' in text:
|
||||||
t = live_thumb_regex.search(txt)
|
t = live_thumb_regex.search(text)
|
||||||
y = live_regex.search(txt)
|
y = live_regex.search(text)
|
||||||
try:
|
try:
|
||||||
count = int(y.group(3))
|
count = int(y.group(3))
|
||||||
live.append((id, req.url, t.group(1), y.group(2), y.group(1), count))
|
live.append((id, req.url, t.group(1), y.group(2), y.group(1), count))
|
||||||
|
@ -511,7 +511,10 @@ if SITE == 'pcmemes.net':
|
||||||
except:
|
except:
|
||||||
print(id, flush=True)
|
print(id, flush=True)
|
||||||
else:
|
else:
|
||||||
y = offline_regex.search(txt)
|
with open("files/assets/txt8.txt", "w", encoding='utf_8') as f:
|
||||||
|
f.write(text)
|
||||||
|
make_response(send_from_directory('assets', 'txt8.txt'))
|
||||||
|
y = offline_regex.search(text)
|
||||||
try:
|
try:
|
||||||
offline.append((id, req.url.rstrip('/live'), y.group(2), y.group(1)))
|
offline.append((id, req.url.rstrip('/live'), y.group(2), y.group(1)))
|
||||||
cache.set('offline', offline)
|
cache.set('offline', offline)
|
||||||
|
|
Loading…
Reference in New Issue