标签:port print uniq except int pos .com ppi ant
import requests url = ‘https://github.com/timeline.json‘ r = requests.get(url) json_obj = r.json() repos = set() # we want just unique urls for entry in json_obj: try: repos.add(entry[‘repository‘][‘url‘]) except KeyError as e: print "No key %s. Skipping..." % (e) from pprint import pprint pprint(repos)
标签:port print uniq except int pos .com ppi ant
原文地址:http://www.cnblogs.com/boooobao/p/6444935.html