X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=youtube_dl%2Fextractor%2Fsexykarma.py;h=6446d26dc416703da688386a578f904d24b102a4;hb=d7d2a9a3dbf1cef78c5085a4aab5d2f336c64cff;hp=4a6345758a891f293caeb2f661d213e6a2ff9a80;hpb=95fa5fb569c9a29d1dfb7da744022373d279fcb7;p=youtube-dl diff --git a/youtube_dl/extractor/sexykarma.py b/youtube_dl/extractor/sexykarma.py index 4a6345758..6446d26dc 100644 --- a/youtube_dl/extractor/sexykarma.py +++ b/youtube_dl/extractor/sexykarma.py @@ -12,7 +12,8 @@ from ..utils import ( class SexyKarmaIE(InfoExtractor): - _VALID_URL = r'https?://(?:www\.)?sexykarma\.com/gonewild/video/(?P[^/]+)-(?P[a-zA-Z0-9]+)\.html' + IE_DESC = 'Sexy Karma and Watch Indian Porn' + _VALID_URL = r'https?://(?:www\.)?(?:sexykarma\.com|watchindianporn\.net)/(?:[^/]+/)*video/(?P[^/]+)-(?P[a-zA-Z0-9]+)\.html' _TESTS = [{ 'url': 'http://www.sexykarma.com/gonewild/video/taking-a-quick-pee-yHI70cOyIHt.html', 'md5': 'b9798e7d1ef1765116a8f516c8091dbd', @@ -21,11 +22,10 @@ class SexyKarmaIE(InfoExtractor): 'display_id': 'taking-a-quick-pee', 'ext': 'mp4', 'title': 'Taking a quick pee.', - 'description': '', 'thumbnail': 're:^https?://.*\.jpg$', 'uploader': 'wildginger7', - 'upload_date': '20141007', - 'duration': 81, + 'upload_date': '20141008', + 'duration': 22, 'view_count': int, 'comment_count': int, 'categories': list, @@ -38,7 +38,6 @@ class SexyKarmaIE(InfoExtractor): 'display_id': 'pot-pixie-tribute', 'ext': 'mp4', 'title': 'pot_pixie tribute', - 'description': 'tribute', 'thumbnail': 're:^https?://.*\.jpg$', 'uploader': 'banffite', 'upload_date': '20141013', @@ -46,6 +45,24 @@ class SexyKarmaIE(InfoExtractor): 'view_count': int, 'comment_count': int, 'categories': list, + 'age_limit': 18, + } + }, { + 'url': 'http://www.watchindianporn.net/video/desi-dancer-namrata-stripping-completely-nude-and-dancing-on-a-hot-number-dW2mtctxJfs.html', + 'md5': '9afb80675550406ed9a63ac2819ef69d', + 'info_dict': { + 'id': 'dW2mtctxJfs', + 'display_id': 'desi-dancer-namrata-stripping-completely-nude-and-dancing-on-a-hot-number', + 'ext': 'mp4', + 'title': 'Desi dancer namrata stripping completely nude and dancing on a hot number', + 'thumbnail': 're:^https?://.*\.jpg$', + 'uploader': 'Don', + 'upload_date': '20140213', + 'duration': 83, + 'view_count': int, + 'comment_count': int, + 'categories': list, + 'age_limit': 18, } }] @@ -57,14 +74,11 @@ class SexyKarmaIE(InfoExtractor): webpage = self._download_webpage(url, display_id) video_url = self._html_search_regex( - r'

Save this video to your computer:

(.*?)', webpage, 'title') - description = self._html_search_meta( - 'description', webpage, 'description', fatal=False, default='') thumbnail = self._html_search_regex( r'Comments:\s*\s*\s*(\d+)\s*', webpage, 'comment count', fatal=False)) - categories = self._html_search_meta( - 'keywords', webpage, 'categories', - fatal=False, default='').split(',') + categories = re.findall( + r'([^<]+)', + webpage) return { 'id': video_id, 'display_id': display_id, 'url': video_url, 'title': title, - 'description': description, 'thumbnail': thumbnail, 'uploader': uploader, 'upload_date': upload_date, @@ -103,4 +116,5 @@ class SexyKarmaIE(InfoExtractor): 'view_count': view_count, 'comment_count': comment_count, 'categories': categories, + 'age_limit': 18, }