From 27fe903c511691c078942bef5ee9a05a43b15c8f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jes=C3=BAs?= Date: Wed, 9 Jun 2021 17:54:27 -0500 Subject: initial --- hypervideo_dl/extractor/expotv.py | 77 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 hypervideo_dl/extractor/expotv.py (limited to 'hypervideo_dl/extractor/expotv.py') diff --git a/hypervideo_dl/extractor/expotv.py b/hypervideo_dl/extractor/expotv.py new file mode 100644 index 0000000..95a8977 --- /dev/null +++ b/hypervideo_dl/extractor/expotv.py @@ -0,0 +1,77 @@ +from __future__ import unicode_literals + +from .common import InfoExtractor +from ..utils import ( + int_or_none, + unified_strdate, +) + + +class ExpoTVIE(InfoExtractor): + _VALID_URL = r'https?://(?:www\.)?expotv\.com/videos/[^?#]*/(?P[0-9]+)($|[?#])' + _TEST = { + 'url': 'http://www.expotv.com/videos/reviews/3/40/NYX-Butter-lipstick/667916', + 'md5': 'fe1d728c3a813ff78f595bc8b7a707a8', + 'info_dict': { + 'id': '667916', + 'ext': 'mp4', + 'title': 'NYX Butter Lipstick Little Susie', + 'description': 'Goes on like butter, but looks better!', + 'thumbnail': r're:^https?://.*\.jpg$', + 'uploader': 'Stephanie S.', + 'upload_date': '20150520', + 'view_count': int, + } + } + + def _real_extract(self, url): + video_id = self._match_id(url) + + webpage = self._download_webpage(url, video_id) + player_key = self._search_regex( + r'Plays: ([0-9]+)', webpage, 'view counts')) + uploader = self._search_regex( + r'
\s*([^Reviewed on ([0-9/.]+)', webpage, 'upload date', + fatal=False), day_first=False) + + return { + 'id': video_id, + 'formats': formats, + 'title': title, + 'description': description, + 'view_count': view_count, + 'thumbnail': thumbnail, + 'uploader': uploader, + 'upload_date': upload_date, + } -- cgit v1.2.3