mirror of
https://github.com/yt-dlp/yt-dlp
synced 2024-11-28 16:33:24 +01:00
[lecture2go] Make optional fields non-fatal
This commit is contained in:
parent
e9c6deffee
commit
40101dc311
@ -45,7 +45,8 @@ class Lecture2GoIE(InfoExtractor):
|
|||||||
|
|
||||||
self._sort_formats(formats)
|
self._sort_formats(formats)
|
||||||
|
|
||||||
creator = self._html_search_regex(r'<div[^>]+id="description">([^<]+)</div>', webpage, 'creator')
|
creator = self._html_search_regex(
|
||||||
|
r'<div[^>]+id="description">([^<]+)</div>', webpage, 'creator', fatal=False)
|
||||||
duration = parse_duration(self._html_search_regex(
|
duration = parse_duration(self._html_search_regex(
|
||||||
r'Duration:\s*</em>\s*<em[^>]*>([^<]+)</em>', webpage, 'duration', fatal=False))
|
r'Duration:\s*</em>\s*<em[^>]*>([^<]+)</em>', webpage, 'duration', fatal=False))
|
||||||
view_count = int_or_none(self._html_search_regex(
|
view_count = int_or_none(self._html_search_regex(
|
||||||
|
Loading…
Reference in New Issue
Block a user