import urllib
import re
link = "https://api.bitcoinaverage.com/no-mtgox/ticker/USD"
f = urllib.urlopen(link)
myfile = f.read()
last = re.search("last\": (.+?),", myfile).group(1)
myFile = open('last.txt', 'w')
myFile.write(last)
myFile.close()
custom tailored
1C2NWeHxtaGyo9keSLwNMYXSsDBYwhMgaE
edit:
self-updating:
import urllib
import re
import time
while True:
link = "https://api.bitcoinaverage.com/no-mtgox/ticker/USD"
f = urllib.urlopen(link)
myfile = f.read()
last = re.search("last\": (.+?),", myfile).group(1)
myFile = open('last.txt', 'w')
myFile.write(last)
myFile.close()
print "updated: %s" % last
time.sleep(30)