summaryrefslogtreecommitdiff
path: root/searx/engines
diff options
context:
space:
mode:
authorasciimoo <asciimoo@gmail.com>2014-01-30 01:14:08 +0100
committerasciimoo <asciimoo@gmail.com>2014-01-30 01:14:08 +0100
commit012c8517e0ca035d2b1783985b0b27f463dae6ee (patch)
tree1cab60be0bf4f0db018cab6329d1f9f66ed59d56 /searx/engines
parentc0afc4fea7bbe526b531c247ef4bdad3074d14aa (diff)
downloadsearxng-012c8517e0ca035d2b1783985b0b27f463dae6ee.tar.gz
searxng-012c8517e0ca035d2b1783985b0b27f463dae6ee.zip
[enh] paging support for filecrop
Diffstat (limited to 'searx/engines')
-rw-r--r--searx/engines/filecrop.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/searx/engines/filecrop.py b/searx/engines/filecrop.py
index 81340e601..89dc77697 100644
--- a/searx/engines/filecrop.py
+++ b/searx/engines/filecrop.py
@@ -2,7 +2,9 @@ from urllib import urlencode
from HTMLParser import HTMLParser
url = 'http://www.filecrop.com/'
-search_url = url + '/search.php?{query}&size_i=0&size_f=100000000&engine_r=1&engine_d=1&engine_e=1&engine_4=1&engine_m=1' # noqa
+search_url = url + '/search.php?{query}&size_i=0&size_f=100000000&engine_r=1&engine_d=1&engine_e=1&engine_4=1&engine_m=1&pos={index}' # noqa
+
+paging = True
class FilecropResultParser(HTMLParser):
@@ -69,7 +71,9 @@ class FilecropResultParser(HTMLParser):
def request(query, params):
- params['url'] = search_url.format(query=urlencode({'w': query}))
+ index = 1 + (params['pageno'] - 1) * 30
+ params['url'] = search_url.format(query=urlencode({'w': query}),
+ index=index)
return params