rename safe_int to parse_int; move parse_* to text module

This commit is contained in:
Mike Fährmann
2018-04-20 14:53:21 +02:00
parent ff643793bd
commit cc36f88586
37 changed files with 210 additions and 189 deletions

View File

@@ -9,7 +9,7 @@
"""Extract manga-chapters and entire manga from http://fanfox.net/"""
from .common import ChapterExtractor
from .. import text, util, exception
from .. import text, exception
import re
@@ -47,7 +47,7 @@ class MangafoxChapterExtractor(ChapterExtractor):
data["chapter_minor"] = match.group(4) or ""
data["manga"] = data["manga"].rpartition(" ")[0]
for key in ("sid", "cid", "count", "volume", "chapter"):
data[key] = util.safe_int(data[key])
data[key] = text.parse_int(data[key])
return data
def get_images(self, page):