From d2611d3f82b4cd017461dcdcb62f7ad12c593e3b Mon Sep 17 00:00:00 2001 From: Přemysl Janouch Date: Mon, 22 Jun 2015 19:29:11 +0200 Subject: youtube: use list comprehensions --- plugins/youtube | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/youtube b/plugins/youtube index d9efb0e..5614860 100755 --- a/plugins/youtube +++ b/plugins/youtube @@ -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: -- cgit v1.2.3-70-g09d2