From 93ac6c8af98ca833cd2041bbf52616c10451f803 Mon Sep 17 00:00:00 2001 From: Fabio Manganiello Date: Sat, 4 Jul 2020 00:18:45 +0200 Subject: [PATCH] Regex format fix --- platypush/plugins/media/__init__.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/platypush/plugins/media/__init__.py b/platypush/plugins/media/__init__.py index 1363bbc72..3fef9d476 100644 --- a/platypush/plugins/media/__init__.py +++ b/platypush/plugins/media/__init__.py @@ -483,15 +483,15 @@ class MediaPlugin(Plugin): patterns = [ re.compile(pattern) for pattern in [ - 'https?://www.youtube.com/watch?v=([^&#]+)' - 'https?://youtube.com/watch?v=([^&#]+)' - 'https?://youtu.be/([^&#/]+)' - 'youtube:video:([^&#:])' + r'https?://www.youtube.com/watch?v=([^&#]+)' + r'https?://youtube.com/watch?v=([^&#]+)' + r'https?://youtu.be/([^&#/]+)' + r'youtube:video:([^&#:])' ] ] for pattern in patterns: - m = re.match(pattern, url) + m = pattern.match(url) if m: return m.group(1)