Allow ampersand right after ? in youtube URLs (Closes #602)
[youtube-dl] / youtube_dl / utils.py
index c18c9beedb85904578dad654c624d97ccc1f68a0..463804e183117b23efd8f0e4b0ad9b132e519ddb 100644 (file)
@@ -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