fix metadata extraction for xtube

This commit is contained in:
duhlu 2019-05-12 13:24:42 +02:00 committed by GitHub
parent b7df8f90a7
commit 57f04d5817
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -106,16 +106,17 @@ class XTubeIE(InfoExtractor):
(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)
r'<span class="fullDescription[^"]+">\s*(?P<description>[^<]+)\s*</span>',
webpage, 'description', fatal=False)
uploader = self._search_regex(
(r'<input[^>]+name="contentOwnerId"[^>]+value="([^"]+)"',
r'<span[^>]+class="nickname"[^>]*>([^<]+)'),
webpage, 'uploader', fatal=False)
duration = parse_duration(self._search_regex(
r'<dt>Runtime:?</dt>\s*<dd>([^<]+)</dd>',
r',"duration":(?P<duration>\d+)(,|})',
webpage, 'duration', fatal=False))
view_count = str_to_int(self._search_regex(
r'<dt>Views:?</dt>\s*<dd>([\d,\.]+)</dd>',
(r'<div class="viewsWrapper">\s*<span class="viewsCount">\s*(\d+)\s*views'),
webpage, 'view count', fatal=False))
comment_count = str_to_int(self._html_search_regex(
r'>Comments? \(([\d,\.]+)\)<',