fix github api 400 Bad Request

Must specify access token via Authorization header. https://developer.github.com/changes/2020-02-10-deprecating-auth-through-query-param
This commit is contained in:
r0cky
2021-11-16 15:48:38 +08:00
committed by GitHub
parent d811d754f0
commit 08e6cfd89f
+2
View File
@@ -23,6 +23,8 @@ class GithubAPI(Search):
self.proxy = self.get_proxy(self.source) self.proxy = self.get_proxy(self.source)
self.header.update( self.header.update(
{'Accept': 'application/vnd.github.v3.text-match+json'}) {'Accept': 'application/vnd.github.v3.text-match+json'})
self.header.update(
{'Authorization': 'token ' + self.token})
page = 1 page = 1
while True: while True: