标签:String 示例 json item 天猫 API key cn
item_get-获得淘宝商品详情
请求示例
# coding:utf-8
"""
Compatible for python2.x and python3.x
requirement: pip install requests
"""
from __future__ import print_function
import requests
# 请求示例 url 默认请求参数已经做URL编码
url = "https://fuwuqi/taobao/item_get/?key=<您自己的apiKey>&secret=<您自己的apiSecret>&num_iid=652874751412&is_promotion=1"
headers = {
"Accept-Encoding": "gzip",
"Connection": "close"
}
if __name__ == "__main__":
r = requests.get(url, headers=headers)
json_obj = r.json()
print(json_obj)
测试api请注册账号,点此注册:https://o0b.cn/jennif
标签:String,
示例,
json,
item,
天猫,
API,
key,
cn
From: https://www.cnblogs.com/JenniferAPI/p/17227111.html