]> gitweb @ CieloNegro.org - youtube-dl.git/commitdiff
[safari] Improve ids regexes (#10617)
authorSergey M․ <dstftw@gmail.com>
Mon, 12 Sep 2016 16:05:52 +0000 (23:05 +0700)
committerSergey M․ <dstftw@gmail.com>
Mon, 12 Sep 2016 16:05:52 +0000 (23:05 +0700)
youtube_dl/extractor/safari.py

index 08ddbe3c4222879cade93fd9a5433e1d9c4e6e49..eabe41efe0b09c38ef7c26d2b2b0792210da416e 100644 (file)
@@ -103,13 +103,13 @@ class SafariIE(SafariBaseIE):
 
         webpage = self._download_webpage(url, video_id)
         reference_id = self._search_regex(
-            r'data-reference-id=(["\'])(?P<id>.+?)\1',
+            r'data-reference-id=(["\'])(?P<id>(?:(?!\1).)+)\1',
             webpage, 'kaltura reference id', group='id')
         partner_id = self._search_regex(
-            r'data-partner-id=(["\'])(?P<id>.+?)\1',
+            r'data-partner-id=(["\'])(?P<id>(?:(?!\1).)+)\1',
             webpage, 'kaltura widget id', group='id')
         ui_id = self._search_regex(
-            r'data-ui-id=(["\'])(?P<id>.+?)\1',
+            r'data-ui-id=(["\'])(?P<id>(?:(?!\1).)+)\1',
             webpage, 'kaltura uiconf id', group='id')
 
         query = {