]>
Raphaƫl G. Git Repositories - youtubedl/blob - youtube_dl/extractor/spankbang.py
1 from __future__
import unicode_literals
5 from . common
import InfoExtractor
6 from .. utils
import ExtractorError
9 class SpankBangIE ( InfoExtractor
):
10 _VALID_URL
= r
'https?://(?:(?:www|m|[a-z] {2} )\.)?spankbang\.com/(?P<id>[\da-z]+)/video'
12 'url' : 'http://spankbang.com/3vvn/video/fantasy+solo' ,
13 'md5' : '1cc433e1d6aa14bc376535b8679302f7' ,
17 'title' : 'fantasy solo' ,
18 'description' : 'Watch fantasy solo free HD porn video - 05 minutes - Babe,Masturbation,Solo,Toy - dillion harper masturbates on a bed free adult movies sexy clips.' ,
19 'thumbnail' : r
're:^https?://.*\.jpg$' ,
20 'uploader' : 'silly2587' ,
25 'url' : 'http://spankbang.com/1vt0/video/solvane+gangbang' ,
26 'only_matching' : True ,
29 'url' : 'http://spankbang.com/lklg/video/sex+with+anyone+wedding+edition+2' ,
30 'only_matching' : True ,
33 'url' : 'http://m.spankbang.com/1o2de/video/can+t+remember+her+name' ,
34 'only_matching' : True ,
37 def _real_extract ( self
, url
):
38 video_id
= self
._ match
_ id
( url
)
39 webpage
= self
._ download
_ webpage
( url
, video_id
)
41 if re
. search ( r
'<[^>]+\bid=["\' ] video_removed
', webpage):
43 ' Video
%s is not available
' % video_id, expected=True)
45 stream_key = self._html_search_regex(
46 r'''var\s+stream_key\s*=\s*[' "](.+?)['" ] ''',
47 webpage, 'stream key')
50 'url': 'http://spankbang.com/_ %s / %s /title/ %s p__mp4' % (video_id, stream_key, height),
52 'format_id': ' %s p' % height,
53 'height': int(height),
54 } for height in re.findall(r'<(?:span|li|p)[^>]+[qb]_(\d+)p', webpage)]
55 self._check_formats(formats, video_id)
56 self._sort_formats(formats)
58 title = self._html_search_regex(
59 r'(?s)<h1[^>]*>(.+?)</h1>', webpage, 'title')
60 description = self._og_search_description(webpage)
61 thumbnail = self._og_search_thumbnail(webpage)
62 uploader = self._search_regex(
63 r'class="user"[^>]*><img[^>]+>([^<]+)',
64 webpage, 'uploader', default=None)
66 age_limit = self._rta_search(webpage)
71 'description': description,
72 'thumbnail': thumbnail,
75 'age_limit': age_limit,