|
|
|
@ -40,9 +40,9 @@ async def get_video_list(session, channel_id):
|
|
|
|
|
if resp.status != 200:
|
|
|
|
|
logging.error('Invidious instance %s returned %s', i, str(resp.status))
|
|
|
|
|
continue
|
|
|
|
|
return list(map(lambda i: i['videoId'], await resp.json()))
|
|
|
|
|
return list(map(lambda i: i['videoId'], await resp.json()))[:15]
|
|
|
|
|
except BaseException:
|
|
|
|
|
logging.exception('Invidious instance %s raised exception', i)
|
|
|
|
|
async with session.get(f'https://www.youtube.com/feeds/videos.xml?channel_id={channel_id}&a={time.time()}', headers={'Cache-Control': 'no-store, max-age=0'}) as resp:
|
|
|
|
|
d = feedparser.parse(await resp.text())
|
|
|
|
|
return list(map(lambda i: i['yt_videoid'], d['entries']))
|
|
|
|
|
return list(map(lambda i: i['yt_videoid'], d['entries']))[:15]
|
|
|
|
|