Created
June 28, 2017 18:21
-
-
Save SamouraiDev/264b52e5fcf97cd1ce75419265e2e06e to your computer and use it in GitHub Desktop.
Petya btc balance
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import urllib2 | |
import json | |
addr = [ "1Mz7153HMuxXTuR2R1t78mGSdzaAtNbBWX" ] | |
total = 0; | |
for i in range(len(addr)): | |
url = 'https://blockchain.info/address/' + addr[i] + '?format=json' | |
response = urllib2.urlopen(url) | |
html = response.read() | |
jdata = json.loads(html) | |
print (addr[i] + ":" + str(jdata['final_balance'] / 1e8)) | |
total += jdata['final_balance'] | |
print (str(total / 1e8)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment