From ca6ac4db6a27aa3108677b98bcc87d8d46b98cac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20F=C3=A4hrmann?= Date: Fri, 5 Oct 2018 21:09:16 +0200 Subject: [PATCH] fix 'content' tests --- gallery_dl/extractor/bobx.py | 4 ++-- gallery_dl/job.py | 5 +++-- test/test_results.py | 3 +-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/gallery_dl/extractor/bobx.py b/gallery_dl/extractor/bobx.py index 20d51812..1fef5145 100644 --- a/gallery_dl/extractor/bobx.py +++ b/gallery_dl/extractor/bobx.py @@ -93,8 +93,8 @@ class BobxIdolExtractor(BobxExtractor): """Extractor for an idol's image galleries on bobx.com""" subcategory = "idol" pattern = [r"(?:https?://)?(?:www\.)?bobx\.com/([^/]+/[^/?&#]+)/?$"] - test = [("http://www.bobx.com/idol/nashiko-momotsuki/", { - "url": "5e4b57f39dc1b59e80ffa29ca51b6469f13f564d", + test = [("http://www.bobx.com/idol/rin-okabe/", { + "url": "74d80bfcd53b738b31909bb42e5cc97c41b475b8", })] def __init__(self, match): diff --git a/gallery_dl/job.py b/gallery_dl/job.py index ad1ecd86..237a3f3d 100644 --- a/gallery_dl/job.py +++ b/gallery_dl/job.py @@ -433,7 +433,7 @@ class TestJob(DownloadJob): self.hash_content = hashlib.sha1() if content: self.fileobj = self.HashIO(self.hash_content) - self.get_downloader("http:")._check_extension = lambda a, b: None + self.get_downloader("http")._check_extension = lambda a, b: None def run(self): for msg in self.extractor: @@ -476,7 +476,8 @@ class TestJob(DownloadJob): def update_content(self, url): """Update the content hash""" if self.content: - self.get_downloader(url).download(url, self.fileobj) + scheme = url.partition(":")[0] + self.get_downloader(scheme).download(url, self.fileobj) class DataJob(Job): diff --git a/test/test_results.py b/test/test_results.py index 6e44eb44..3b5c71c7 100644 --- a/test/test_results.py +++ b/test/test_results.py @@ -23,8 +23,7 @@ TRAVIS_SKIP = { # temporary issues, etc. BROKEN = { - "seaotterscans", - "komikcast", + "gelbooru", # no API results }