[bitchute] add upload_date

This commit is contained in:
Matthew Brooks 2019-11-24 13:07:34 -06:00
parent 0de9fd24dc
commit cc26427b38

View File

@ -8,6 +8,7 @@ from .common import InfoExtractor
from ..utils import ( from ..utils import (
orderedSet, orderedSet,
urlencode_postdata, urlencode_postdata,
unified_strdate,
) )
@ -23,6 +24,7 @@ class BitChuteIE(InfoExtractor):
'description': 'md5:3f21f6fb5b1d17c3dee9cf6b5fe60b3a', 'description': 'md5:3f21f6fb5b1d17c3dee9cf6b5fe60b3a',
'thumbnail': r're:^https?://.*\.jpg$', 'thumbnail': r're:^https?://.*\.jpg$',
'uploader': 'Victoria X Rave', 'uploader': 'Victoria X Rave',
'upload_date': '20170813',
}, },
}, { }, {
'url': 'https://www.bitchute.com/embed/lbb5G1hjPhw/', 'url': 'https://www.bitchute.com/embed/lbb5G1hjPhw/',
@ -74,6 +76,11 @@ class BitChuteIE(InfoExtractor):
r'(?s)<p\b[^>]+\bclass=["\']video-author[^>]+>(.+?)</p>'), r'(?s)<p\b[^>]+\bclass=["\']video-author[^>]+>(.+?)</p>'),
webpage, 'uploader', fatal=False) webpage, 'uploader', fatal=False)
upload_date = self._html_search_regex(
r'(?s)class="video-publish-date.*?>.*?First published at [0-9]+:[0-9]+ UTC on (.*?)\..*?</div>',
webpage, 'upload_date', fatal=False)
upload_date = unified_strdate(upload_date)
return { return {
'id': video_id, 'id': video_id,
'title': title, 'title': title,
@ -81,6 +88,7 @@ class BitChuteIE(InfoExtractor):
'thumbnail': thumbnail, 'thumbnail': thumbnail,
'uploader': uploader, 'uploader': uploader,
'formats': formats, 'formats': formats,
'upload_date': upload_date,
} }