1. import httplib,json
2. url = ‘www.yupoo.com’
3. path = ‘/api/json/api_key=d74aad0331494be468c07f47987b099b&method=yupoo.photos.licenses.getInfo’
4. conn = httplib.HTTPConnection(url)
5. conn.request(“GET”, path)
6. response = conn.getresponse()
7. if response.status == 200 :
8. result = response.read()
9. result2 = json.loads(result)
10. print result2['stat']
If the above code is saved as Demo.py, in Cmd window, run this: “python Demo.py”
Filed under: Programming
