aboutsummaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorPřemysl Janouch <p.janouch@gmail.com>2015-06-22 19:29:11 +0200
committerPřemysl Janouch <p.janouch@gmail.com>2015-06-22 19:29:11 +0200
commitd2611d3f82b4cd017461dcdcb62f7ad12c593e3b (patch)
tree2f3ac89c33bb0b516f1f396bc814a7765f138c83 /plugins
parentd7dd296b617c9a51de426a65b815997929eab77c (diff)
downloadxK-d2611d3f82b4cd017461dcdcb62f7ad12c593e3b.tar.gz
xK-d2611d3f82b4cd017461dcdcb62f7ad12c593e3b.tar.xz
xK-d2611d3f82b4cd017461dcdcb62f7ad12c593e3b.zip
youtube: use list comprehensions
Diffstat (limited to 'plugins')
-rwxr-xr-xplugins/youtube8
1 files 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: