fix
This commit is contained in:
parent
24127ded41
commit
664f2f12d8
1 changed files with 3 additions and 3 deletions
|
@ -12,7 +12,7 @@ import pygsheets
|
||||||
# Asynchronous get block data from xmrchain
|
# Asynchronous get block data from xmrchain
|
||||||
####################################################################################
|
####################################################################################
|
||||||
async def get_block_data(session, block: str):
|
async def get_block_data(session, block: str):
|
||||||
url = 'https://xmrchain.net/api/block/' + block
|
url = 'https://blox.minexmr.com/api/block/' + block
|
||||||
async with session.get(url) as res:
|
async with session.get(url) as res:
|
||||||
data = await res.read()
|
data = await res.read()
|
||||||
data = json.loads(data)
|
data = json.loads(data)
|
||||||
|
@ -27,7 +27,7 @@ async def get_block_data(session, block: str):
|
||||||
# Asynchronous get network data from xmrchain
|
# Asynchronous get network data from xmrchain
|
||||||
####################################################################################
|
####################################################################################
|
||||||
async def get_network_data(session, block: str):
|
async def get_network_data(session, block: str):
|
||||||
url = 'https://xmrchain.net/api/networkinfo'
|
url = 'https://blox.minexmr.com/api/networkinfo'
|
||||||
async with session.get(url) as res:
|
async with session.get(url) as res:
|
||||||
data = await res.read()
|
data = await res.read()
|
||||||
data = json.loads(data)
|
data = json.loads(data)
|
||||||
|
@ -174,7 +174,7 @@ async def update_xmr_data(yesterday, coin):
|
||||||
name = coin.name
|
name = coin.name
|
||||||
Coin.objects.filter(name=coin.name).filter(date=yesterday).delete()
|
Coin.objects.filter(name=coin.name).filter(date=yesterday).delete()
|
||||||
|
|
||||||
url = 'https://xmrchain.net/api/networkinfo'
|
url = 'https://blox.minexmr.com/api/networkinfo'
|
||||||
response = requests.get(url)
|
response = requests.get(url)
|
||||||
data = json.loads(response.text)
|
data = json.loads(response.text)
|
||||||
height = int(data['data']['height'])
|
height = int(data['data']['height'])
|
||||||
|
|
Loading…
Reference in a new issue