mirror of
https://github.com/RYGhub/royalnet.git
synced 2024-11-23 19:44:20 +00:00
IGNORE HTTPS!
This commit is contained in:
parent
fef6cd8d66
commit
102b0656cc
1 changed files with 2 additions and 1 deletions
|
@ -1,5 +1,6 @@
|
||||||
import asyncio
|
import asyncio
|
||||||
import requests
|
import requests
|
||||||
|
import functools
|
||||||
import strings as s
|
import strings as s
|
||||||
loop = asyncio.get_event_loop()
|
loop = asyncio.get_event_loop()
|
||||||
|
|
||||||
|
@ -15,7 +16,7 @@ async def get_player_data(platform: str, region: str, battletag: str, **kwargs):
|
||||||
# Unofficial API requires - for discriminator numbers
|
# Unofficial API requires - for discriminator numbers
|
||||||
battletag = battletag.replace("#", "-")
|
battletag = battletag.replace("#", "-")
|
||||||
# GET the json unofficial API response
|
# GET the json unofficial API response
|
||||||
r = await loop.run_in_executor(None, requests.get,
|
r = await loop.run_in_executor(None, functools.partial(requests.get, verify=False),
|
||||||
'https://api.lootbox.eu/{platform}/{region}/{battletag}/profile'.format(**locals()))
|
'https://api.lootbox.eu/{platform}/{region}/{battletag}/profile'.format(**locals()))
|
||||||
# Ensure the request is successful
|
# Ensure the request is successful
|
||||||
if r.status_code == 200:
|
if r.status_code == 200:
|
||||||
|
|
Loading…
Reference in a new issue