mirror of
https://github.com/lilydjwg/nvchecker.git
synced 2025-03-10 06:14:02 +00:00
handle github repo redirects using preview api
This commit is contained in:
parent
c3c16247b7
commit
41df426ca5
1 changed files with 4 additions and 1 deletions
|
@ -12,7 +12,10 @@ def get_version(name, conf, callback):
|
|||
url = GITHUB_URL % (repo, br)
|
||||
headers = {}
|
||||
if 'NVCHECKER_GITHUB_TOKEN' in os.environ:
|
||||
headers = {'Authorization': 'token %s' % os.environ['NVCHECKER_GITHUB_TOKEN']}
|
||||
headers = {
|
||||
'Authorization': 'token %s' % os.environ['NVCHECKER_GITHUB_TOKEN'],
|
||||
'Accept': "application/vnd.github.quicksilver-preview+json"
|
||||
}
|
||||
request = HTTPRequest(url, headers=headers)
|
||||
AsyncHTTPClient().fetch(request, user_agent='lilydjwg/nvchecker',
|
||||
callback=partial(_github_done, name, callback))
|
||||
|
|
Loading…
Add table
Reference in a new issue