[mangafox] raise proper exception if chapter is not available
This commit is contained in:
@@ -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),
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user