From afd8b1c49bfa5b17cd47b38777382a3227da944d Mon Sep 17 00:00:00 2001 From: tetra-eder Date: Wed, 9 Aug 2017 19:12:24 +0200 Subject: [PATCH] add xruniversity extractor --- youtube_dl/extractor/extractors.py | 1 + youtube_dl/extractor/xruniversity.py | 36 ++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+) create mode 100644 youtube_dl/extractor/xruniversity.py diff --git a/youtube_dl/extractor/extractors.py b/youtube_dl/extractor/extractors.py index 897557f93..561e1ee4e 100644 --- a/youtube_dl/extractor/extractors.py +++ b/youtube_dl/extractor/extractors.py @@ -1284,6 +1284,7 @@ from .xiami import ( ) from .xminus import XMinusIE from .xnxx import XNXXIE +from .xruniversity import XruniversityIE from .xstream import XstreamIE from .xtube import XTubeUserIE, XTubeIE from .xuite import XuiteIE diff --git a/youtube_dl/extractor/xruniversity.py b/youtube_dl/extractor/xruniversity.py new file mode 100644 index 000000000..30a0d6dd9 --- /dev/null +++ b/youtube_dl/extractor/xruniversity.py @@ -0,0 +1,36 @@ +# coding: utf-8 +from __future__ import unicode_literals + +from .common import InfoExtractor + + +class XruniversityIE(InfoExtractor): + _VALID_URL = r'https?://(?:www\.)?xruniversity\.com/(?P[^/?#]+)' + _TEST = { + 'url': 'http://www.xruniversity.com/bdsm-lets-begin-melissa-moore/', + 'md5': 'cddc9fb8a8644a0a7742149eee95080b', + 'info_dict': { + 'id': 'bdsm-lets-begin-melissa-moore', + 'ext': 'mp4', + 'title': 'BDSM Let’s Begin with Melissa Moore', + 'age_limit': 18, + 'language': 'en-US', + } + } + + def _real_extract(self, url): + video_id = self._match_id(url) + webpage = self._download_webpage(url, video_id) + title = self._html_search_regex(r'

(.+?)

', webpage, 'title') + hoster_video_id = self._html_search_regex(r'