Advertisement
Guest User

Untitled

a guest
Oct 16th, 2019
133
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.26 KB | None | 0 0
  1. import json
  2. from urllib.request import Request, urlopen
  3.  
  4. url = "https://api.compound.finance/api/v2/account"
  5. req = Request(url, headers={'User-Agent': 'Mozilla/5.0'})
  6. api = urlopen(req).read()
  7. api = api.decode('utf8').replace("'", '"')
  8. js = json.loads(api)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement