replace json.loads with direct calls to JSONDecoder.decode

This commit is contained in:
Mike Fährmann
2023-02-07 23:14:53 +01:00
parent b7337d810e
commit dd884b02ee
42 changed files with 117 additions and 154 deletions

View File

@@ -6,11 +6,10 @@
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
"""Extract manga-chapters from https://www.fascans.com/"""
"""Extractors for https://www.fascans.com/"""
from .common import ChapterExtractor, MangaExtractor
from .. import text, util
import json
class FallenangelsChapterExtractor(ChapterExtractor):
@@ -56,7 +55,7 @@ class FallenangelsChapterExtractor(ChapterExtractor):
def images(page):
return [
(img["page_image"], None)
for img in json.loads(
for img in util.json_loads(
text.extr(page, "var pages = ", ";")
)
]