乐趣区

关于淘宝:淘宝天猫商品详情爬取方案app详情sku数据如何获取

背景

商品详情蕴含了十分多的数据,如 sku、价格、库存、店铺名称、店铺 logo、开店工夫、旺旺、主图、题目等等,很多行业都有须要,比方电商相干行业、淘客、电商软件等都须要用到相干信息,然而官网个别又没有凋谢这些接口,怎么办?

解决方案

当初很多是通过爬虫获取数据,然而基本扛不住大量调用,不稳固,真能稳固获取了也不是个别人有能力去做的,加上淘宝变动频繁,防爬越来越严,技术难度和老本也越来越大,没有能力的也能够找第三方 api 提供商,方便快捷成本低

参考示例

{
    "code": 200,
    "msg": "success",
    "data": {
        "item_id": 639989970200,
        "title": "高尔夫胸包男士静止休闲多功能胸前包男女生腰包斜跨小包机能包潮",
        "category_id": "122654005",
        "root_category_id": "50006842",
        "currency": "CNY",
        "product_props": [
            {"品牌": "GOLF/ 高尔夫"},
            {"质地": "涤纶"},
            {"闭合形式": "拉链"},
            {"图案": "纯色"},
            {"格调": "欧美时尚"},
            {"成色": "全新"},
            {"风行元素": "车缝线"},
            {"色彩分类": "烟雾黑. 雅灰色."},
            {"有无夹层": "有"},
            {"上市工夫": "2021 年秋季"},
            {"是否可折叠": "否"},
            {"货号": "3G484902"},
            {"实用场景": "休闲"},
            {"里料材质": "织物"},
            {"肩带款式": "单根"},
            {"实用对象": "青年"},
            {"提拎部件类型": "软把"},
            {"箱包外袋品种": "内贴袋"},
            {"箱包硬度": "软"},
            {"样式": "胸包"},
            {"大小": "小"},
            {"销售渠道类型": "商场同款 ( 线上线下都销售)"
            }
        ],
        "main_imgs": [
            "https://img.alicdn.com/imgextra/i3/3398521191/O1CN01cdCihV1KfWSoJdASs_!!0-item_pic.jpg",
            "https://img.alicdn.com/imgextra/i1/3398521191/O1CN01yAXdwk1KfWNVDzUUV_!!3398521191.jpg",
            "https://img.alicdn.com/imgextra/i4/3398521191/O1CN01B06P1Z1KfWNawkLyp_!!3398521191.jpg",
            "https://img.alicdn.com/imgextra/i4/3398521191/O1CN01NjR8C01KfWNeQi7mX_!!3398521191.jpg",
            "https://img.alicdn.com/imgextra/i4/3398521191/O1CN018WESll1KfWNcMYYmd_!!3398521191.jpg"
        ],
        "video_url": "https://cloud.video.taobao.com/play/u/3398521191/p/2/e/6/t/1/313489603531.mp4",
        "comment_count": "764",
        "favorite_count": "2294",
        "shop_info": {
            "shop_name": "golf 逸君专卖店",
            "shop_id": "423767709",
            "shop_url": "//shop.m.taobao.com/shop/shop_index.htm?user_id=3398521191&item_id=639989970200",
            "shop_rate": [
                {
                    "title": "宝贝形容",
                    "type": "desc",
                    "score": "4.9"
                },
                {
                    "title": "卖家服务",
                    "type": "serv",
                    "score": "4.9"
                },
                {
                    "title": "物流服务",
                    "type": "post",
                    "score": "4.9"
                }
            ],
            "all_items_count": "323",
            "new_items_count": null,
            "good_rate_percentage": "100.00%",
            "followers": "3.4 万",
            "is_tmall": true,
            "is_gold_seller": false,
            "shop_logo": "//img.alicdn.com/imgextra//67/6a/TB1OOeSa.EIL1JjSZFFSuw5kVXa.jpg",
            "shop_start_time": "2017-08-21 18:00:37",
            "seller_id": "3398521191",
            "wangwang": "https://amos.alicdn.com/getcid.aw?groupid=0&s=1&Kwmw88&charset=utf-8&uid=golf%E9%80%B8%E5%90%9B%E4%B8%93%E5%8D%96%E5%BA%97&site=cntaobao&mebEAA"
        },
        "delivery_info": {
            "area_from": [
                "广东省",
                "广州市"
            ],
            "area_id": "610102",
            "postage": "0"
        },
        "sku_props": [
            {
                "prop_name": "色彩分类",
                "pid": "1627207",
                "values": [
                    {
                        "name": "烟雾黑.",
                        "vid": "1318628226",
                        "imageUrl": "https://img.alicdn.com/imgextra/i2/3398521191/O1CN01tmkZPF1KfWQMb5zKS_!!3398521191.jpg"
                    },
                    {
                        "name": "雅灰色.",
                        "vid": "828696142",
                        "imageUrl": "https://img.alicdn.com/imgextra/i3/3398521191/O1CN01cKnlSM1KfWQN9t1EO_!!3398521191.jpg"
                    }
                ]
            }
        ],
        "skus": [
            {
                "skuid": "4738838588906",
                "sale_price": "149",
                "origin_price": "209.00",
                "stock": "200",
                "props_ids": "1627207:1318628226",
                "sub_price": "129",
                "sub_price_type": "pre-sale balance"
            },
            {
                "skuid": "4738838588907",
                "sale_price": "149",
                "origin_price": "209.00",
                "stock": "85",
                "props_ids": "1627207:828696142",
                "sub_price": "129",
                "sub_price_type": "pre-sale balance"
            }
        ],
        "promotions": [
            {
                "content": "淘金币可抵 4.47 元",
                "sub_content": "淘金币可抵 4.47 元",
                "start_time": "","end_time":"",
                "type": "default"
            },
            {
                "content": "满 149 减 20",
                "sub_content": "满 149 减 20",
                "start_time": "2022-04-16 00:00:00",
                "end_time": "2022-04-23 19:59:59",
                "type": "default"
            },
            {
                "content": "满 149 元, 省 20 元",
                "sub_content": "焕新价减 20",
                "start_time": "2022-04-16 00:00",
                "end_time": "2022-04-23 19:59",
                "type": "3"
            }
        ],
        "buy_enable": true,
        "cart_enable": true
    }
}
退出移动版