[generic] Improve SBS detection (Fixes #4899)
authorPhilipp Hagemeister <phihag@phihag.de>
Mon, 9 Feb 2015 13:46:10 +0000 (14:46 +0100)
committerPhilipp Hagemeister <phihag@phihag.de>
Mon, 9 Feb 2015 13:46:10 +0000 (14:46 +0100)
youtube_dl/extractor/generic.py

index 8a0f10803ed568e65459cdd60eba812a091ae947..f4500e931ba1a2c72fa6e4e87e120e317e236e56 100644 (file)
@@ -1047,7 +1047,12 @@ class GenericIE(InfoExtractor):
 
         # Look for embedded sbs.com.au player
         mobj = re.search(
-            r'<iframe[^>]+?src=(["\'])(?P<url>https?://(?:www\.)sbs\.com\.au/ondemand/video/single/.+?)\1',
+            r'''(?x)
+            (?:
+                <meta\s+property="og:video"\s+content=|
+                <iframe[^>]+?src=
+            )
+            (["\'])(?P<url>https?://(?:www\.)?sbs\.com\.au/ondemand/video/.+?)\1''',
             webpage)
         if mobj is not None:
             return self.url_result(mobj.group('url'), 'SBS')