mirror of
https://github.com/searxng/searxng.git
synced 2024-11-22 20:17:45 +01:00
[enh] paging support for soundcloud
This commit is contained in:
parent
c567308e49
commit
6cbf9bf67d
@ -5,12 +5,15 @@ categories = ['music']
|
|||||||
|
|
||||||
guest_client_id = 'b45b1aa10f1ac2941910a7f0d10f8e28'
|
guest_client_id = 'b45b1aa10f1ac2941910a7f0d10f8e28'
|
||||||
url = 'https://api.soundcloud.com/'
|
url = 'https://api.soundcloud.com/'
|
||||||
search_url = url + 'search?{query}&facet=model&limit=20&offset=0&linked_partitioning=1&client_id='+guest_client_id # noqa
|
search_url = url + 'search?{query}&facet=model&limit=20&offset={offset}&linked_partitioning=1&client_id='+guest_client_id # noqa
|
||||||
|
|
||||||
|
paging = True
|
||||||
|
|
||||||
|
|
||||||
def request(query, params):
|
def request(query, params):
|
||||||
global search_url
|
offset = (params['pageno'] - 1) * 20
|
||||||
params['url'] = search_url.format(query=urlencode({'q': query}))
|
params['url'] = search_url.format(query=urlencode({'q': query}),
|
||||||
|
offset=offset)
|
||||||
return params
|
return params
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user