From e0b9d47387327fb8d25d5bb2f2f4f80a3b77a4a8 Mon Sep 17 00:00:00 2001 From: 5moufl Date: Thu, 11 Dec 2014 14:25:26 +0100 Subject: [PATCH 1/4] [BehindKink] Update URL extraction --- youtube_dl/extractor/behindkink.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/youtube_dl/extractor/behindkink.py b/youtube_dl/extractor/behindkink.py index 31fdc0dcc..84d8ef849 100644 --- a/youtube_dl/extractor/behindkink.py +++ b/youtube_dl/extractor/behindkink.py @@ -34,8 +34,7 @@ class BehindKinkIE(InfoExtractor): webpage = self._download_webpage(url, display_id) video_url = self._search_regex( - r"'file':\s*'([^']+)'", - webpage, 'URL base') + r'', webpage, 'video URL') video_id = url_basename(video_url) video_id = video_id.split('_')[0] From d6f78a354d77d32c9929ca99cb82d49aa7d7f8ab Mon Sep 17 00:00:00 2001 From: 5moufl Date: Thu, 11 Dec 2014 14:26:59 +0100 Subject: [PATCH 2/4] [BehindKink] Replace test Old one is not accessible anymore --- youtube_dl/extractor/behindkink.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/youtube_dl/extractor/behindkink.py b/youtube_dl/extractor/behindkink.py index 84d8ef849..9e4f1c90f 100644 --- a/youtube_dl/extractor/behindkink.py +++ b/youtube_dl/extractor/behindkink.py @@ -10,15 +10,15 @@ from ..utils import url_basename class BehindKinkIE(InfoExtractor): _VALID_URL = r'http://(?:www\.)?behindkink\.com/(?P[0-9]{4})/(?P[0-9]{2})/(?P[0-9]{2})/(?P[^/#?_]+)' _TEST = { - 'url': 'http://www.behindkink.com/2014/08/14/ab1576-performers-voice-finally-heard-the-bill-is-killed/', - 'md5': '41ad01222b8442089a55528fec43ec01', + 'url': 'http://www.behindkink.com/2014/12/05/what-are-you-passionate-about-marley-blaze/', + 'md5': '507b57d8fdcd75a41a9a7bdb7989c762', 'info_dict': { - 'id': '36370', + 'id': '37127', 'ext': 'mp4', - 'title': 'AB1576 - PERFORMERS VOICE FINALLY HEARD - THE BILL IS KILLED!', - 'description': 'The adult industry voice was finally heard as Assembly Bill 1576 remained\xa0 in suspense today at the Senate Appropriations Hearing. AB1576 was, among other industry damaging issues, a condom mandate...', - 'upload_date': '20140814', - 'thumbnail': 'http://www.behindkink.com/wp-content/uploads/2014/08/36370_AB1576_Win.jpg', + 'title': 'What are you passionate about – Marley Blaze', + 'description': 'Getting a better understanding of the talent that comes through the doors of the Armory is one of our missions at Behind Kink. Asking the question what are you passionate about helps us get a littl...', + 'upload_date': '20141205', + 'thumbnail': 'http://www.behindkink.com/wp-content/uploads/2014/12/blaze-1.jpg', 'age_limit': 18, } } From 09c82fbc9a6fc4c5dbb3b84031f31b39e1f9cee2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergey=20M=E2=80=A4?= Date: Thu, 11 Dec 2014 20:06:19 +0600 Subject: [PATCH 3/4] [behindkink] Simplify --- youtube_dl/extractor/behindkink.py | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/youtube_dl/extractor/behindkink.py b/youtube_dl/extractor/behindkink.py index 9e4f1c90f..8c947526f 100644 --- a/youtube_dl/extractor/behindkink.py +++ b/youtube_dl/extractor/behindkink.py @@ -16,7 +16,7 @@ class BehindKinkIE(InfoExtractor): 'id': '37127', 'ext': 'mp4', 'title': 'What are you passionate about – Marley Blaze', - 'description': 'Getting a better understanding of the talent that comes through the doors of the Armory is one of our missions at Behind Kink. Asking the question what are you passionate about helps us get a littl...', + 'description': 'md5:aee8e9611b4ff70186f752975d9b94b4', 'upload_date': '20141205', 'thumbnail': 'http://www.behindkink.com/wp-content/uploads/2014/12/blaze-1.jpg', 'age_limit': 18, @@ -26,25 +26,19 @@ class BehindKinkIE(InfoExtractor): def _real_extract(self, url): mobj = re.match(self._VALID_URL, url) display_id = mobj.group('id') - year = mobj.group('year') - month = mobj.group('month') - day = mobj.group('day') - upload_date = year + month + day webpage = self._download_webpage(url, display_id) video_url = self._search_regex( - r'', webpage, 'video URL') - - video_id = url_basename(video_url) - video_id = video_id.split('_')[0] + r' Date: Thu, 11 Dec 2014 20:09:52 +0600 Subject: [PATCH 4/4] [behindkink] Remove superfluous whitespace --- youtube_dl/extractor/behindkink.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/youtube_dl/extractor/behindkink.py b/youtube_dl/extractor/behindkink.py index 8c947526f..1bdc25812 100644 --- a/youtube_dl/extractor/behindkink.py +++ b/youtube_dl/extractor/behindkink.py @@ -31,7 +31,7 @@ class BehindKinkIE(InfoExtractor): video_url = self._search_regex( r'