[generic] Use screenwavemedia embed pattern
authorSergey M․ <dstftw@gmail.com>
Sat, 29 Aug 2015 13:07:31 +0000 (19:07 +0600)
committerSergey M․ <dstftw@gmail.com>
Sat, 29 Aug 2015 13:07:31 +0000 (19:07 +0600)
youtube_dl/extractor/generic.py

index 5d41b6319a1ef857a95d51af3b0a378ab6260e12..c9b36221eb9b63c1606ba96630ba5a27dd668741 100644 (file)
@@ -48,6 +48,7 @@ from .vimeo import VimeoIE
 from .dailymotion import DailymotionCloudIE
 from .onionstudios import OnionStudiosIE
 from .snagfilms import SnagFilmsEmbedIE
+from .screenwavemedia import ScreenwaveMediaIE
 
 
 class GenericIE(InfoExtractor):
@@ -1719,13 +1720,9 @@ class GenericIE(InfoExtractor):
             return self.url_result(snagfilms_url)
 
         # Look for ScreenwaveMedia embeds
-        mobj = re.search(
-            r'<script[^>]+src=[\'"](http://player\d?\.screenwavemedia\.com/player\.php\?id=[A-Za-z0-9-]+)[\'"]',
-            webpage)
+        mobj = re.search(ScreenwaveMediaIE.EMBED_PATTERN, webpage)
         if mobj is not None:
-            return self.url_result(
-                unescapeHTML(mobj.group(1)),
-                'ScreenwaveMedia')
+            return self.url_result(unescapeHTML(mobj.group('url')), 'ScreenwaveMedia')
 
         # Look for AdobeTVVideo embeds
         mobj = re.search(