]>
Raphaƫl G. Git Repositories - youtubedl/blob - youtube_dl/extractor/spankbang.py
3394c7e6ba4713ad0c63e2579d611a0319c45add
1 from __future__
import unicode_literals
5 from .common
import InfoExtractor
8 class SpankBangIE(InfoExtractor
):
9 _VALID_URL
= r
'https?://(?:(?:www|[a-z]{2})\.)?spankbang\.com/(?P<id>[\da-z]+)/video'
11 'url': 'http://spankbang.com/3vvn/video/fantasy+solo',
12 'md5': '1cc433e1d6aa14bc376535b8679302f7',
16 'title': 'fantasy solo',
17 'description': 'Watch fantasy solo free HD porn video - 05 minutes - dillion harper masturbates on a bed free adult movies.',
18 'thumbnail': r
're:^https?://.*\.jpg$',
19 'uploader': 'silly2587',
24 'url': 'http://spankbang.com/1vt0/video/solvane+gangbang',
25 'only_matching': True,
28 'url': 'http://spankbang.com/lklg/video/sex+with+anyone+wedding+edition+2',
29 'only_matching': True,
32 def _real_extract(self
, url
):
33 video_id
= self
._match
_id
(url
)
34 webpage
= self
._download
_webpage
(url
, video_id
)
36 stream_key
= self
._html
_search
_regex
(
37 r
'''var\s+stream_key\s*=\s*['"](.+?)['"]''',
38 webpage
, 'stream key')
41 'url': 'http://spankbang.com/_%s/%s/title/%sp__mp4' % (video_id
, stream_key
, height
),
43 'format_id': '%sp' % height
,
44 'height': int(height
),
45 } for height
in re
.findall(r
'<(?:span|li|p)[^>]+[qb]_(\d+)p', webpage
)]
46 self
._check
_formats
(formats
, video_id
)
47 self
._sort
_formats
(formats
)
49 title
= self
._html
_search
_regex
(
50 r
'(?s)<h1[^>]*>(.+?)</h1>', webpage
, 'title')
51 description
= self
._og
_search
_description
(webpage
)
52 thumbnail
= self
._og
_search
_thumbnail
(webpage
)
53 uploader
= self
._search
_regex
(
54 r
'class="user"[^>]*><img[^>]+>([^<]+)',
55 webpage
, 'uploader', default
=None)
57 age_limit
= self
._rta
_search
(webpage
)
62 'description': description
,
63 'thumbnail': thumbnail
,
66 'age_limit': age_limit
,