aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/utils.py
diff options
context:
space:
mode:
authorPhilipp Hagemeister <phihag@phihag.de>2015-01-09 23:59:18 +0100
committerPhilipp Hagemeister <phihag@phihag.de>2015-01-09 23:59:18 +0100
commitdd622d7c4ec15aec6ea5d66ed88a236147373e95 (patch)
tree22b2ca7b1fbcdd96e0e3ed70b1aa5cf15c42d9b9 /youtube_dl/utils.py
parentb8da6b9fc6b05dff5dfbe98e20546b7e5e0ab170 (diff)
[netzkino] Add new extractor (Fixes #4669)
Diffstat (limited to 'youtube_dl/utils.py')
-rw-r--r--youtube_dl/utils.py4
1 files changed, 4 insertions, 0 deletions
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 <br />
html = html.replace('\n', ' ')
html = re.sub(r'\s*<\s*br\s*/?\s*>\s*', '\n', html)