summaryrefslogtreecommitdiff
path: root/searx/engines/soundcloud.py
diff options
context:
space:
mode:
authorasciimoo <asciimoo@gmail.com>2013-10-23 23:55:37 +0200
committerasciimoo <asciimoo@gmail.com>2013-10-23 23:55:37 +0200
commit74b6be3991dc62577aca295de839e51e6d0807d6 (patch)
tree5bf5df160e765dc7dc6897e640fd23a761df1d2e /searx/engines/soundcloud.py
parent39d229e1104dc10c7c7f00380c02d46118e3d895 (diff)
downloadsearxng-74b6be3991dc62577aca295de839e51e6d0807d6.tar.gz
searxng-74b6be3991dc62577aca295de839e51e6d0807d6.zip
[enh] engine cfg compatibilty
Diffstat (limited to 'searx/engines/soundcloud.py')
-rw-r--r--searx/engines/soundcloud.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/searx/engines/soundcloud.py b/searx/engines/soundcloud.py
index 802b8b2be..50414f153 100644
--- a/searx/engines/soundcloud.py
+++ b/searx/engines/soundcloud.py
@@ -1,13 +1,15 @@
from json import loads
+from urllib import urlencode
categories = ['music']
guest_client_id = 'b45b1aa10f1ac2941910a7f0d10f8e28'
-search_url = 'https://api.soundcloud.com/search?q=%s&facet=model&limit=10&offset=0&linked_partitioning=1&client_id='+guest_client_id
+url = 'https://api.soundcloud.com/'
+search_url = url + 'search?{query}&facet=model&limit=20&offset=0&linked_partitioning=1&client_id='+guest_client_id
def request(query, params):
global search_url
- params['url'] = search_url % query
+ params['url'] = search_url.format(query=urlencode({'q': query}))
return params