08/08
This commit is contained in:
parent
d88c4a87d6
commit
9ebd18e0c6
5 changed files with 6 additions and 9 deletions
|
@ -144,6 +144,3 @@ class P2Pool(models.Model):
|
||||||
miners = models.IntegerField()
|
miners = models.IntegerField()
|
||||||
totalhashes = models.IntegerField()
|
totalhashes = models.IntegerField()
|
||||||
totalblocksfound = models.IntegerField()
|
totalblocksfound = models.IntegerField()
|
||||||
|
|
||||||
def __str__(self):
|
|
||||||
return self.date
|
|
|
@ -808,7 +808,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="social-links text-center text-lg-right pt-3 pt-lg-0">
|
<div class="social-links text-center text-lg-right pt-3 pt-lg-0">
|
||||||
<a href="http://ilt7jgmfro76wgrtt6752lvfnhcz6wk5sjqhyvntjixygp3cwpvr4nad.onion" class="onion" alt="Tor Version"><i class="bx bx-hide"></i></a>
|
<a href="http://moneroj5xq4ttg4ec7e5secqdyw5mcovzvfvlq6i7omv353i6mnexlqd.onion" class="onion" alt="Tor Version"><i class="bx bx-hide"></i></a>
|
||||||
<a href="https://twitter.com/CryptoMorpheus_" class="twitter" alt="Twitter Profile"><i class="bx bxl-twitter"></i></a>
|
<a href="https://twitter.com/CryptoMorpheus_" class="twitter" alt="Twitter Profile"><i class="bx bxl-twitter"></i></a>
|
||||||
<a href="mailto:morpheus.anonymous@protonmail.com" class="email" alt="Send E-mail"><i class="bx bx-mail-send"></i></a>
|
<a href="mailto:morpheus.anonymous@protonmail.com" class="email" alt="Send E-mail"><i class="bx bx-mail-send"></i></a>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -538,7 +538,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="social-links text-center text-lg-right pt-3 pt-lg-0">
|
<div class="social-links text-center text-lg-right pt-3 pt-lg-0">
|
||||||
<a href="http://ilt7jgmfro76wgrtt6752lvfnhcz6wk5sjqhyvntjixygp3cwpvr4nad.onion" class="onion" alt="Tor Version"><i class="bx bx-hide"></i></a>
|
<a href="http://moneroj5xq4ttg4ec7e5secqdyw5mcovzvfvlq6i7omv353i6mnexlqd.onion" class="onion" alt="Tor Version"><i class="bx bx-hide"></i></a>
|
||||||
<a href="https://twitter.com/CryptoMorpheus_" class="twitter" alt="Twitter Profile"><i class="bx bxl-twitter"></i></a>
|
<a href="https://twitter.com/CryptoMorpheus_" class="twitter" alt="Twitter Profile"><i class="bx bxl-twitter"></i></a>
|
||||||
<a href="mailto:morpheus.anonymous@protonmail.com" class="email" alt="Send E-mail"><i class="bx bx-mail-send"></i></a>
|
<a href="mailto:morpheus.anonymous@protonmail.com" class="email" alt="Send E-mail"><i class="bx bx-mail-send"></i></a>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1242,7 +1242,7 @@ def update_database(date_from=None, date_to=None):
|
||||||
# Get latest P2Pool data
|
# Get latest P2Pool data
|
||||||
def get_latest_p2pool():
|
def get_latest_p2pool():
|
||||||
today = date.today()
|
today = date.today()
|
||||||
yesterday = date.today() - timedelta(1)
|
yesterday = date.today() - timedelta(2)
|
||||||
today = datetime.datetime.strftime(today, '%Y-%m-%d')
|
today = datetime.datetime.strftime(today, '%Y-%m-%d')
|
||||||
try:
|
try:
|
||||||
print(1)
|
print(1)
|
||||||
|
@ -1263,7 +1263,6 @@ def get_latest_p2pool():
|
||||||
print(6)
|
print(6)
|
||||||
return False
|
return False
|
||||||
except:
|
except:
|
||||||
print(7)
|
|
||||||
return False
|
return False
|
||||||
|
|
||||||
p2pool_stat = P2Pool()
|
p2pool_stat = P2Pool()
|
||||||
|
@ -1271,10 +1270,11 @@ def get_latest_p2pool():
|
||||||
response = requests.get('https://p2pool.io/api/pool/stats')
|
response = requests.get('https://p2pool.io/api/pool/stats')
|
||||||
|
|
||||||
data = json.loads(response.text)
|
data = json.loads(response.text)
|
||||||
|
print(data)
|
||||||
p2pool_stat.hashrate = data['pool_statistics']['hashRate']
|
p2pool_stat.hashrate = data['pool_statistics']['hashRate']
|
||||||
p2pool_stat.percentage = 100*data['pool_statistics']['hashRate']/coin.hashrate
|
p2pool_stat.percentage = 100*data['pool_statistics']['hashRate']/coin.hashrate
|
||||||
p2pool_stat.miners = data['pool_statistics']['miners']
|
p2pool_stat.miners = data['pool_statistics']['miners']
|
||||||
p2pool_stat.totalhashes = data['pool_statistics']['3444692929009331,']
|
p2pool_stat.totalhashes = data['pool_statistics']['totalHashes']
|
||||||
p2pool_stat.totalblocksfound = data['pool_statistics']['totalBlocksFound']
|
p2pool_stat.totalblocksfound = data['pool_statistics']['totalBlocksFound']
|
||||||
p2pool_stat.save()
|
p2pool_stat.save()
|
||||||
print('p2pool saved!')
|
print('p2pool saved!')
|
||||||
|
|
|
@ -144,7 +144,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="social-links text-center text-lg-right pt-3 pt-lg-0">
|
<div class="social-links text-center text-lg-right pt-3 pt-lg-0">
|
||||||
<a href="http://ilt7jgmfro76wgrtt6752lvfnhcz6wk5sjqhyvntjixygp3cwpvr4nad.onion" class="onion" alt="Tor Version"><i class="bx bx-hide"></i></a>
|
<a href="http://moneroj5xq4ttg4ec7e5secqdyw5mcovzvfvlq6i7omv353i6mnexlqd.onion" class="onion" alt="Tor Version"><i class="bx bx-hide"></i></a>
|
||||||
<a href="https://twitter.com/CryptoMorpheus_" class="twitter" alt="Twitter Profile"><i class="bx bxl-twitter"></i></a>
|
<a href="https://twitter.com/CryptoMorpheus_" class="twitter" alt="Twitter Profile"><i class="bx bxl-twitter"></i></a>
|
||||||
<a href="mailto:morpheus.anonymous@protonmail.com" class="email" alt="Send E-mail"><i class="bx bx-mail-send"></i></a>
|
<a href="mailto:morpheus.anonymous@protonmail.com" class="email" alt="Send E-mail"><i class="bx bx-mail-send"></i></a>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in a new issue