Work on badge importing

This commit is contained in:
Scott Idem
2022-03-21 17:59:05 -04:00
parent 88e5daebfa
commit e1eeb8990c
3 changed files with 60 additions and 6 deletions

View File

@@ -44,7 +44,10 @@ def get_access_token():
log.debug(f'Status Code: {resp.status_code}')
log.debug(f'Headers: {resp.headers}')
# log.debug(f'Encoding: {resp.encoding}')
log.debug(f'JSON: {resp.json()}')
if resp.status_code == 200 and resp.json():
log.debug(f'JSON: {resp.json()}')
else:
log.warning('No JSON data found')
# log.debug('Text:', resp.text)
response_data = resp.json()
@@ -85,7 +88,10 @@ def authenticate():
log.debug(f'Status Code: {resp.status_code}')
log.debug(f'Headers: {resp.headers}')
# log.debug(f'Encoding: {resp.encoding}')
log.debug(f'JSON: {resp.json()}')
if resp.json():
log.debug(f'JSON: {resp.json()}')
else:
log.warning('No JSON data found')
# log.debug('Text:', resp.text)
if resp: