Python俱乐部
Python
小课题
京东优惠券
def get_taobao_api_data(app_para_dct): content = "" if app_para_dct: para_dct = {} para_dct['a'] = 'a' para_dct['b'] = 'b' url = """http://gw.api.taobao.com/router/rest""" para_data = urllib.urlencode(para_dct) f = urllib2.urlopen(url, para_data) content = f.read() return content