mirror of
https://github.com/l1ving/youtube-dl
synced 2025-02-13 21:12:58 +08:00
add xruniversity extractor
This commit is contained in:
parent
4bf22f7a10
commit
afd8b1c49b
@ -1284,6 +1284,7 @@ from .xiami import (
|
|||||||
)
|
)
|
||||||
from .xminus import XMinusIE
|
from .xminus import XMinusIE
|
||||||
from .xnxx import XNXXIE
|
from .xnxx import XNXXIE
|
||||||
|
from .xruniversity import XruniversityIE
|
||||||
from .xstream import XstreamIE
|
from .xstream import XstreamIE
|
||||||
from .xtube import XTubeUserIE, XTubeIE
|
from .xtube import XTubeUserIE, XTubeIE
|
||||||
from .xuite import XuiteIE
|
from .xuite import XuiteIE
|
||||||
|
36
youtube_dl/extractor/xruniversity.py
Normal file
36
youtube_dl/extractor/xruniversity.py
Normal file
@ -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<id>[^/?#]+)'
|
||||||
|
_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'<h1 class="entry-title">(.+?)</h1>', webpage, 'title')
|
||||||
|
hoster_video_id = self._html_search_regex(r'<iframe id="vzvd-(.+?)" class="video-player"', webpage, 'hoster_video_id')
|
||||||
|
video_url = "http://view.vzaar.com/"+hoster_video_id+"/video?origin=iframe"
|
||||||
|
thumbnail_url = self._html_search_regex(r'<h1 class="entry-title">(.+?)</h1>', webpage, 'thumbnail_url')
|
||||||
|
|
||||||
|
return {
|
||||||
|
'id': video_id,
|
||||||
|
'url': video_url,
|
||||||
|
'title': title,
|
||||||
|
'age_limit': 18,
|
||||||
|
'ext': 'mp4',
|
||||||
|
'language': 'en-US',
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user