fix util.parse_bytes invocations

(should be text.parse_bytes)
This commit is contained in:
Mike Fährmann
2018-05-10 22:07:55 +02:00
parent 1c1e086d01
commit 7a58151566
2 changed files with 4 additions and 4 deletions

View File

@@ -164,7 +164,7 @@ class ExhentaiGalleryExtractor(ExhentaiExtractor):
data["title"] = text.unescape(data["title"])
data["title_jp"] = text.unescape(data["title_jp"])
data["count"] = text.parse_int(data["count"])
data["gallery_size"] = util.parse_bytes(
data["gallery_size"] = text.parse_bytes(
data["gallery_size"].rstrip("Bb"))
return data
@@ -256,7 +256,7 @@ class ExhentaiGalleryExtractor(ExhentaiExtractor):
return {
"width": text.parse_int(parts[0]),
"height": text.parse_int(parts[2]),
"size": util.parse_bytes(parts[3] + parts[4][0]),
"size": text.parse_bytes(parts[3] + parts[4][0]),
}

View File

@@ -9,7 +9,7 @@
"""Extract images from http://rule34.paheal.net/"""
from .common import SharedConfigExtractor, Message
from .. import text, util
from .. import text
class PahealExtractor(SharedConfigExtractor):
@@ -85,7 +85,7 @@ class PahealTagExtractor(PahealExtractor):
return {
"id": pid, "md5": md5, "tags": tags, "file_url": url,
"width": width, "height": height,
"size": util.parse_bytes(size[:-1]),
"size": text.parse_bytes(size[:-1]),
}