Advertisement
flwkjlwekjfs

Untitled

Jul 4th, 2018
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. import json
  2. import urllib.request
  3.  
  4. jsonUrl = "https://gist.githubusercontent.com/planetoftheweb/98f35786733c8cccf81e/raw/f3dad774ed1fe20b36011b1261bb392ee759b867/data.json"
  5. with urllib.request.urlopen(jsonUrl) as response:
  6. data = json.loads(response.read())
  7. print(data)
  8.  
  9. jsonUrl = "http://8ball.delegator.com/magic/JSON/blah"
  10. with urllib.request.urlopen(jsonUrl) as response:
  11. data = json.loads(response.read())
  12. print(data)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement