Explorar o código

[extractor/common] Improve jwplayer regex

Sergey M․ %!s(int64=8) %!d(string=hai) anos
pai
achega
ac9c69ace7
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      youtube_dl/extractor/common.py

+ 1 - 1
youtube_dl/extractor/common.py

@@ -2233,7 +2233,7 @@ class InfoExtractor(object):
 
 
     def _find_jwplayer_data(self, webpage, video_id=None, transform_source=js_to_json):
     def _find_jwplayer_data(self, webpage, video_id=None, transform_source=js_to_json):
         mobj = re.search(
         mobj = re.search(
-            r'(?s)jwplayer\((?P<quote>[\'"])[^\'" ]+(?P=quote)\).*?\.setup\s*\((?P<options>[^)]+)\)',
+            r'(?s)jwplayer\((?P<quote>[\'"])[^\'" ]+(?P=quote)\)(?!</script>).*?\.setup\s*\((?P<options>[^)]+)\)',
             webpage)
             webpage)
         if mobj:
         if mobj:
             try:
             try: