summaryrefslogtreecommitdiff
path: root/searx/engines/github.py
diff options
context:
space:
mode:
authorpw3t <romain@berthor.fr>2014-01-23 22:11:36 +0100
committerpw3t <romain@berthor.fr>2014-01-23 22:11:36 +0100
commit132681b3aaf5b330d9d19624038b51fe2ebfd8d5 (patch)
tree393114f41b487eea4b71dd4073903726310a1257 /searx/engines/github.py
parentd6b017efb5b51623a02c85690c7335cfc6674092 (diff)
parent59eeeaab87951fd6fa3302ec240db98902a20b2c (diff)
Merge branch 'master' of https://github.com/asciimoo/searx
Diffstat (limited to 'searx/engines/github.py')
-rw-r--r--searx/engines/github.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/searx/engines/github.py b/searx/engines/github.py
index b4baea6e8..be2cfe7c5 100644
--- a/searx/engines/github.py
+++ b/searx/engines/github.py
@@ -4,12 +4,15 @@ from cgi import escape
categories = ['it']
-search_url = 'https://api.github.com/search/repositories?sort=stars&order=desc&{query}'
+search_url = 'https://api.github.com/search/repositories?sort=stars&order=desc&{query}' # noqa
+
+accept_header = 'application/vnd.github.preview.text-match+json'
+
def request(query, params):
global search_url
params['url'] = search_url.format(query=urlencode({'q': query}))
- params['headers']['Accept'] = 'application/vnd.github.preview.text-match+json'
+ params['headers']['Accept'] = accept_header
return params