awesome-wm-widgets/RatesWidget/rates.py

9 lines
167 B
Python
Raw Normal View History

2016-01-04 23:04:16 +01:00
#!/usr/bin/python
import requests
import json
r = requests.get("http://api.fixer.io/latest?symbols=CHF,EUR")
resp = json.loads(r.content)
print resp["rates"]["CHF"]