소스 검색

[appletrailers] Improve regex for fixing '<img>' tags (#7953)

Jaime Marquínez Ferrándiz 9 년 전
부모
커밋
7fe37d8a05
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      youtube_dl/extractor/appletrailers.py

+ 1 - 1
youtube_dl/extractor/appletrailers.py

@@ -80,7 +80,7 @@ class AppleTrailersIE(InfoExtractor):
 
         def fix_html(s):
             s = re.sub(r'(?s)<script[^<]*?>.*?</script>', '', s)
-            s = re.sub(r'<img ([^<]*?)>', r'<img \1/>', s)
+            s = re.sub(r'<img ([^<]*?)/?>', r'<img \1/>', s)
             # The ' in the onClick attributes are not escaped, it couldn't be parsed
             # like: http://trailers.apple.com/trailers/wb/gravity/