Skip to content

A feature-rich command-line audio/video downloader

[mtv] Fix description extraction (Closes #8962)

Sergey M․5767b4eeae99
diff --git a/youtube_dl/extractor/mtv.py b/youtube_dl/extractor/mtv.py
index ed068365d3..824bbcb4e6 100644
--- a/youtube_dl/extractor/mtv.py
+++ b/youtube_dl/extractor/mtv.py
@@ -17,6 +17,7 @@ from ..utils import (
unescapeHTML,
url_basename,
RegexNotFoundError,
+ xpath_text,
)
@@ -130,11 +131,7 @@ class MTVServicesInfoExtractor(InfoExtractor):
message += item.text
raise ExtractorError(message, expected=True)
- description_node = itemdoc.find('description')
- if description_node is not None:
- description = description_node.text.strip()
- else:
- description = None
+ description = xpath_text(itemdoc, 'description')
title_el = None
if title_el is None: