From 1476b497ebda9155d442065bb2a987d86c29026f Mon Sep 17 00:00:00 2001 From: hojel Date: Mon, 12 May 2014 01:28:56 -0700 Subject: [PATCH 1/2] [slutload] Add new extractor --- youtube_dl/extractor/slutload.py | 46 ++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 youtube_dl/extractor/slutload.py diff --git a/youtube_dl/extractor/slutload.py b/youtube_dl/extractor/slutload.py new file mode 100644 index 000000000..095adfc15 --- /dev/null +++ b/youtube_dl/extractor/slutload.py @@ -0,0 +1,46 @@ +import re + +from .common import InfoExtractor +from ..utils import ( + ExtractorError, +) + +class SlutloadIE(InfoExtractor): + _VALID_URL = r'^https?://(?:\w+\.)?slutload\.com/video/[^/]+/(?P[^/]+)/?$' + _TEST = { + u'url': u'http://www.slutload.com/video/virginie-baisee-en-cam/TD73btpBqSxc/', + u'file': u'TD73btpBqSxc.mp4', + u'md5': u'0cf531ae8006b530bd9df947a6a0df77', + u'info_dict': { + u"title": u"virginie baisee en cam", + u"age_limit": 18, + } + } + + def _real_extract(self, url): + mobj = re.match(self._VALID_URL, url) + + video_id = mobj.group('videoid') + + # Get webpage content + webpage = self._download_webpage(url, video_id) + + # Get the video title + video_title = self._html_search_regex(r'

([^<]+)', + webpage, u'title').strip() + + # Get the video url + result = re.compile(r'
Date: Mon, 12 May 2014 01:29:19 -0700 Subject: [PATCH 2/2] [slutload] Add new extractor --- youtube_dl/extractor/__init__.py | 1 + 1 file changed, 1 insertion(+) diff --git a/youtube_dl/extractor/__init__.py b/youtube_dl/extractor/__init__.py index 9529077c7..697bcab87 100644 --- a/youtube_dl/extractor/__init__.py +++ b/youtube_dl/extractor/__init__.py @@ -230,6 +230,7 @@ from .scivee import SciVeeIE from .servingsys import ServingSysIE from .sina import SinaIE from .slideshare import SlideshareIE +from .slutload import SlutloadIE from .smotri import ( SmotriIE, SmotriCommunityIE,