diff options
Diffstat (limited to 'youtube_dl/utils.py')
| -rw-r--r-- | youtube_dl/utils.py | 11 | 
1 files changed, 2 insertions, 9 deletions
| diff --git a/youtube_dl/utils.py b/youtube_dl/utils.py index a5196b0ae..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 @@ -465,14 +466,6 @@ class ContentTooShortError(Exception):          self.downloaded = downloaded          self.expected = expected - -class Trouble(Exception): -    """Trouble helper exception - -    This is an exception to be handled with -    FileDownloader.trouble -    """ -  class YoutubeDLHandler(compat_urllib_request.HTTPHandler):      """Handler for HTTP requests and responses. | 
