diff --git a/engines/wikijs.py b/engines/wikijs.py index 9beca0f..43947ed 100644 --- a/engines/wikijs.py +++ b/engines/wikijs.py @@ -21,7 +21,7 @@ host = '' cookies = {} headers = { - "Authorization": 'Bearer %s' % search_token + "Authorization": '' } '''Some engines might offer different result based on cookies or headers. Possible use-case: To set safesearch cookie or header to moderate.''' @@ -98,11 +98,12 @@ def request(query, params): if paging and search_url.find('{pageno}') >= 0: fp['pageno'] = (params['pageno'] - 1) * page_size + first_page_num + header['Authorization'] = 'Bearer %s' % search_token params['cookies'].update(cookies) params['headers'].update(headers) - + params['url'] = host + '?=query{pages {search(query: %s) {results{id title description path locale __typename} suggestions totalHits __typename} __typename }}' % query - + print(params['url']) return params