]> Raphaƫl G. Git Repositories - youtubedl/blobdiff - youtube_dl/extractor/joj.py
debian/control: Update list of extractors in long description.
[youtubedl] / youtube_dl / extractor / joj.py
old mode 100755 (executable)
new mode 100644 (file)
index a764023..d9f8dbf
@@ -18,7 +18,7 @@ class JojIE(InfoExtractor):
                         joj:|\r
                         https?://media\.joj\.sk/embed/\r
                     )\r
                         joj:|\r
                         https?://media\.joj\.sk/embed/\r
                     )\r
-                    (?P<id>[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12})\r
+                    (?P<id>[^/?#^]+)\r
                 '''\r
     _TESTS = [{\r
         'url': 'https://media.joj.sk/embed/a388ec4c-6019-4a4a-9312-b1bee194e932',\r
                 '''\r
     _TESTS = [{\r
         'url': 'https://media.joj.sk/embed/a388ec4c-6019-4a4a-9312-b1bee194e932',\r
@@ -29,16 +29,24 @@ class JojIE(InfoExtractor):
             'thumbnail': r're:^https?://.*\.jpg$',\r
             'duration': 3118,\r
         }\r
             'thumbnail': r're:^https?://.*\.jpg$',\r
             'duration': 3118,\r
         }\r
+    }, {\r
+        'url': 'https://media.joj.sk/embed/9i1cxv',\r
+        'only_matching': True,\r
     }, {\r
         'url': 'joj:a388ec4c-6019-4a4a-9312-b1bee194e932',\r
         'only_matching': True,\r
     }, {\r
         'url': 'joj:a388ec4c-6019-4a4a-9312-b1bee194e932',\r
         'only_matching': True,\r
+    }, {\r
+        'url': 'joj:9i1cxv',\r
+        'only_matching': True,\r
     }]\r
 \r
     @staticmethod\r
     def _extract_urls(webpage):\r
     }]\r
 \r
     @staticmethod\r
     def _extract_urls(webpage):\r
-        return re.findall(\r
-            r'<iframe\b[^>]+\bsrc=["\'](?P<url>(?:https?:)?//media\.joj\.sk/embed/[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12})',\r
-            webpage)\r
+        return [\r
+            mobj.group('url')\r
+            for mobj in re.finditer(\r
+                r'<iframe\b[^>]+\bsrc=(["\'])(?P<url>(?:https?:)?//media\.joj\.sk/embed/(?:(?!\1).)+)\1',\r
+                webpage)]\r
 \r
     def _real_extract(self, url):\r
         video_id = self._match_id(url)\r
 \r
     def _real_extract(self, url):\r
         video_id = self._match_id(url)\r