Only try to regex match a youtube url if we actually have a search string
(youtube.py)
This commit is contained in:
parent
59094568e0
commit
e5a5241615
1 changed files with 4 additions and 3 deletions
|
@ -90,8 +90,9 @@ class Module(ModuleManager.BaseModule):
|
|||
if last_youtube:
|
||||
search = last_youtube.message
|
||||
|
||||
if search:
|
||||
url_match = re.search(REGEX_YOUTUBE, search)
|
||||
if search and url_match:
|
||||
if url_match:
|
||||
video_id = url_match.group(1)
|
||||
|
||||
if search or video_id:
|
||||
|
|
Loading…
Reference in a new issue