Skip to content

Instantly share code, notes, and snippets.

@tavimori
Created November 17, 2017 11:55
Show Gist options
  • Save tavimori/3de233dd539d14c56c76b92071ab57f5 to your computer and use it in GitHub Desktop.
Save tavimori/3de233dd539d14c56c76b92071ab57f5 to your computer and use it in GitHub Desktop.
import requests
import json
url = "http://cloudprint.cuhk.edu.cn/mobileproxy/printersdetail"
req = requests.get(url)
req.encoding = 'utf-8'
a = req.text
# print(req.encoding)
b = json.loads(a)
c = json.loads(b["p_cartridage"])
# print(c)
for i in c["array"]:
print(i)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment