1
0
Fork 0
mirror of synced 2024-06-03 03:04:33 +12:00

Check if URL provided is None

This commit is contained in:
Phxntxm 2017-06-15 21:37:53 -05:00
parent df37b78718
commit e6efcf9042

View file

@ -31,7 +31,7 @@ class Picarto:
# Channel is the name we are checking against that
# This creates a list of all users that match this channel name (should only ever be 1)
# And returns True as long as it is more than 0
if not self.online_channels:
if not self.online_channels or channel is None:
return False
channel = re.search("(?<=picarto.tv/)(.*)", channel).group(1)
return channel.lower() in [stream['name'].lower() for stream in self.online_channels]