Compare commits

...

2 Commits

1 changed files with 3 additions and 0 deletions

View File

@ -43,6 +43,9 @@ def bot():
f'https://www.youtube.com/results?search_query={search_term}')
video_ids = re.findall(r'watch\?v=([^"]{11})"', query.text)
LOGGER.info("%s: got %d videos (%d new)", search_term,
len(video_ids), len(set(video_ids) - seen_vids))
if query.status_code != 200 or not video_ids:
LOGGER.warning("YouTube search %s returned %d",
query.url, query.status_code)