Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
searx-engine
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gargantext
searx-engine
Commits
81151510
Commit
81151510
authored
Jan 10, 2015
by
Thomas Pointhuber
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[fix] pep8
parent
c19b0899
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
kickass.py
searx/engines/kickass.py
+7
-7
No files found.
searx/engines/kickass.py
View file @
81151510
...
@@ -80,16 +80,16 @@ def response(resp):
...
@@ -80,16 +80,16 @@ def response(resp):
# convert filesize to byte if possible
# convert filesize to byte if possible
try
:
try
:
filesize
=
float
(
filesize
)
filesize
=
float
(
filesize
)
# convert filesize to byte
# convert filesize to byte
if
filesize_multiplier
==
'TB'
:
if
filesize_multiplier
==
'TB'
:
filesize
=
int
(
filesize
*
1024
*
1024
*
1024
*
1024
)
filesize
=
int
(
filesize
*
1024
*
1024
*
1024
*
1024
)
elif
filesize_multiplier
==
'GB'
:
elif
filesize_multiplier
==
'GB'
:
filesize
=
int
(
filesize
*
1024
*
1024
*
1024
)
filesize
=
int
(
filesize
*
1024
*
1024
*
1024
)
elif
filesize_multiplier
==
'MB'
:
elif
filesize_multiplier
==
'MB'
:
filesize
=
int
(
filesize
*
1024
*
1024
)
filesize
=
int
(
filesize
*
1024
*
1024
)
elif
filesize_multiplier
==
'kb'
:
elif
filesize_multiplier
==
'kb'
:
filesize
=
int
(
filesize
*
1024
)
filesize
=
int
(
filesize
*
1024
)
except
:
except
:
filesize
=
None
filesize
=
None
...
@@ -100,7 +100,7 @@ def response(resp):
...
@@ -100,7 +100,7 @@ def response(resp):
files
=
None
files
=
None
magnetlink
=
result
.
xpath
(
magnet_xpath
)[
0
]
.
attrib
[
'href'
]
magnetlink
=
result
.
xpath
(
magnet_xpath
)[
0
]
.
attrib
[
'href'
]
torrentfile
=
result
.
xpath
(
torrent_xpath
)[
0
]
.
attrib
[
'href'
]
torrentfile
=
result
.
xpath
(
torrent_xpath
)[
0
]
.
attrib
[
'href'
]
# append result
# append result
...
@@ -112,7 +112,7 @@ def response(resp):
...
@@ -112,7 +112,7 @@ def response(resp):
'filesize'
:
filesize
,
'filesize'
:
filesize
,
'files'
:
files
,
'files'
:
files
,
'magnetlink'
:
magnetlink
,
'magnetlink'
:
magnetlink
,
'torrentfile'
:
torrentfile
,
'torrentfile'
:
torrentfile
,
'template'
:
'torrent.html'
})
'template'
:
'torrent.html'
})
# return results sorted by seeder
# return results sorted by seeder
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment