youtube: use list comprehensions
This commit is contained in:
parent
d7dd296b61
commit
d2611d3f82
|
@ -35,14 +35,14 @@ class Plugin:
|
|||
print ('ZYKLONB print :%s' % what)
|
||||
|
||||
class YouTube (Plugin):
|
||||
re_videos = list (map (lambda x: re.compile (x), [
|
||||
re_videos = [re.compile (x) for x in [
|
||||
r'youtube\.[a-z]+/[^ ]*[&?]v=([-\w]+)',
|
||||
r'youtube\.[a-z]+/v/([-\w]+)',
|
||||
r'youtu\.be/([-\w]+)'
|
||||
]))
|
||||
re_playlists = list (map (lambda x: re.compile (x), [
|
||||
]]
|
||||
re_playlists = [re.compile (x) for x in [
|
||||
r'youtube\.[a-z]+/playlist[&?][^ ]*(?<=&|\?)list=([-\w]+)',
|
||||
]))
|
||||
]]
|
||||
|
||||
def print_info (self, channel, url, cb):
|
||||
try:
|
||||
|
|
Loading…
Reference in New Issue