mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-12-28 14:15:53 +01:00
[mtv] Use compat_xpath and fix FutureWarning
This commit is contained in:
parent
f011876076
commit
20a6a154fe
@ -6,6 +6,7 @@
|
||||
from ..compat import (
|
||||
compat_urllib_parse_urlencode,
|
||||
compat_str,
|
||||
compat_xpath,
|
||||
)
|
||||
from ..utils import (
|
||||
ExtractorError,
|
||||
@ -139,9 +140,9 @@ def _get_video_info(self, itemdoc):
|
||||
itemdoc, './/{http://search.yahoo.com/mrss/}category',
|
||||
'scheme', 'urn:mtvn:video_title')
|
||||
if title_el is None:
|
||||
title_el = itemdoc.find('.//{http://search.yahoo.com/mrss/}title')
|
||||
title_el = itemdoc.find(compat_xpath('.//{http://search.yahoo.com/mrss/}title'))
|
||||
if title_el is None:
|
||||
title_el = itemdoc.find('.//title') or itemdoc.find('./title')
|
||||
title_el = itemdoc.find(compat_xpath('.//title'))
|
||||
if title_el.text is None:
|
||||
title_el = None
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user