mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2025-09-03 16:45:17 +00:00
[ie] Do not test truth value of xml.etree.ElementTree.Element
(#8582)
Testing the truthiness of an `xml.etree.ElementTree.Element` instance is deprecated in py3.12 Authored by: bashonly
This commit is contained in:
@ -2225,7 +2225,9 @@ class InfoExtractor:
|
||||
mpd_url, video_id,
|
||||
note='Downloading MPD VOD manifest' if note is None else note,
|
||||
errnote='Failed to download VOD manifest' if errnote is None else errnote,
|
||||
fatal=False, data=data, headers=headers, query=query) or {}
|
||||
fatal=False, data=data, headers=headers, query=query)
|
||||
if not isinstance(mpd_doc, xml.etree.ElementTree.Element):
|
||||
return None
|
||||
return int_or_none(parse_duration(mpd_doc.get('mediaPresentationDuration')))
|
||||
|
||||
@staticmethod
|
||||
|
Reference in New Issue
Block a user