diff options
author | Filippo Valsorda <filippo.valsorda@gmail.com> | 2012-12-20 16:30:55 +0100 |
---|---|---|
committer | Filippo Valsorda <filippo.valsorda@gmail.com> | 2012-12-20 16:30:55 +0100 |
commit | 6b3aef80ceba9b4715065be924dcb1f83ec36655 (patch) | |
tree | 37f54709feb3ee463384643a8f6fba6996300ab5 /youtube_dl/utils.py | |
parent | 77c4beab8a0c13e158bad8af4e014d57766f1940 (diff) |
better Vimeo tests; fixed a couple of VimeoIE fields
Diffstat (limited to 'youtube_dl/utils.py')
-rw-r--r-- | youtube_dl/utils.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/youtube_dl/utils.py b/youtube_dl/utils.py index c18c9beed..463804e18 100644 --- a/youtube_dl/utils.py +++ b/youtube_dl/utils.py @@ -298,7 +298,8 @@ def clean_html(html): """Clean an HTML snippet into a readable string""" # Newline vs <br /> html = html.replace('\n', ' ') - html = re.sub('\s*<\s*br\s*/?\s*>\s*', '\n', html) + html = re.sub(r'\s*<\s*br\s*/?\s*>\s*', '\n', html) + html = re.sub(r'<\s*/\s*p\s*>\s*<\s*p[^>]*>', '\n', html) # Strip html tags html = re.sub('<.*?>', '', html) # Replace html entities |