fix 'content' tests

pull/133/head
Mike Fährmann 6 years ago
parent 188876d814
commit ca6ac4db6a
No known key found for this signature in database
GPG Key ID: 5680CA389D365A88

@ -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):

@ -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):

@ -23,8 +23,7 @@ TRAVIS_SKIP = {
# temporary issues, etc.
BROKEN = {
"seaotterscans",
"komikcast",
"gelbooru", # no API results
}

Loading…
Cancel
Save