[xvx] Add new extractor

This commit is contained in:
devnomnom 2015-06-20 07:17:57 -04:00
parent 16d6973f8a
commit a0163ce899
2 changed files with 41 additions and 0 deletions

View File

@ -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,

View 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
}