Python语法API调试,taobao1688pinduoduo商品详情测试接口

       ​Python提供了高效的高级数据结构,还能简单有效地面向对象编程。Python语法和动态类型,以及解释型语言的本质,使它成为多数平台上写脚本和快速开发应用的编程语言, 随着版本的不断更新和语言新功能的添加,逐渐被用于独立的、大型项目的开发。 Python解释器易于扩展,可以使用C语言或C++(或者其他可以通过C调用的语言)扩展新的功能和数据类型。 Python也可用于可定制化软件中的扩展程序语言。Python丰富的标准库,提供了适用于各个主要系统平台的源码或机器码。

语音特点

简单:Python是一种代表简单主义思想的语言。阅读一个良好的Python程序就感觉像是在读英语一样。它使你能够专注于解决问题而不是去搞明白语言本身。

易学:Python极其容易上手,因为Python有极其简单的说明文档 [8]  。

易读、易维护:风格清晰划一、强制缩进

用途广泛

速度较快:Python的底层是用C语言写的,很多标准库和第三方库也都是用C写的,运行速度非常快。 

免费、开源:Python是FLOSS(自由/开放源码软件)之一。使用者可以自由地发布这个软件的拷贝、阅读它的源代码、对它做改动、把它的一部分用于新的自由软件中。FLOSS是基于一个团体分享知识的概念。

高层语言:用Python语言编写程序的时候无需考虑诸如如何管理你的程序使用的内存一类的底层细节。

item_get-获得淘宝商品详情

API工具

Python语法API调试,taobao1688pinduoduo商品详情测试接口_第1张图片

请求参数

请求参数:num_iid=692253623772&is_promotion=1

参数说明:num_iid:淘宝商品ID
is_promotion:是否获取取促销价

请求示例

Curl PHP PHPsdk JAVA C# Python

# 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://api-gw.onebound.cn/taobao/item_get/?key=<您自己的apiKey>&secret=<您自己的apiSecret>&num_iid=520813250866&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)

响应示例

Request address:
https://api-gw.onebound.cn/taobao/item_get/?key=t&
&num_iid=692253623772&is_promotion=1&cache=no&&lang=zh-CN&secret=
---------------------------------------
Result Object:
---------------------------------------
{
	"item": {
		"num_iid": "692253623772",
		"title": "高级感小香风仿羊羔毛外套女冬2022新款爆款加绒加厚皮毛一体棉服",
		"desc_short": "",
		"price": 268,
		"total_price": "",
		"suggestive_price": "",
		"orginal_price": 368,
		"nick": "姬箐女装旗舰店",
		"num": 200,
		"detail_url": "https://item.taobao.com/item.htm?id=692253623772",
		"pic_url": "https://img.alicdn.com/imgextra/i3/3164479656/O1CN01L4VOvB2LCVCXPZEBr_!!0-item_pic.jpg",
		"brand": null,
		"brandId": "",
		"rootCatId": "",
		"cid": 50011277,
		"desc": "\n  

\n

", "item_imgs": [ { "url": "https://img.alicdn.com/imgextra/i3/3164479656/O1CN01L4VOvB2LCVCXPZEBr_!!0-item_pic.jpg" }, { "url": "https://img.alicdn.com/imgextra/i2/3164479656/O1CN01s1MHE62LCVChuuTkA_!!3164479656.jpg" }, { "url": "https://img.alicdn.com/imgextra/i3/3164479656/O1CN013jpV272LCVCdwij5j_!!3164479656.jpg" }, { "url": "https://img.alicdn.com/imgextra/i3/3164479656/O1CN01wZqb1q2LCVCdwkGj4_!!3164479656.jpg" }, { "url": "https://img.alicdn.com/imgextra/i2/3164479656/O1CN013u5xze2LCVCg4BaIR_!!3164479656.jpg" } ], "item_weight": "", "post_fee": 0, "freight": "", "express_fee": "", "ems_fee": "", "shipping_to": "", "video": [], "sample_id": "", "props_name": "20509:28314:尺码:S;20509:28315:尺码:M;20509:28316:尺码:L;20509:28317:尺码:XL;20509:28314:尺码:S;20509:28315:尺码:M;20509:28316:尺码:L;20509:28317:尺码:XL;20509:28314:尺码:S;20509:28315:尺码:M;20509:28316:尺码:L;20509:28317:尺码:XL;1627207:14665273:颜色分类:藕粉色;1627207:14665273:颜色分类:藕粉色;1627207:14665273:颜色分类:藕粉色;1627207:14665273:颜色分类:藕粉色;1627207:28335:颜色分类:绿色;1627207:28335:颜色分类:绿色;1627207:28335:颜色分类:绿色;1627207:28335:颜色分类:绿色;1627207:3224419:颜色分类:驼色;1627207:3224419:颜色分类:驼色;1627207:3224419:颜色分类:驼色;1627207:3224419:颜色分类:驼色", "prop_imgs": { "prop_img": [ { "properties": "1627207:14665273", "url": "http://img.alicdn.com/imgextra/i2/3164479656/O1CN01T3rr6d2LCVCcVupBL_!!3164479656.jpg" }, { "properties": "1627207:28335", "url": "http://img.alicdn.com/imgextra/i4/3164479656/O1CN01cg722v2LCVCwXdNno_!!3164479656.jpg" }, { "properties": "1627207:3224419", "url": "http://img.alicdn.com/imgextra/i3/3164479656/O1CN01UOvLGJ2LCVCt0MWM2_!!3164479656.jpg" } ] }, "props_imgs": { "prop_img": [ { "properties": "1627207:14665273", "url": "http://img.alicdn.com/imgextra/i2/3164479656/O1CN01T3rr6d2LCVCcVupBL_!!3164479656.jpg" }, { "properties": "1627207:28335", "url": "http://img.alicdn.com/imgextra/i4/3164479656/O1CN01cg722v2LCVCwXdNno_!!3164479656.jpg" }, { "properties": "1627207:3224419", "url": "http://img.alicdn.com/imgextra/i3/3164479656/O1CN01UOvLGJ2LCVCt0MWM2_!!3164479656.jpg" } ] }, "property_alias": "", "props": [ { "name": "品牌", "value": "姬箐" }, { "name": "适用年龄", "value": "18-24周岁" }, { "name": "尺码", "value": "S M L XL" }, { "name": "图案", "value": "纯色" }, { "name": "风格", "value": "通勤" }, { "name": "领子", "value": "西装领" }, { "name": "衣门襟", "value": "单排扣" }, { "name": "颜色分类", "value": "绿色 藕粉色 驼色" }, { "name": "袖型", "value": "插肩袖" }, { "name": "组合形式", "value": "单件" }, { "name": "货号", "value": "JQ105" }, { "name": "年份季节", "value": "2022年冬季" }, { "name": "袖长", "value": "长袖" }, { "name": "厚薄", "value": "加厚" }, { "name": "衣长", "value": "常规" }, { "name": "服装版型", "value": "宽松型" }, { "name": "流行元素/工艺", "value": "口袋 纽扣 拼接" }, { "name": "销售渠道类型", "value": "纯电商(只在线上销售)" }, { "name": "材质成分", "value": "聚酯纤维100%" } ], "total_sold": "-1", "skus": { "sku": [ { "price": 268, "total_price": 0, "orginal_price": 368, "properties": "20509:28314;1627207:14665273", "properties_name": "20509:28314:尺码:S;1627207:14665273:颜色分类:藕粉色", "quantity": 200, "sku_id": "4916336041385" }, { "price": 268, "total_price": 0, "orginal_price": 368, "properties": "20509:28315;1627207:14665273", "properties_name": "20509:28315:尺码:M;1627207:14665273:颜色分类:藕粉色", "quantity": 200, "sku_id": "4916336041386" }, { "price": 268, "total_price": 0, "orginal_price": 368, "properties": "20509:28316;1627207:14665273", "properties_name": "20509:28316:尺码:L;1627207:14665273:颜色分类:藕粉色", "quantity": 200, "sku_id": "4916336041387" }, { "price": 268, "total_price": 0, "orginal_price": 368, "properties": "20509:28317;1627207:14665273", "properties_name": "20509:28317:尺码:XL;1627207:14665273:颜色分类:藕粉色", "quantity": 200, "sku_id": "4916336041388" }, { "price": 268, "total_price": 0, "orginal_price": 368, "properties": "20509:28314;1627207:28335", "properties_name": "20509:28314:尺码:S;1627207:28335:颜色分类:绿色", "quantity": 200, "sku_id": "4919848192254" }, { "price": 268, "total_price": 0, "orginal_price": 368, "properties": "20509:28315;1627207:28335", "properties_name": "20509:28315:尺码:M;1627207:28335:颜色分类:绿色", "quantity": 200, "sku_id": "4919848192256" }, { "price": 268, "total_price": 0, "orginal_price": 368, "properties": "20509:28316;1627207:28335", "properties_name": "20509:28316:尺码:L;1627207:28335:颜色分类:绿色", "quantity": 200, "sku_id": "4919848192258" }, { "price": 268, "total_price": 0, "orginal_price": 368, "properties": "20509:28317;1627207:28335", "properties_name": "20509:28317:尺码:XL;1627207:28335:颜色分类:绿色", "quantity": 200, "sku_id": "4919848192260" }, { "price": 268, "total_price": 0, "orginal_price": 368, "properties": "20509:28314;1627207:3224419", "properties_name": "20509:28314:尺码:S;1627207:3224419:颜色分类:驼色", "quantity": 200, "sku_id": "4919848192255" }, { "price": 268, "total_price": 0, "orginal_price": 368, "properties": "20509:28315;1627207:3224419", "properties_name": "20509:28315:尺码:M;1627207:3224419:颜色分类:驼色", "quantity": 200, "sku_id": "4919848192257" }, { "price": 268, "total_price": 0, "orginal_price": 368, "properties": "20509:28316;1627207:3224419", "properties_name": "20509:28316:尺码:L;1627207:3224419:颜色分类:驼色", "quantity": 200, "sku_id": "4919848192259" }, { "price": 268, "total_price": 0, "orginal_price": 368, "properties": "20509:28317;1627207:3224419", "properties_name": "20509:28317:尺码:XL;1627207:3224419:颜色分类:驼色", "quantity": 200, "sku_id": "4919848192261" } ] }, "seller_id": "3164479656", "sales": 700, "shop_id": "584941240", "props_list": { "1627207:14665273": "颜色分类:藕粉色", "1627207:28335": "颜色分类:绿色", "1627207:3224419": "颜色分类:驼色", "20509:28314": "尺码:S", "20509:28315": "尺码:M", "20509:28316": "尺码:L", "20509:28317": "尺码:XL" }, "seller_info": { "nick": "姬箐女装旗舰店", "item_score": 4.88648, "score_p": 4.92313, "delivery_score": 4.92335, "shop_type": "", "user_num_id": "3164479656", "sid": "584941240", "title": "", "zhuy": "https://shop584941240.taobao.com", "cert": null, "open_time": "", "credit_score": null, "shop_name": "姬箐女装旗舰店" }, "tmall": true, "error": "", "location": "浙江杭州", "data_from": "Ha", "has_discount": "true", "is_promotion": "true", "promo_type": null, "props_img": { "1627207:14665273": "http://img.alicdn.com/imgextra/i2/3164479656/O1CN01T3rr6d2LCVCcVupBL_!!3164479656.jpg", "1627207:28335": "http://img.alicdn.com/imgextra/i4/3164479656/O1CN01cg722v2LCVCwXdNno_!!3164479656.jpg", "1627207:3224419": "http://img.alicdn.com/imgextra/i3/3164479656/O1CN01UOvLGJ2LCVCt0MWM2_!!3164479656.jpg" }, "format_check": "ok", "desc_img": [ "http://assets.alicdn.com/kissy/1.0.0/build/imglazyload/spaceball.gif", "http://img.alicdn.com/imgextra/i4/3164479656/O1CN01fzSxMx2LCVD89FLhQ_!!3164479656.jpg", "http://img.alicdn.com/imgextra/i4/3164479656/O1CN01Lq92Yg2LCVChH7HoQ_!!3164479656.jpg", "http://img.alicdn.com/imgextra/i3/3164479656/O1CN01tWkGly2LCVCYochcI_!!3164479656.jpg", "http://img.alicdn.com/imgextra/i3/3164479656/O1CN01EOf4Yb2LCVCifCwkE_!!3164479656.jpg", "http://img.alicdn.com/imgextra/i3/3164479656/O1CN01jjWO622LCVCgo1WKW_!!3164479656.jpg", "http://img.alicdn.com/imgextra/i1/3164479656/O1CN01BKMiNl2LCVCifBKzD_!!3164479656.jpg", "http://img.alicdn.com/imgextra/i4/3164479656/O1CN01I6Jko52LCVCdx4HC6_!!3164479656.jpg", "http://img.alicdn.com/imgextra/i4/3164479656/O1CN01IGz7lC2LCVCYob5rL_!!3164479656.jpg", "http://img.alicdn.com/imgextra/i1/3164479656/O1CN017PFIXj2LCVCcWQNZ7_!!3164479656.jpg", "http://img.alicdn.com/imgextra/i4/3164479656/O1CN01K2zlv42LCVCdx6YYC_!!3164479656.jpg", "http://img.alicdn.com/imgextra/i4/3164479656/O1CN01p4R04y2LCVCg4VBi1_!!3164479656.jpg", "http://img.alicdn.com/imgextra/i4/3164479656/O1CN01DX1aOl2LCVCg4V7Z1_!!3164479656.jpg", "http://img.alicdn.com/imgextra/i1/3164479656/O1CN01ngAFeb2LCVCdXOJQz_!!3164479656.jpg", "http://img.alicdn.com/imgextra/i2/3164479656/O1CN01o6JN7T2LCVCdXOJRC_!!3164479656.jpg", "http://img.alicdn.com/imgextra/i3/3164479656/O1CN01gYp06n2LCVCbkvzRQ_!!3164479656.jpg", "http://img.alicdn.com/imgextra/i1/3164479656/O1CN01QgXLjF2LCVCYobd9i_!!3164479656.jpg", "http://img.alicdn.com/imgextra/i1/3164479656/O1CN01K36sGJ2LCVCSfxo2F_!!3164479656.jpg", "http://img.alicdn.com/imgextra/i4/3164479656/O1CN01aIUrg62LCVCZZoUJu_!!3164479656.jpg", "http://img.alicdn.com/imgextra/i2/3164479656/O1CN01tCLF652LCVCZZognX_!!3164479656.jpg", "http://img.alicdn.com/imgextra/i2/3164479656/O1CN01y0Og2M2LCVCcWPi0E_!!3164479656.jpg" ], "shop_item": [], "relate_items": [] }, "error": "", "secache": "8c58842c6bdefbfe2de353dd7a40bf42", "secache_time": 1672023478, "secache_date": "2022-12-26 10:57:58", "translate_status": "", "translate_time": 0, "language": { "default_lang": "cn", "current_lang": "cn" }, "reason": "", "error_code": "0000", "cache": 0, "api_info": "today:3 max:1000 all[3=3+0+0];expires:2023-08-14", "execution_time": "1.148", "server_time": "Beijing/2022-12-26 10:57:58", "client_ip": "106.6.39.250", "call_args": { "num_iid": "692253623772", "is_promotion": "1" }, "api_type": "taobao", "translate_language": "zh-CN", "translate_engine": "baidu_api", "server_memory": "5.99MB", "request_id": "gw-3.63a90db520433", "last_id": "1437004209" }

 

 

 

 

你可能感兴趣的:(API,python)