[xvx] Add new extractor
This commit is contained in:
parent
16d6973f8a
commit
a0163ce899
@ -704,6 +704,7 @@ from .xstream import XstreamIE
|
||||
from .xtube import XTubeUserIE, XTubeIE
|
||||
from .xuite import XuiteIE
|
||||
from .xvideos import XVideosIE
|
||||
from .xvx import XVXIE
|
||||
from .xxxymovies import XXXYMoviesIE
|
||||
from .yahoo import (
|
||||
YahooIE,
|
||||
|
40
youtube_dl/extractor/xvx.py
Normal file
40
youtube_dl/extractor/xvx.py
Normal file
@ -0,0 +1,40 @@
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import re
|
||||
|
||||
from .common import InfoExtractor
|
||||
from ..compat import (
|
||||
compat_urllib_request,
|
||||
compat_urlparse
|
||||
)
|
||||
|
||||
class XVXIE(InfoExtractor):
|
||||
_VALID_URL =r'(?:https?://)?(?:www\.)?xvx\.so/view/(?P<id>\d+)'
|
||||
_TEST = {
|
||||
'url': 'http://xvx.so/view/205728768',
|
||||
'md5': '1befd4eff6bb71b1abbafbfa46333153',
|
||||
'info_dict': {
|
||||
'id': '205728768',
|
||||
'ext': 'flv',
|
||||
'title': 'Brazzers - Undersecretary',
|
||||
'age_limit': 18
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
def _real_extract(self, url):
|
||||
mobj = re.match(self._VALID_URL, url)
|
||||
|
||||
video_id = mobj.group('id')
|
||||
|
||||
webpage = self._download_webpage(url, video_id)
|
||||
|
||||
video_title = self._html_search_regex(r'<title>\s*(.*) watch online for free | xvx.so</title>', webpage, 'title')
|
||||
video_url = self._search_regex(r'video_url=(.+?)&', webpage, 'video url')
|
||||
|
||||
return {
|
||||
'id': video_id,
|
||||
'url': video_url,
|
||||
'title': video_title,
|
||||
'age_limit': 18
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user