1
0
Fork 0
mirror of https://github.com/Horhik/dotfiles.git synced 2024-11-08 01:43:13 +00:00
Dotfiles/.config/polybar/themes/monolit-dracula/polybar-scripts/info-ethermine/info-ethermine.py
2020-09-05 14:43:37 +03:00

13 lines
289 B
Python

#!/usr/bin/env python3
import requests
miner = ""
data = requests.get(f"https://api.ethermine.org/miner/{miner}/dashboard").json()['data']['statistics']
data = data[-1]
current_hash_rate = data["currentHashrate"]
currentMHs = round(current_hash_rate/1e6, 1)
print(f"{currentMHs}MH/s")