Skip to content

Commit

Permalink
[exhentai] adjust image limit costs (#940)
Browse files Browse the repository at this point in the history
Each original file costs 10 points per 10^6 bytes,
not 10 per 2^20 == 1048576 bytes.
  • Loading branch information
mikf committed Aug 15, 2020
1 parent 2e6f6ee commit cd9de61
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions gallery_dl/extractor/exhentai.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-

# Copyright 2014-2019 Mike Fährmann
# Copyright 2014-2020 Mike Fährmann
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
Expand Down Expand Up @@ -123,7 +123,7 @@ class ExhentaiGalleryExtractor(ExhentaiExtractor):
r"|/s/([\da-f]{10})/(\d+)-(\d+))")
test = (
("https://exhentai.org/g/1200119/d55c44d3d0/", {
"keyword": "3eeae7bde70dd992402d4cc0230ea0f2c4af46c5",
"keyword": "199db053b4ccab94463b459e1cfe079df8cdcdd1",
"content": "e9891a4c017ed0bb734cd1efba5cd03f594d31ff",
}),
("https://exhentai.org/g/960461/4f0e369d82/", {
Expand Down Expand Up @@ -353,7 +353,7 @@ def _parse_original_info(info):
"height": text.parse_int(parts[2]),
"size": size,
# 1 initial point + 1 per 0.1 MB
"cost": 1 + math.ceil(size / 104857.6)
"cost": 1 + math.ceil(size / 100000)
}


Expand Down

0 comments on commit cd9de61

Please sign in to comment.