mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-21 20:46:36 -05:00
[appletrailers] Improve regex for fixing '<img>' tags (#7953)
This commit is contained in:
parent
f10c27b8cb
commit
7fe37d8a05
1 changed files with 1 additions and 1 deletions
|
@ -80,7 +80,7 @@ def _real_extract(self, url):
|
|||
|
||||
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/
|
||||
|
||||
|
|
Loading…
Reference in a new issue