update error message for unspecified exceptions
- ask user to report unexpected errors, which usually indicate
extractor failure
- handle OSErrors separately (permissions, disk full, etc)
- revert 30eef52
This commit is contained in:
@@ -17,7 +17,6 @@ class JaiminisboxChapterExtractor(foolslide.FoolslideChapterExtractor):
|
|||||||
pattern = foolslide.chapter_pattern(r"(?:www\.)?jaiminisbox\.com/reader")
|
pattern = foolslide.chapter_pattern(r"(?:www\.)?jaiminisbox\.com/reader")
|
||||||
test = [
|
test = [
|
||||||
("https://jaiminisbox.com/reader/read/uratarou/en/0/1/", {
|
("https://jaiminisbox.com/reader/read/uratarou/en/0/1/", {
|
||||||
"url": "f021de7f31ee3a3f688fdf3e8183aef4226c2b50",
|
|
||||||
"keyword": "d187df3e3b6dbe09ec163626f6fd7c57133ab163",
|
"keyword": "d187df3e3b6dbe09ec163626f6fd7c57133ab163",
|
||||||
}),
|
}),
|
||||||
("https://jaiminisbox.com/reader/read/dr-stone/en/0/16/", {
|
("https://jaiminisbox.com/reader/read/dr-stone/en/0/16/", {
|
||||||
|
|||||||
@@ -74,8 +74,7 @@ class SeigaUserExtractor(SeigaExtractor):
|
|||||||
r"user/illust/(\d+)")]
|
r"user/illust/(\d+)")]
|
||||||
test = [
|
test = [
|
||||||
("http://seiga.nicovideo.jp/user/illust/39537793", {
|
("http://seiga.nicovideo.jp/user/illust/39537793", {
|
||||||
"keyword": "66b3309484417fb5e76b72d5bd64526fa5d9b6a3",
|
"keyword": "15e4158164f9309c75c0f97169e0026b13a642ed",
|
||||||
"content": "40dc3b454d429108cb834b9e449229231010ddfa",
|
|
||||||
}),
|
}),
|
||||||
("http://seiga.nicovideo.jp/user/illust/79433", {
|
("http://seiga.nicovideo.jp/user/illust/79433", {
|
||||||
"url": "da39a3ee5e6b4b0d3255bfef95601890afd80709",
|
"url": "da39a3ee5e6b4b0d3255bfef95601890afd80709",
|
||||||
|
|||||||
@@ -56,15 +56,15 @@ class Job():
|
|||||||
log.error("HTTP request failed:\n%s", exc)
|
log.error("HTTP request failed:\n%s", exc)
|
||||||
except exception.StopExtraction:
|
except exception.StopExtraction:
|
||||||
pass
|
pass
|
||||||
|
except OSError as exc:
|
||||||
|
log.error("Unable to download data: %s", exc)
|
||||||
except Exception as exc:
|
except Exception as exc:
|
||||||
msg = "An unexpected error occurred:"
|
log.error(("An unexpected error occurred: %s - %s. "
|
||||||
try:
|
"Please run gallery-dl again with the --verbose flag, "
|
||||||
err = ": ".join(exc.args[0].reason.args[0].split(": ")[1:])
|
"copy its output and report this issue on "
|
||||||
log.error("%s: %s - %s", msg, exc.__class__.__name__, err)
|
"https://github.com/mikf/gallery-dl/issues ."),
|
||||||
return
|
exc.__class__.__name__, exc)
|
||||||
except Exception:
|
log.debug("Traceback", exc_info=True)
|
||||||
pass
|
|
||||||
log.error(msg, exc_info=True)
|
|
||||||
|
|
||||||
def dispatch(self, msg):
|
def dispatch(self, msg):
|
||||||
"""Call the appropriate message handler"""
|
"""Call the appropriate message handler"""
|
||||||
|
|||||||
Reference in New Issue
Block a user