Ensure a valid channel/playlist id present when validating url in youtube task handler.
This commit is contained in:
parent
03cd3312cc
commit
d09761bd1c
1 changed files with 2 additions and 2 deletions
|
|
@ -129,10 +129,10 @@ class YoutubeHandler(BaseHandler):
|
|||
None if the URL is neither.
|
||||
|
||||
"""
|
||||
if m := YoutubeHandler.CHANNEL_REGEX.match(url):
|
||||
if (m := YoutubeHandler.CHANNEL_REGEX.match(url)) and m.group("id"):
|
||||
return {"type": "channel_id", "id": m.group("id")}
|
||||
|
||||
if m := YoutubeHandler.PLAYLIST_REGEX.match(url):
|
||||
if (m := YoutubeHandler.PLAYLIST_REGEX.match(url)) and m.group("id"):
|
||||
return {"type": "playlist_id", "id": m.group("id")}
|
||||
|
||||
return None
|
||||
|
|
|
|||
Loading…
Reference in a new issue