mirror of
https://github.com/lilydjwg/nvchecker
synced 2025-03-02 17:41:10 +00:00
fixed no user-agent error for github.py
This commit is contained in:
parent
34a1a88f63
commit
7390202d87
@ -13,8 +13,8 @@ def get_version(name, conf, callback):
|
|||||||
headers = {'Accept': "application/vnd.github.quicksilver-preview+json"}
|
headers = {'Accept': "application/vnd.github.quicksilver-preview+json"}
|
||||||
if 'NVCHECKER_GITHUB_TOKEN' in os.environ:
|
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']
|
||||||
request = HTTPRequest(url, headers=headers)
|
request = HTTPRequest(url, headers=headers, user_agent='lilydjwg/nvchecker')
|
||||||
AsyncHTTPClient().fetch(request, user_agent='lilydjwg/nvchecker',
|
AsyncHTTPClient().fetch(request,
|
||||||
callback=partial(_github_done, name, callback))
|
callback=partial(_github_done, name, callback))
|
||||||
|
|
||||||
def _github_done(name, callback, res):
|
def _github_done(name, callback, res):
|
||||||
|
Loading…
Reference in New Issue
Block a user