diff --git a/gallery_dl/extractor/batoto.py b/gallery_dl/extractor/batoto.py index 03f103aa..331e9906 100644 --- a/gallery_dl/extractor/batoto.py +++ b/gallery_dl/extractor/batoto.py @@ -7,7 +7,7 @@ """Extractors for https://bato.to/""" from .common import Extractor, ChapterExtractor, MangaExtractor -from .. import text, util, exception +from .. import text, util BASE_PATTERN = (r"(?:https?://)?(" r"(?:ba|d|f|h|j|m|w)to\.to|" @@ -152,9 +152,9 @@ class BatotoMangaExtractor(BatotoBase, MangaExtractor): def chapters(self, page): extr = text.extract_from(page) - warning = extr(' class="alert alert-warning">', "<") + warning = extr(' class="alert alert-warning">', "") if warning: - raise exception.StopExtraction("'%s'", text.remove_html(warning)) + self.log.warning("'%s'", text.remove_html(warning)) data = { "manga_id": text.parse_int(self.manga_id), diff --git a/test/results/batoto.py b/test/results/batoto.py index 33d4a998..9b57d524 100644 --- a/test/results/batoto.py +++ b/test/results/batoto.py @@ -5,7 +5,6 @@ # published by the Free Software Foundation. from gallery_dl.extractor import batoto -from gallery_dl import exception __tests__ = ( { @@ -133,7 +132,21 @@ __tests__ = ( "#url" : "https://bato.to/title/134270-removed", "#comment" : "Deleted/removed manga", "#class" : batoto.BatotoMangaExtractor, - "#exception": exception.StopExtraction, + "#log" : "'This comic has been marked as deleted and the chapter list is not available.'", + "#count" : 0, +}, + +{ + "#url" : "https://mto.to/series/136193", + "#comment" : "uploader notice (#7657)", + "#category": ("", "batoto", "manga"), + "#class" : batoto.BatotoMangaExtractor, + "#log" : "'UPLOADER NOTICE - The comic was deleted off EbookRenta :/'", + "#urls" : ( + "https://mto.to/title/136193-botsuraku-sunzen-desunode-konyakusha-o-furikiro-to-omoimasu-official/2456573-ch_1", + "https://mto.to/title/136193-botsuraku-sunzen-desunode-konyakusha-o-furikiro-to-omoimasu-official/2713985-ch_2", + "https://mto.to/title/136193-botsuraku-sunzen-desunode-konyakusha-o-furikiro-to-omoimasu-official/2739046-ch_3", + ), }, {