summaryrefslogtreecommitdiff
path: root/searx/engines/tokyotoshokan.py
diff options
context:
space:
mode:
authorApply55gx <Apply55gx@users.noreply.github.com>2017-10-25 10:44:28 +0200
committerGitHub <noreply@github.com>2017-10-25 10:44:28 +0200
commitd800e3fcfa44bc0be7262092815b2d2020a9d9f3 (patch)
tree0bdc64b3e15592e2fdeeaa40f21cbcc8039b7949 /searx/engines/tokyotoshokan.py
parent18a4e7035f72a3c31239ae0bd1ee67cc2ad354b8 (diff)
parentb34124fd8a6b020136ca9656acdb01afceabe96f (diff)
Merge pull request #1 from asciimoo/master
-
Diffstat (limited to 'searx/engines/tokyotoshokan.py')
-rw-r--r--searx/engines/tokyotoshokan.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/searx/engines/tokyotoshokan.py b/searx/engines/tokyotoshokan.py
index 9a6b5e57d..773212043 100644
--- a/searx/engines/tokyotoshokan.py
+++ b/searx/engines/tokyotoshokan.py
@@ -14,8 +14,8 @@ import re
from lxml import html
from searx.engines.xpath import extract_text
from datetime import datetime
-from searx.engines.nyaa import int_or_zero, get_filesize_mul
from searx.url_utils import urlencode
+from searx.utils import get_torrent_size, int_or_zero
# engine dependent config
categories = ['files', 'videos', 'music']
@@ -76,8 +76,7 @@ def response(resp):
try:
# ('1.228', 'GB')
groups = size_re.match(item).groups()
- multiplier = get_filesize_mul(groups[1])
- params['filesize'] = int(multiplier * float(groups[0]))
+ params['filesize'] = get_torrent_size(groups[0], groups[1])
except:
pass
elif item.startswith('Date:'):