mirror of
https://github.com/norohind/SquadsActivityMonitor.git
synced 2025-04-12 21:07:12 +03:00
demb.design -> demb.uk
This commit is contained in:
parent
c81d504dba
commit
26d7804065
@ -99,7 +99,7 @@
|
|||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
<a>In order to access to api, add /api/ prefix to any endpoint url<br>
|
<a>In order to access to api, add /api/ prefix to any endpoint url<br>
|
||||||
Author contact: a31#6403 (discord), a31@demb.design (email)<br>
|
Author contact: a31#6403 (discord), a31@demb.uk (email)<br>
|
||||||
<a href="https://github.com/norohind/SquadsActivityMonitor">Source code</a></a>
|
<a href="https://github.com/norohind/SquadsActivityMonitor">Source code</a></a>
|
||||||
<br><a>Monero XMR: 85aKmMT2ab4hkpU3iZRk9q5DDSuDL4qDX2wDEgSFgDmRif7pD1LCN8ZLhYEFDC6rsFae71E5gKsMPG3YHRoikzhcUJ8Rm7h</a>
|
<br><a>Monero XMR: 85aKmMT2ab4hkpU3iZRk9q5DDSuDL4qDX2wDEgSFgDmRif7pD1LCN8ZLhYEFDC6rsFae71E5gKsMPG3YHRoikzhcUJ8Rm7h</a>
|
||||||
</body>
|
</body>
|
||||||
|
6
utils.py
6
utils.py
@ -119,18 +119,18 @@ def proxied_request(url: str, method: str = 'get', **kwargs) -> requests.Respons
|
|||||||
|
|
||||||
|
|
||||||
def _get_bearer() -> str:
|
def _get_bearer() -> str:
|
||||||
"""Gets bearer token from capi.demb.design (companion-api project, I will upload it on GH one day...)
|
"""Gets bearer token from capi.demb.uk (companion-api project, I will upload it on GH one day...)
|
||||||
|
|
||||||
:return: bearer token as str
|
:return: bearer token as str
|
||||||
"""
|
"""
|
||||||
bearer_request: requests.Response = requests.get(
|
bearer_request: requests.Response = requests.get(
|
||||||
url='https://capi.demb.design/random_token', headers={'auth': os.environ['DEMB_CAPI_AUTH']})
|
url='https://capi.demb.uk/random_token', headers={'auth': os.environ['DEMB_CAPI_AUTH']})
|
||||||
|
|
||||||
try:
|
try:
|
||||||
bearer: str = bearer_request.json()['access_token']
|
bearer: str = bearer_request.json()['access_token']
|
||||||
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logger.exception(f'Unable to parse capi.demb.design answer\nrequested: {bearer_request.url!r}\n'
|
logger.exception(f'Unable to parse capi.demb.uk answer\nrequested: {bearer_request.url!r}\n'
|
||||||
f'code: {bearer_request.status_code!r}\nresponse: {bearer_request.content!r}', exc_info=e)
|
f'code: {bearer_request.status_code!r}\nresponse: {bearer_request.content!r}', exc_info=e)
|
||||||
raise e
|
raise e
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user