From 58ae24336a0177567ac142734ca8f302f019107b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergey=20M=E2=80=A4?= Date: Fri, 5 Feb 2016 22:16:12 +0600 Subject: [PATCH 1/3] [spankbang] Extend format id regex (Closes #8398) --- youtube_dl/extractor/spankbang.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/youtube_dl/extractor/spankbang.py b/youtube_dl/extractor/spankbang.py index 3cfa671ed..b14c01230 100644 --- a/youtube_dl/extractor/spankbang.py +++ b/youtube_dl/extractor/spankbang.py @@ -34,7 +34,7 @@ class SpankBangIE(InfoExtractor): 'ext': 'mp4', 'format_id': '%sp' % height, 'height': int(height), - } for height in re.findall(r'<(?:span|li)[^>]+q_(\d+)p', webpage)] + } for height in re.findall(r'<(?:span|li|p)[^>]+[qb]_(\d+)p', webpage)] self._sort_formats(formats) title = self._html_search_regex( From c773c232d80580c6662b5c957c830f75ccbb766b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergey=20M=E2=80=A4?= Date: Fri, 5 Feb 2016 22:16:40 +0600 Subject: [PATCH 2/3] [spankbang] Check formats (#8398) --- youtube_dl/extractor/spankbang.py | 1 + 1 file changed, 1 insertion(+) diff --git a/youtube_dl/extractor/spankbang.py b/youtube_dl/extractor/spankbang.py index b14c01230..6299bfd91 100644 --- a/youtube_dl/extractor/spankbang.py +++ b/youtube_dl/extractor/spankbang.py @@ -35,6 +35,7 @@ class SpankBangIE(InfoExtractor): 'format_id': '%sp' % height, 'height': int(height), } for height in re.findall(r'<(?:span|li|p)[^>]+[qb]_(\d+)p', webpage)] + self._check_formats(formats, video_id) self._sort_formats(formats) title = self._html_search_regex( From d9e543b68030c8bd24d1b0352938d54312823345 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergey=20M=E2=80=A4?= Date: Fri, 5 Feb 2016 22:16:56 +0600 Subject: [PATCH 3/3] [spankbang] Add test with single format (#8398) --- youtube_dl/extractor/spankbang.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/youtube_dl/extractor/spankbang.py b/youtube_dl/extractor/spankbang.py index 6299bfd91..50433d0f6 100644 --- a/youtube_dl/extractor/spankbang.py +++ b/youtube_dl/extractor/spankbang.py @@ -7,7 +7,7 @@ from .common import InfoExtractor class SpankBangIE(InfoExtractor): _VALID_URL = r'https?://(?:(?:www|[a-z]{2})\.)?spankbang\.com/(?P[\da-z]+)/video' - _TEST = { + _TESTS = [{ 'url': 'http://spankbang.com/3vvn/video/fantasy+solo', 'md5': '1cc433e1d6aa14bc376535b8679302f7', 'info_dict': { @@ -19,7 +19,11 @@ class SpankBangIE(InfoExtractor): 'uploader': 'silly2587', 'age_limit': 18, } - } + }, { + # 480p only + 'url': 'http://spankbang.com/1vt0/video/solvane+gangbang', + 'only_matching': True, + }] def _real_extract(self, url): video_id = self._match_id(url)