1 from __future__ import unicode_literals
3 from .common import InfoExtractor
6 class SlutloadIE(InfoExtractor):
7 _VALID_URL = r'https?://(?:\w+\.)?slutload\.com/(?:video/[^/]+|embed_player|watch)/(?P<id>[^/]+)'
9 'url': 'http://www.slutload.com/video/virginie-baisee-en-cam/TD73btpBqSxc/',
10 'md5': '868309628ba00fd488cf516a113fd717',
14 'title': 'virginie baisee en cam',
16 'thumbnail': r're:https?://.*?\.jpg'
20 'url': 'http://mobile.slutload.com/video/masturbation-solo/fviFLmc6kzJ/',
21 'only_matching': True,
23 'url': 'http://www.slutload.com/embed_player/TD73btpBqSxc/',
24 'only_matching': True,
26 'url': 'http://www.slutload.com/watch/TD73btpBqSxc/Virginie-Baisee-En-Cam.html',
27 'only_matching': True,
30 def _real_extract(self, url):
31 video_id = self._match_id(url)
33 embed_page = self._download_webpage(
34 'http://www.slutload.com/embed_player/%s' % video_id, video_id,
35 'Downloading embed page', fatal=False)
39 return self._html_search_regex(
40 r'data-video-%s=(["\'])(?P<url>(?:(?!\1).)+)\1' % what,
41 embed_page, 'video %s' % what, default=None, group='url')
43 video_url = extract('url')
45 title = self._html_search_regex(
46 r'<title>([^<]+)', embed_page, 'title', default=video_id)
51 'thumbnail': extract('preview'),
55 webpage = self._download_webpage(
56 'http://www.slutload.com/video/_/%s/' % video_id, video_id)
57 title = self._html_search_regex(
58 r'<h1><strong>([^<]+)</strong>', webpage, 'title').strip()
59 info = self._parse_html5_media_entries(url, webpage, video_id)[0]