def urlget(self, url): res = urlopen(url, timeout=60) if res.code == 200: doc = res.read() doc = json.loads(doc) return doc['response'] return ''
def fetch(self, url): res = urlopen(url, timeout=60) if res.code == 200: return res.read() return ""