mirror of
https://github.com/searxng/searxng.git
synced 2025-08-02 10:02:20 +02:00
[enh] engine cfg compatibilty
This commit is contained in:
parent
39d229e110
commit
74b6be3991
9 changed files with 36 additions and 39 deletions
|
@ -1,15 +1,12 @@
|
|||
from json import loads
|
||||
from urllib import quote
|
||||
from urllib import urlencode
|
||||
|
||||
categories = ['videos']
|
||||
|
||||
search_url = 'https://gdata.youtube.com/feeds/api/videos?alt=json&q='
|
||||
search_url = 'https://gdata.youtube.com/feeds/api/videos?alt=json&{query}'
|
||||
|
||||
def request(query, params):
|
||||
global search_url
|
||||
query = quote(query.replace(' ', '+'), safe='+')
|
||||
params['url'] = search_url + query
|
||||
|
||||
params['url'] = search_url.format(query=urlencode({'q': query}))
|
||||
return params
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue