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

index c949a481477c187d9433f39e6e851b87c97edf79..fd1770dac958c477c4fb29e80e1e8722e459c45e 100644 (file)
@@ -6,6 +6,7 @@ import re
 from .common import InfoExtractor
 from ..utils import ExtractorError
 from .bliptv import BlipTVIE
+from .screenwavemedia import ScreenwaveMediaIE
 
 
 class CinemassacreIE(InfoExtractor):
@@ -83,10 +84,10 @@ class CinemassacreIE(InfoExtractor):
 
         playerdata_url = self._search_regex(
             [
-                r'src="(http://(?:player2\.screenwavemedia\.com|player\.screenwavemedia\.com/play)/[a-zA-Z]+\.php\?[^"]*\bid=.+?)"',
-                r'<iframe[^>]+src="((?:https?:)?//(?:[^.]+\.)?youtube\.com/.+?)"',
+                ScreenwaveMediaIE.EMBED_PATTERN,
+                r'<iframe[^>]+src="(?P<url>(?:https?:)?//(?:[^.]+\.)?youtube\.com/.+?)"',
             ],
-            webpage, 'player data URL', default=None)
+            webpage, 'player data URL', default=None, group='url')
         if not playerdata_url:
             playerdata_url = BlipTVIE._extract_url(webpage)
         if not playerdata_url: