mirror of
https://github.com/searxng/searxng.git
synced 2024-11-20 03:10:10 +01:00
[enh] paging support for deviantart
This commit is contained in:
parent
9ba17fce47
commit
1fd91bd911
@ -5,12 +5,15 @@ from urlparse import urljoin
|
|||||||
categories = ['images']
|
categories = ['images']
|
||||||
|
|
||||||
base_url = 'https://www.deviantart.com/'
|
base_url = 'https://www.deviantart.com/'
|
||||||
search_url = base_url+'search?'
|
search_url = base_url+'search?offset={offset}&{query}'
|
||||||
|
|
||||||
|
paging = True
|
||||||
|
|
||||||
|
|
||||||
def request(query, params):
|
def request(query, params):
|
||||||
global search_url
|
offset = (params['pageno'] - 1) * 24
|
||||||
params['url'] = search_url + urlencode({'q': query})
|
params['url'] = search_url.format(offset=offset,
|
||||||
|
query=urlencode({'q': query}))
|
||||||
return params
|
return params
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user