[mangafox] raise proper exception if chapter is not available

This commit is contained in:
Mike Fährmann
2017-01-14 22:11:47 +01:00
parent 98fa5cf2fa
commit 434ef4d5a2
2 changed files with 4 additions and 2 deletions

View File

@@ -9,7 +9,7 @@
"""Extract manga-chapters and entire manga from http://www.mangafox.me/"""
from .common import AsynchronousExtractor, Message
from .. import text
from .. import text, exception
import re
@@ -32,6 +32,8 @@ class MangafoxChapterExtractor(AsynchronousExtractor):
def items(self):
page = self.request(self.url + "/1.html").text
if "Sorry, its licensed, and not available." in page:
raise exception.AuthorizationError()
data = self.get_metadata(page)
urls = zip(
range(1, int(data["count"])+1),

View File

@@ -55,7 +55,7 @@ if __name__ == '__main__' and len(sys.argv) > 1:
]
del sys.argv[1:]
skip = ["exhentai", "kissmanga"]
skip = ["exhentai", "kissmanga", "mangafox"]
for extr in extractors:
if extr.category in skip:
continue