背景
在很多行业,比如商品采集、刊登、数据分析行业都需要用到相关的商品接口,但是官方一般又没有开放这些接口,怎么办?
解决方案
js逆向爬虫倒是很简单,但是根本扛不住大量调用,不稳定,目前主流的方案都是逆向APP获取数据,但是这个不是一般人又能力去做的,加上淘宝变化频繁,防爬越来越严,技术难度和成本也越来越大,没有能力的也可以找第三方api提供商
参考示例
{
"code": 200,
"msg": "success",
"data": {
"item_id": 638424990701,
"title": "东成电锤电镐电钻多功能大功率冲击钻工业混凝土家用电动工具电捶",
"category_id": "50006222",
"root_category_id": "50020485",
"currency": "CNY",
"product_props": [
{
"基本信息": [
{
"品牌": "东成"
},
{
"型号": "DZC1100-28"
},
{
"产地": "中国大陆"
},
{
"电源方式": "交流电"
},
{
"颜色分类": "【旗舰款带离合】【1100W双用】标准套餐 【旗舰款带离合】【1100W双用】钻孔套餐 【旗舰款带离合】【1100W双用】开槽套餐 【旗舰款带离合】【1100W双用】穿墙套餐 【专业款】【750W单用】标准套餐 【专业款】【750W单用】钻孔套餐 【专业款】【750W单用】穿墙套餐 【工业款】【750W双用】标准套餐 【工业款】【750W双用】钻孔套餐 【工业款】【750W双用】开槽套餐 【工业款】【750W双用】穿墙套餐"
},
{
"电压": "220V"
},
{
"调速": "无"
},
{
"夹头类型": "四坑"
},
{
"工作方式": "锤钻"
},
{
"操作方式": "手持式"
},
{
"有无正反转向": "无"
}
]
}
],
"main_imgs": [
"https://img.alicdn.com/imgextra/i2/3319188973/O1CN01vheroL2G9gbm0YMdZ_!!3319188973-0-lubanu-s.jpg",
"https://img.alicdn.com/imgextra/i3/3319188973/O1CN01d3LTRL2G9gYbRsbw3_!!3319188973.jpg",
"https://img.alicdn.com/imgextra/i2/3319188973/O1CN011nE97a2G9gYZZGEUw_!!3319188973.jpg",
"https://img.alicdn.com/imgextra/i1/3319188973/O1CN01VxPWbD2G9gYhtl6MN_!!3319188973.jpg",
"https://img.alicdn.com/imgextra/i2/3319188973/O1CN01eAngGy2G9gaEocUIi_!!3319188973.jpg"
],
"video_url": "https://cloud.video.taobao.com/play/u/3319188973/p/2/e/6/t/1/300168437152.mp4",
"comment_count": "4448",
"shop_info": {
"shop_name": "东成电动工具旗舰店",
"shop_id": "345147752",
"shop_url": "//shop.m.taobao.com/shop/shop_index.htm?user_id=3319188973&item_id=638424990701",
"shop_rate": [
{
"title": "宝贝描述",
"type": "desc",
"score": "4.8 "
},
{
"title": "卖家服务",
"type": "serv",
"score": "4.8 "
},
{
"title": "物流服务",
"type": "post",
"score": "4.8 "
}
],
"good_rate_percentage": "100.00%",
"followers": "21.3万",
"is_tmall": true,
"is_gold_seller": false,
"shop_logo": "//img.alicdn.com/imgextra//b0/00/TB1Qr_JFruWBuNjSszgSuv8jVXa.jpg",
"shop_start_time": "2017-06-05 17:33:27",
"seller_id": "3319188973",
"wangwang": "https://amos.alicdn.com/getcid.aw?groupid=0&s=1&cob2Un&charset=utf-8&uid=%E4%B8%9C%E6%88%90%E7%94%B5%E5%8A%A8%E5%B7%A5%E5%85%B7%E6%97%97%E8%88%B0%E5%BA%97&site=cntaobao&aBItN0"
},
"delivery_info": {
"area_from": [
"江苏省",
"南通市"
],
"area_id": "442000",
"postage": "0"
},
"sku_props": [
{
"prop_name": "颜色分类",
"pid": "1627207",
"values": [
{
"name": "【旗舰款带离合】【1100W双用】标准套餐",
"vid": "3232478",
"imageUrl": "https://img.alicdn.com/imgextra/i1/3319188973/O1CN01aQcIFs2G9gbsLGrmq_!!3319188973.jpg"
},
{
"name": "【旗舰款带离合】【1100W双用】钻孔套餐",
"vid": "3232479",
"imageUrl": "https://img.alicdn.com/imgextra/i2/3319188973/O1CN01WmZnFj2G9gbsLJLdy_!!3319188973.jpg"
},
{
"name": "【旗舰款带离合】【1100W双用】开槽套餐",
"vid": "5167321",
"imageUrl": "https://img.alicdn.com/imgextra/i4/3319188973/O1CN01wZDwQM2G9gbv5NkTt_!!3319188973.jpg"
},
{
"name": "【旗舰款带离合】【1100W双用】穿墙套餐",
"vid": "28340",
"imageUrl": "https://img.alicdn.com/imgextra/i4/3319188973/O1CN01Ih42KZ2G9gbv5N958_!!3319188973.jpg"
},
{
"name": "【专业款】【750W单用】标准套餐",
"vid": "3232480",
"imageUrl": "https://img.alicdn.com/imgextra/i3/3319188973/O1CN01vxzuCz2G9gbqnU1Rw_!!3319188973.jpg"
},
{
"name": "【专业款】【750W单用】钻孔套餐",
"vid": "4266701",
"imageUrl": "https://img.alicdn.com/imgextra/i2/3319188973/O1CN01lVTzLW2G9gbv7RiGx_!!3319188973.jpg"
},
{
"name": "【专业款】【750W单用】穿墙套餐",
"vid": "3594022",
"imageUrl": "https://img.alicdn.com/imgextra/i4/3319188973/O1CN01ElKG7D2G9gc3Ai4TT_!!3319188973.jpg"
},
{
"name": "【工业款】【750W双用】标准套餐",
"vid": "80882",
"imageUrl": "https://img.alicdn.com/imgextra/i2/3319188973/O1CN01AUi56R2G9gbm5MqBf_!!3319188973.jpg"
},
{
"name": "【工业款】【750W双用】钻孔套餐",
"vid": "28320",
"imageUrl": "https://img.alicdn.com/imgextra/i3/3319188973/O1CN01tVdlrA2G9gbzbg7A3_!!3319188973.jpg"
},
{
"name": "【工业款】【750W双用】开槽套餐",
"vid": "28334",
"imageUrl": "https://img.alicdn.com/imgextra/i3/3319188973/O1CN01cd5Wal2G9gbzbh7ZZ_!!3319188973.jpg"
},
{
"name": "【工业款】【750W双用】穿墙套餐",
"vid": "5483105",
"imageUrl": "https://img.alicdn.com/imgextra/i4/3319188973/O1CN01L0OU9W2G9gc2RcSRQ_!!3319188973.jpg"
}
]
}
],
"skus": [
{
"skuid": "4925063223553",
"sale_price": "538",
"stock": "1175",
"props_ids": "1627207:3232478"
},
{
"skuid": "4925063223554",
"sale_price": "558",
"stock": "620",
"props_ids": "1627207:3232479"
},
{
"skuid": "4925063223558",
"sale_price": "578",
"stock": "559",
"props_ids": "1627207:5167321"
},
{
"skuid": "4925063223552",
"sale_price": "578",
"stock": "109",
"props_ids": "1627207:28340"
},
{
"skuid": "4925063223555",
"sale_price": "378",
"stock": "1209",
"props_ids": "1627207:3232480"
},
{
"skuid": "4925063223557",
"sale_price": "398",
"stock": "492",
"props_ids": "1627207:4266701"
},
{
"skuid": "4925063223556",
"sale_price": "408",
"stock": "213",
"props_ids": "1627207:3594022"
},
{
"skuid": "4925063223560",
"sale_price": "438",
"stock": "1143",
"props_ids": "1627207:80882"
},
{
"skuid": "4925063223550",
"sale_price": "488",
"stock": "512",
"props_ids": "1627207:28320"
},
{
"skuid": "4925063223551",
"sale_price": "508",
"stock": "529",
"props_ids": "1627207:28334"
},
{
"skuid": "4925063223559",
"sale_price": "508",
"stock": "178",
"props_ids": "1627207:5483105"
}
]
}
}