Browse Source

[wistia] Restrict embed regex (closes #25969)

Sergey M․ 5 năm trước cách đây
mục cha
commit
718393c632
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      youtube_dl/extractor/wistia.py

+ 1 - 1
youtube_dl/extractor/wistia.py

@@ -56,7 +56,7 @@ class WistiaIE(InfoExtractor):
             urls.append(unescapeHTML(match.group('url')))
         for match in re.finditer(
                 r'''(?sx)
-                    <div[^>]+class=(["']).*?\bwistia_async_(?P<id>[a-z0-9]{10})\b.*?\2
+                    <div[^>]+class=(["'])(?:(?!\1).)*?\bwistia_async_(?P<id>[a-z0-9]{10})\b(?:(?!\1).)*?\1
                 ''', webpage):
             urls.append('wistia:%s' % match.group('id'))
         for match in re.finditer(r'(?:data-wistia-?id=["\']|Wistia\.embed\(["\']|id=["\']wistia_)(?P<id>[a-z0-9]{10})', webpage):