Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import json
- from urllib.request import Request, urlopen
- url = "https://api.compound.finance/api/v2/account"
- req = Request(url, headers={'User-Agent': 'Mozilla/5.0'})
- api = urlopen(req).read()
- api = api.decode('utf8').replace("'", '"')
- js = json.loads(api)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement