]> gitweb @ CieloNegro.org - youtube-dl.git/commitdiff
[JWPlatform] Use non-capturing group in RE
authorJohn Hawkinson <jhawk@mit.edu>
Fri, 24 Nov 2017 13:10:47 +0000 (08:10 -0500)
committerYen Chi Hsuan <yan12125@gmail.com>
Fri, 24 Nov 2017 13:39:55 +0000 (21:39 +0800)
Per @yan12125.

youtube_dl/extractor/jwplatform.py

index 4e74eafac707d8b3c0c4a21cd3d6bcfaf24185ed..c9bcbb08f787ef74bea78c4b402ecb7b167556e7 100644 (file)
@@ -24,7 +24,7 @@ class JWPlatformIE(InfoExtractor):
     @staticmethod
     def _extract_url(webpage):
         mobj = re.search(
-            r'<(script|iframe)[^>]+?src=["\'](?P<url>(?:https?:)?//content.jwplatform.com/players/[a-zA-Z0-9]{8})',
+            r'<(?:script|iframe)[^>]+?src=["\'](?P<url>(?:https?:)?//content.jwplatform.com/players/[a-zA-Z0-9]{8})',
             webpage)
         if mobj:
             return mobj.group('url')