fix util.parse_bytes invocations
(should be text.parse_bytes)
This commit is contained in:
@@ -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]),
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -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]),
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user