aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/extractor
diff options
context:
space:
mode:
authorSergey M․ <dstftw@gmail.com>2016-06-18 04:46:26 +0700
committerSergey M․ <dstftw@gmail.com>2016-06-18 04:46:26 +0700
commit20a6a154fe8e6a5d246ad1326c4082ddd6091718 (patch)
treefaf8d4e31a94542e1e5f08e61c89ec680476b3f0 /youtube_dl/extractor
parentf011876076a9fc4ee3fcb8b17f8bc2bcf5c8b8b0 (diff)
[mtv] Use compat_xpath and fix FutureWarning
Diffstat (limited to 'youtube_dl/extractor')
-rw-r--r--youtube_dl/extractor/mtv.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/youtube_dl/extractor/mtv.py b/youtube_dl/extractor/mtv.py
index 640ee3d93..8a638a47c 100644
--- a/youtube_dl/extractor/mtv.py
+++ b/youtube_dl/extractor/mtv.py
@@ -6,6 +6,7 @@ from .common import InfoExtractor
from ..compat import (
compat_urllib_parse_urlencode,
compat_str,
+ compat_xpath,
)
from ..utils import (
ExtractorError,
@@ -139,9 +140,9 @@ class MTVServicesInfoExtractor(InfoExtractor):
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