From d6add6313dd48b2382ee408f9b8111d1878dbf13 Mon Sep 17 00:00:00 2001 From: Mark Date: Fri, 28 Feb 2020 18:38:46 -0600 Subject: [PATCH 1/3] bitchute - parse timestamp --- youtube_dl/extractor/bitchute.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/youtube_dl/extractor/bitchute.py b/youtube_dl/extractor/bitchute.py index 0c773e66e..e1cfd0d76 100644 --- a/youtube_dl/extractor/bitchute.py +++ b/youtube_dl/extractor/bitchute.py @@ -8,6 +8,7 @@ from .common import InfoExtractor from ..utils import ( orderedSet, unified_strdate, + unified_timestamp, urlencode_postdata, ) @@ -80,6 +81,10 @@ class BitChuteIE(InfoExtractor): r'class=["\']video-publish-date[^>]+>[^<]+ at \d+:\d+ UTC on (.+?)\.', webpage, 'upload date', fatal=False)) + timestamp = unified_timestamp('-'.join([upload_date[:4], upload_date[4:6], upload_date[6:]]) + ' ' + self._search_regex( + r'class=["\']video-publish-date[^>]+>[^<]+ (\d+:\d+ UTC) on', + webpage, 'timestamp', fatal=False)) + return { 'id': video_id, 'title': title, @@ -88,6 +93,7 @@ class BitChuteIE(InfoExtractor): 'uploader': uploader, 'upload_date': upload_date, 'formats': formats, + 'timestamp': timestamp, } From 6dd76fed80745d87de4b275ea82a781994db29c3 Mon Sep 17 00:00:00 2001 From: Mark Date: Fri, 28 Feb 2020 18:54:58 -0600 Subject: [PATCH 2/3] change bitchute test to new video url (old url is 404) --- youtube_dl/extractor/bitchute.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/youtube_dl/extractor/bitchute.py b/youtube_dl/extractor/bitchute.py index e1cfd0d76..57f620fc0 100644 --- a/youtube_dl/extractor/bitchute.py +++ b/youtube_dl/extractor/bitchute.py @@ -16,16 +16,17 @@ from ..utils import ( class BitChuteIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?bitchute\.com/(?:video|embed|torrent/[^/]+)/(?P[^/?#&]+)' _TESTS = [{ - 'url': 'https://www.bitchute.com/video/szoMrox2JEI/', - 'md5': '66c4a70e6bfc40dcb6be3eb1d74939eb', + 'url': 'https://www.bitchute.com/video/mxzcCZI0RQ0k/', + 'md5': '94e5c980ffdb450e72a8ed55f2e9280b', 'info_dict': { - 'id': 'szoMrox2JEI', + 'id': 'mxzcCZI0RQ0k', 'ext': 'mp4', - 'title': 'Fuck bitches get money', - 'description': 'md5:3f21f6fb5b1d17c3dee9cf6b5fe60b3a', + 'title': 'Some People are just Glitches in the Matrix', + 'description': 'md5:46cc1f8670f6da35fec011bb1d1e548e', 'thumbnail': r're:^https?://.*\.jpg$', - 'uploader': 'Victoria X Rave', - 'upload_date': '20170813', + 'uploader': 'stargods', + 'upload_date': '20200218', + 'timestamp': 1582066500, }, }, { 'url': 'https://www.bitchute.com/embed/lbb5G1hjPhw/', From 80f7dfce934cfd2dbc4c76a09733616ae6acae0e Mon Sep 17 00:00:00 2001 From: Mark Date: Fri, 28 Feb 2020 18:57:27 -0600 Subject: [PATCH 3/3] change bitchute channel test to new channel url (old url is 404) --- youtube_dl/extractor/bitchute.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/youtube_dl/extractor/bitchute.py b/youtube_dl/extractor/bitchute.py index 57f620fc0..8acb45831 100644 --- a/youtube_dl/extractor/bitchute.py +++ b/youtube_dl/extractor/bitchute.py @@ -101,10 +101,10 @@ class BitChuteIE(InfoExtractor): class BitChuteChannelIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?bitchute\.com/channel/(?P[^/?#&]+)' _TEST = { - 'url': 'https://www.bitchute.com/channel/victoriaxrave/', - 'playlist_mincount': 185, + 'url': 'https://www.bitchute.com/channel/stargods/', + 'playlist_mincount': 50, 'info_dict': { - 'id': 'victoriaxrave', + 'id': 'stargods', }, }