mirror of
https://github.com/yt-dlp/yt-dlp
synced 2025-12-17 22:55:42 +07:00
[videolectures.net] Make description optional
This commit is contained in:
@@ -36,7 +36,10 @@ def _real_extract(self, url):
|
|||||||
smil = self._download_xml(smil_url, video_id)
|
smil = self._download_xml(smil_url, video_id)
|
||||||
|
|
||||||
title = find_xpath_attr(smil, './/meta', 'name', 'title').attrib['content']
|
title = find_xpath_attr(smil, './/meta', 'name', 'title').attrib['content']
|
||||||
description = find_xpath_attr(smil, './/meta', 'name', 'abstract').attrib['content']
|
description_el = find_xpath_attr(smil, './/meta', 'name', 'abstract')
|
||||||
|
description = (
|
||||||
|
None if description_el is None
|
||||||
|
else description_el.attrib['content'])
|
||||||
upload_date = unified_strdate(
|
upload_date = unified_strdate(
|
||||||
find_xpath_attr(smil, './/meta', 'name', 'date').attrib['content'])
|
find_xpath_attr(smil, './/meta', 'name', 'date').attrib['content'])
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user