forked from MarseyWorld/MarseyWorld
make it possible to add channels by name
parent
164b583e7c
commit
c79067f7f1
|
@ -544,6 +544,10 @@ if SITE == 'pcmemes.net':
|
|||
|
||||
id = request.values.get('id').strip()
|
||||
|
||||
if not id.startswith('UC'):
|
||||
req = requests.get(f'https://www.googleapis.com/youtube/v3/channels?key={YOUTUBE_KEY}&forUsername={id}&part=id', timeout=5, proxies=proxies).json()
|
||||
id = req['items']['id']
|
||||
|
||||
live = cache.get('live') or []
|
||||
offline = cache.get('offline') or []
|
||||
|
||||
|
|
Loading…
Reference in New Issue