summaryrefslogtreecommitdiffstats
path: root/gold/scoreboard/modules/available/bitcoinpool/bitcoinpool_stats
blob: 599ef9ff6a4e993817409b003d46e9fa3b271131 (plain)
1
2
3
4
5
6
7
8
9
10
11
#!/usr/bin/python2
import simplejson,urllib,datetime
url="http://bitcoinpool.com/pooljson.php"
f = open('/home/makefu/log/bitcoinpool_stats',mode='a')
today = datetime.datetime.now()

result = simplejson.load(urllib.urlopen(url))
print >>f, today.strftime("%Y-%m-%dT%H:%M:%S"),
for k,v in result.iteritems():
    print >>f ,'%s' % v,
print >>f