]>
Raphaƫl G. Git Repositories - youtubedl/blob - youtube_dl/extractor/sexykarma.py
6446d26dc416703da688386a578f904d24b102a4
2 from __future__
import unicode_literals
6 from .common
import InfoExtractor
14 class SexyKarmaIE(InfoExtractor
):
15 IE_DESC
= 'Sexy Karma and Watch Indian Porn'
16 _VALID_URL
= r
'https?://(?:www\.)?(?:sexykarma\.com|watchindianporn\.net)/(?:[^/]+/)*video/(?P<display_id>[^/]+)-(?P<id>[a-zA-Z0-9]+)\.html'
18 'url': 'http://www.sexykarma.com/gonewild/video/taking-a-quick-pee-yHI70cOyIHt.html',
19 'md5': 'b9798e7d1ef1765116a8f516c8091dbd',
22 'display_id': 'taking-a-quick-pee',
24 'title': 'Taking a quick pee.',
25 'thumbnail': 're:^https?://.*\.jpg$',
26 'uploader': 'wildginger7',
27 'upload_date': '20141008',
34 'url': 'http://www.sexykarma.com/gonewild/video/pot-pixie-tribute-8Id6EZPbuHf.html',
35 'md5': 'dd216c68d29b49b12842b9babe762a5d',
38 'display_id': 'pot-pixie-tribute',
40 'title': 'pot_pixie tribute',
41 'thumbnail': 're:^https?://.*\.jpg$',
42 'uploader': 'banffite',
43 'upload_date': '20141013',
51 'url': 'http://www.watchindianporn.net/video/desi-dancer-namrata-stripping-completely-nude-and-dancing-on-a-hot-number-dW2mtctxJfs.html',
52 'md5': '9afb80675550406ed9a63ac2819ef69d',
55 'display_id': 'desi-dancer-namrata-stripping-completely-nude-and-dancing-on-a-hot-number',
57 'title': 'Desi dancer namrata stripping completely nude and dancing on a hot number',
58 'thumbnail': 're:^https?://.*\.jpg$',
60 'upload_date': '20140213',
69 def _real_extract(self
, url
):
70 mobj
= re
.match(self
._VALID
_URL
, url
)
71 video_id
= mobj
.group('id')
72 display_id
= mobj
.group('display_id')
74 webpage
= self
._download
_webpage
(url
, display_id
)
76 video_url
= self
._html
_search
_regex
(
77 r
"url: escape\('([^']+)'\)", webpage
, 'url')
79 title
= self
._html
_search
_regex
(
80 r
'<h2 class="he2"><span>(.*?)</span>',
82 thumbnail
= self
._html
_search
_regex
(
83 r
'<span id="container"><img\s+src="([^"]+)"',
84 webpage
, 'thumbnail', fatal
=False)
86 uploader
= self
._html
_search
_regex
(
87 r
'class="aupa">\s*(.*?)</a>',
89 upload_date
= unified_strdate(self
._html
_search
_regex
(
90 r
'Added: <strong>(.+?)</strong>', webpage
, 'upload date', fatal
=False))
92 duration
= parse_duration(self
._search
_regex
(
93 r
'<td>Time:\s*</td>\s*<td align="right"><span>\s*(.+?)\s*</span>',
94 webpage
, 'duration', fatal
=False))
96 view_count
= int_or_none(self
._search
_regex
(
97 r
'<td>Views:\s*</td>\s*<td align="right"><span>\s*(\d+)\s*</span>',
98 webpage
, 'view count', fatal
=False))
99 comment_count
= int_or_none(self
._search
_regex
(
100 r
'<td>Comments:\s*</td>\s*<td align="right"><span>\s*(\d+)\s*</span>',
101 webpage
, 'comment count', fatal
=False))
103 categories
= re
.findall(
104 r
'<a href="[^"]+/search/video/desi"><span>([^<]+)</span></a>',
109 'display_id': display_id
,
112 'thumbnail': thumbnail
,
113 'uploader': uploader
,
114 'upload_date': upload_date
,
115 'duration': duration
,
116 'view_count': view_count
,
117 'comment_count': comment_count
,
118 'categories': categories
,