]>
Raphaƫl G. Git Repositories - youtubedl/blob - youtube_dl/extractor/slutload.py
1 from __future__
import unicode_literals
5 from .common
import InfoExtractor
8 class SlutloadIE(InfoExtractor
):
9 _VALID_URL
= r
'^https?://(?:\w+\.)?slutload\.com/video/[^/]+/(?P<id>[^/]+)/?$'
11 'url': 'http://www.slutload.com/video/virginie-baisee-en-cam/TD73btpBqSxc/',
12 'md5': '868309628ba00fd488cf516a113fd717',
16 'title': 'virginie baisee en cam',
18 'thumbnail': r
're:https?://.*?\.jpg'
22 'url': 'http://mobile.slutload.com/video/masturbation-solo/fviFLmc6kzJ/',
23 'only_matching': True,
26 def _real_extract(self
, url
):
27 video_id
= self
._match
_id
(url
)
29 desktop_url
= re
.sub(r
'^(https?://)mobile\.', r
'\1', url
)
30 webpage
= self
._download
_webpage
(desktop_url
, video_id
)
32 video_title
= self
._html
_search
_regex
(r
'<h1><strong>([^<]+)</strong>',
33 webpage
, 'title').strip()
35 video_url
= self
._html
_search
_regex
(
36 r
'(?s)<div id="vidPlayer"\s+data-url="([^"]+)"',
38 thumbnail
= self
._html
_search
_regex
(
39 r
'(?s)<div id="vidPlayer"\s+.*?previewer-file="([^"]+)"',
40 webpage
, 'thumbnail', fatal
=False)
46 'thumbnail': thumbnail
,