From dd622d7c4ec15aec6ea5d66ed88a236147373e95 Mon Sep 17 00:00:00 2001 From: Philipp Hagemeister Date: Fri, 9 Jan 2015 23:59:18 +0100 Subject: [netzkino] Add new extractor (Fixes #4669) --- youtube_dl/utils.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'youtube_dl/utils.py') diff --git a/youtube_dl/utils.py b/youtube_dl/utils.py index 29739a483..079e8d2c3 100644 --- a/youtube_dl/utils.py +++ b/youtube_dl/utils.py @@ -205,6 +205,10 @@ def get_element_by_attribute(attribute, value, html): def clean_html(html): """Clean an HTML snippet into a readable string""" + + if html is None: # Convenience for sanitizing descriptions etc. + return html + # Newline vs
html = html.replace('\n', ' ') html = re.sub(r'\s*<\s*br\s*/?\s*>\s*', '\n', html) -- cgit v1.2.3