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

@@ -9,8 +9,7 @@
"""Extractors for https://hentai2read.com/"""
from .common import ChapterExtractor, MangaExtractor
from .. import text
import json
from .. import text, util
import re
@@ -78,7 +77,7 @@ class Hentai2readChapterExtractor(Hentai2readBase, ChapterExtractor):
images = text.extract(page, "'images' : ", ",\n")[0]
return [
("https://hentaicdn.com/hentai" + part, None)
for part in json.loads(images)
for part in util.json_loads(images)
]