diff options
author | Vobe <[email protected]> | 2017-02-11 21:11:55 +0100 |
---|---|---|
committer | Sergey M․ <[email protected]> | 2017-02-13 23:34:14 +0700 |
commit | f6d6ca1db3020e7c7771880d0c4b58fdf732a8d5 (patch) | |
tree | e296c6d6c3be83f5bd0a061e7efaf2b6f4cd3c70 /youtube_dl/extractor/xtube.py | |
parent | 6e5956e6ba32c5e4d186e79fbaff0842818ae56b (diff) | |
download | youtube-dl-f6d6ca1db3020e7c7771880d0c4b58fdf732a8d5.tar.gz youtube-dl-f6d6ca1db3020e7c7771880d0c4b58fdf732a8d5.zip |
[xtube] Improve title extraction
Diffstat (limited to 'youtube_dl/extractor/xtube.py')
-rw-r--r-- | youtube_dl/extractor/xtube.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/youtube_dl/extractor/xtube.py b/youtube_dl/extractor/xtube.py index 11717fe98..ed3a37649 100644 --- a/youtube_dl/extractor/xtube.py +++ b/youtube_dl/extractor/xtube.py @@ -53,7 +53,7 @@ class XTubeIE(InfoExtractor): if not display_id: display_id = video_id - url = 'http://www.xtube.com/video-watch/-%s' % video_id + url = 'http://www.xtube.com/watch.php?v=%s' % video_id req = sanitized_Request(url) req.add_header('Cookie', 'age_verified=1; cookiesAccepted=1') @@ -73,7 +73,7 @@ class XTubeIE(InfoExtractor): self._sort_formats(formats) title = self._search_regex( - (r'<h1>(?P<title>[^<]+)</h1>', r'videoTitle\s*:\s*(["\'])(?P<title>.+?)\1'), + (r'<h1>\s*(?P<title>[^<]+?)\s*</h1>', r'videoTitle\s*:\s*(["\'])(?P<title>.+?)\1'), webpage, 'title', group='title') description = self._search_regex( r'</h1>\s*<p>([^<]+)', webpage, 'description', fatal=False) |