mirror of
https://gitlab.com/ytdl-org/youtube-dl.git
synced 2025-11-04 14:17:08 -05:00
[appletrailers] Improve regex for fixing '<img>' tags (#7953)
This commit is contained in:
@@ -80,7 +80,7 @@ class AppleTrailersIE(InfoExtractor):
|
|||||||
|
|
||||||
def fix_html(s):
|
def fix_html(s):
|
||||||
s = re.sub(r'(?s)<script[^<]*?>.*?</script>', '', 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
|
# The ' in the onClick attributes are not escaped, it couldn't be parsed
|
||||||
# like: http://trailers.apple.com/trailers/wb/gravity/
|
# like: http://trailers.apple.com/trailers/wb/gravity/
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user