diff options
| author | Philipp Hagemeister <phihag@phihag.de> | 2012-12-20 21:28:32 +0100 | 
|---|---|---|
| committer | Philipp Hagemeister <phihag@phihag.de> | 2012-12-20 21:28:32 +0100 | 
| commit | a7c0f8602e91cc96962c7eade10860b61afc3728 (patch) | |
| tree | 01182f741a7b474d91e565e4beb91cc577e726d8 /youtube_dl/utils.py | |
| parent | 21a9c6aaac074b3ad85adc55818573e7971f8043 (diff) | |
| parent | 162e3c52616a72f4ddc11b0e5de0f2425e512896 (diff) | |
Merge branch 'master' of github.com:rg3/youtube-dl
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. | 
