diff options
author | Dankryn <dankryn@weg-werf-email.de> | 2016-01-11 21:17:30 +0100 |
---|---|---|
committer | Sergey M․ <dstftw@gmail.com> | 2016-01-23 00:13:27 +0600 |
commit | 1257b049bcd9857e2993a4366af41219c36baa3e (patch) | |
tree | 469e755af34561cb3ca93fbe16f61f849e6a2240 /youtube_dl/extractor/ruleporn.py | |
parent | b9698135480e156c89b30b4da60df1aae1c2a660 (diff) |
[ruleporn] Add new extractor
Diffstat (limited to 'youtube_dl/extractor/ruleporn.py')
-rw-r--r-- | youtube_dl/extractor/ruleporn.py | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/youtube_dl/extractor/ruleporn.py b/youtube_dl/extractor/ruleporn.py new file mode 100644 index 000000000..9e6a9125a --- /dev/null +++ b/youtube_dl/extractor/ruleporn.py @@ -0,0 +1,31 @@ +# coding: utf-8 +from __future__ import unicode_literals + +from .common import InfoExtractor + + +class RulepornIE(InfoExtractor): + _VALID_URL = r'https?://(?:www\.)?ruleporn\.com/(?:[a-z]+(?:-[a-z]+)+)' + _TEST = { + 'url': 'http://ruleporn.com/brunette-nympho-chick-takes-her-boyfriend-in-every-angle/', + 'md5': '86861ebc624a1097c7c10eaf06d7d505', + 'info_dict': { + 'id': '48212', + 'ext': 'mp4', + 'title': 'Brunette Nympho Chick Takes Her Boyfriend In Every Angle', + } + } + + def _real_extract(self, url): + webpage = self._download_webpage(url, None) + + video_id = self._search_regex(r'http://lovehomeporn.com/embed/([0-9]+)', webpage, 'video_id', fatal=True) + title = self._search_regex(r'<h2 title="((?:\w|\s|\d)+)">', webpage, 'title', fatal=True) + info_xml = self._download_xml('http://lovehomeporn.com/media/nuevo/econfig.php?key=%s&rp=true' % video_id, video_id) + url = info_xml.find('file').text + + return { + 'id': video_id, + 'title': title, + 'url': url, + } |