fix 'content' tests
This commit is contained in:
@@ -93,8 +93,8 @@ class BobxIdolExtractor(BobxExtractor):
|
|||||||
"""Extractor for an idol's image galleries on bobx.com"""
|
"""Extractor for an idol's image galleries on bobx.com"""
|
||||||
subcategory = "idol"
|
subcategory = "idol"
|
||||||
pattern = [r"(?:https?://)?(?:www\.)?bobx\.com/([^/]+/[^/?&#]+)/?$"]
|
pattern = [r"(?:https?://)?(?:www\.)?bobx\.com/([^/]+/[^/?&#]+)/?$"]
|
||||||
test = [("http://www.bobx.com/idol/nashiko-momotsuki/", {
|
test = [("http://www.bobx.com/idol/rin-okabe/", {
|
||||||
"url": "5e4b57f39dc1b59e80ffa29ca51b6469f13f564d",
|
"url": "74d80bfcd53b738b31909bb42e5cc97c41b475b8",
|
||||||
})]
|
})]
|
||||||
|
|
||||||
def __init__(self, match):
|
def __init__(self, match):
|
||||||
|
|||||||
@@ -433,7 +433,7 @@ class TestJob(DownloadJob):
|
|||||||
self.hash_content = hashlib.sha1()
|
self.hash_content = hashlib.sha1()
|
||||||
if content:
|
if content:
|
||||||
self.fileobj = self.HashIO(self.hash_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):
|
def run(self):
|
||||||
for msg in self.extractor:
|
for msg in self.extractor:
|
||||||
@@ -476,7 +476,8 @@ class TestJob(DownloadJob):
|
|||||||
def update_content(self, url):
|
def update_content(self, url):
|
||||||
"""Update the content hash"""
|
"""Update the content hash"""
|
||||||
if self.content:
|
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):
|
class DataJob(Job):
|
||||||
|
|||||||
@@ -23,8 +23,7 @@ TRAVIS_SKIP = {
|
|||||||
|
|
||||||
# temporary issues, etc.
|
# temporary issues, etc.
|
||||||
BROKEN = {
|
BROKEN = {
|
||||||
"seaotterscans",
|
"gelbooru", # no API results
|
||||||
"komikcast",
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user