From c2a8547fdcc8b9c3c2da43a6cb18281bbf429870 Mon Sep 17 00:00:00 2001 From: schn0sch <76663386+schn0sch@users.noreply.github.com> Date: Tue, 15 Feb 2022 04:21:27 +0100 Subject: [PATCH] [peekvids] Add extractor (#2414) Authored by: schn0sch --- yt_dlp/extractor/extractors.py | 1 + yt_dlp/extractor/peekvids.py | 85 ++++++++++++++++++++++++++++++++++ 2 files changed, 86 insertions(+) create mode 100644 yt_dlp/extractor/peekvids.py diff --git a/yt_dlp/extractor/extractors.py b/yt_dlp/extractor/extractors.py index 777d17788d..9b481b2c12 100644 --- a/yt_dlp/extractor/extractors.py +++ b/yt_dlp/extractor/extractors.py @@ -1141,6 +1141,7 @@ from .patreon import ( ) from .pbs import PBSIE from .pearvideo import PearVideoIE +from .peekvids import PeekVidsIE, PlayVidsIE from .peertube import ( PeerTubeIE, PeerTubePlaylistIE, diff --git a/yt_dlp/extractor/peekvids.py b/yt_dlp/extractor/peekvids.py new file mode 100644 index 0000000000..62050a8e42 --- /dev/null +++ b/yt_dlp/extractor/peekvids.py @@ -0,0 +1,85 @@ +# coding: utf-8 +from __future__ import unicode_literals + +from .common import InfoExtractor +from ..utils import remove_end + + +class PeekVidsIE(InfoExtractor): + _VALID_URL = r'''(?x) + https?://(?:www\.)?peekvids\.com/ + (?:(?:[^/?#]+/){2}|embed/?\?(?:[^#]*&)?v=) + (?P[^/?&#]*) + ''' + _TESTS = [{ + 'url': 'https://peekvids.com/pc/dane-jones-cute-redhead-with-perfect-tits-with-mini-vamp/BSyLMbN0YCd', + 'md5': '2ff6a357a9717dc9dc9894b51307e9a2', + 'info_dict': { + 'id': 'BSyLMbN0YCd', + 'ext': 'mp4', + 'title': 'Dane Jones - Cute redhead with perfect tits with Mini Vamp', + 'age_limit': 18, + }, + }] + _DOMAIN = 'www.peekvids.com' + + def _real_extract(self, url): + video_id = self._match_id(url) + webpage = self._download_webpage(url, video_id) + + short_video_id = self._html_search_regex(r'