]> git.bitcoin.ninja Git - youtube-dl/commitdiff
[generic,vodplatform] improve embed regex
authorRemita Amine <remitamine@gmail.com>
Mon, 29 Aug 2016 06:56:54 +0000 (07:56 +0100)
committerRemita Amine <remitamine@gmail.com>
Mon, 29 Aug 2016 06:57:20 +0000 (07:57 +0100)
youtube_dl/extractor/generic.py
youtube_dl/extractor/vodplatform.py

index c6e655c8424c5c3e9da586eb529ceb588dabbb7f..24b217715758de362da50ea0efffe5f11dfcd450 100644 (file)
@@ -2243,11 +2243,11 @@ class GenericIE(InfoExtractor):
 
         # Look for VODPlatform embeds
         mobj = re.search(
-            r'<iframe[^>]+src=[\'"]((?:https?:)?//(?:www\.)?vod-platform\.net/embed/[^/?#]+)',
+            r'<iframe[^>]+src=(["\'])(?P<url>(?:https?:)?//(?:www\.)?vod-platform\.net/[eE]mbed/.+?)\1',
             webpage)
         if mobj is not None:
             return self.url_result(
-                self._proto_relative_url(unescapeHTML(mobj.group(1))), 'VODPlatform')
+                self._proto_relative_url(unescapeHTML(mobj.group('url'))), 'VODPlatform')
 
         # Look for Instagram embeds
         instagram_embed_url = InstagramIE._extract_embed_url(webpage)
index b49542b162d82cca3f1c11d5a3b2c062b3c34c9f..7bdd8b1dcd4f93f1a47050286b221e4ec30635b9 100644 (file)
@@ -6,7 +6,7 @@ from ..utils import unescapeHTML
 
 
 class VODPlatformIE(InfoExtractor):
-    _VALID_URL = r'https?://(?:www\.)?vod-platform\.net/embed/(?P<id>[^/?#]+)'
+    _VALID_URL = r'https?://(?:www\.)?vod-platform\.net/[eE]mbed/(?P<id>[^/?#]+)'
     _TEST = {
         # from http://www.lbcgroup.tv/watch/chapter/29143/52844/%D8%A7%D9%84%D9%86%D8%B5%D8%B1%D8%A9-%D9%81%D9%8A-%D8%B6%D9%8A%D8%A7%D9%81%D8%A9-%D8%A7%D9%84%D9%80-cnn/ar
         'url': 'http://vod-platform.net/embed/RufMcytHDolTH1MuKHY9Fw',