拼多多搜索商品列表

{
“code”: 200,
“api”:“detail”,
“data”: {
“list”: [
{
“category_id”: 23611,
“category_name”: “鞋靴”,
“coupon_discount”: 600,
“coupon_end_time”: 1616947199,
“coupon_min_order_amount”: 600,
“coupon_remain_quantity”: 46000,
“coupon_start_time”: 1616428800,
“coupon_total_quantity”: 50000,
“desc_txt”: “高”,
“goods_desc”: “春夏季透气网鞋休闲板鞋学生潮鞋防臭运动鞋百搭帆布鞋黑色男鞋子”,
“goods_id”: 6808154717,
“goods_image_url”: “https://t00img.yangkeduo.com/goods/images/2020-05-20/33c4efc28ea48d08919b02fcf8a2f051.jpeg”,
“goods_name”: “春夏季透气网鞋休闲板鞋学生潮鞋防臭运动鞋百搭帆布鞋黑色男鞋子”,
“goods_sign”: “Y9n2o_-CzMlJ9NdBwfDZWPQkalKpG1H3_JQZqZXwgBv”,
“goods_thumbnail_url”: “https://t00img.yangkeduo.com/goods/images/2020-05-20/c927f70858dbf3ce37a51aa12ad8820e.jpeg”,
“has_coupon”: true,
“has_mall_coupon”: false,
“lgst_txt”: “高”,
“mall_coupon_discount_pct”: 0,
“mall_coupon_end_time”: 0,
“mall_coupon_id”: 0,
“mall_coupon_max_discount_amount”: 0,
“mall_coupon_min_order_amount”: 0,
“mall_coupon_remain_quantity”: 0,
“mall_coupon_start_time”: 0,
“mall_coupon_total_quantity”: 0,
“mall_cps”: 1,
“mall_id”: 562416,
“mall_name”: “精品鞋汇”,
“merchant_type”: 1,
“min_group_price”: 3500,
“min_normal_price”: 4600,
“only_scene_auth”: true,
“opt_id”: 23611,
“opt_name”: “鞋靴”,
“plan_type”: 2,
“predict_promotion_rate”: 147,
“promotion_rate”: 147,
“sales_tip”: “7.2万”,
“search_id”: “4120d52c-4af0-427d-9e61-73e369365703”,
“serv_txt”: “高”,
“service_tags”: [
3,
13
],
“share_rate”: 0,
“unified_tags”: [
“退货包运费”,
“48小时发货”
],
“zs_duo_id”: 0
},
{
“category_id”: 1281,
“category_name”: “鞋包”,
“coupon_discount”: 600,
“coupon_end_time”: 1616947199,
“coupon_min_order_amount”: 600,
“coupon_remain_quantity”: 46000,
“coupon_start_time”: 1616428800,
“coupon_total_quantity”: 50000,
“desc_txt”: “高”,
“goods_desc”: “男鞋春夏季休闲鞋韩版潮流男士运动鞋防水防滑跑步鞋皮面防臭鞋子”,
“goods_id”: 43725623106,
“goods_image_url”: “https://t00img.yangkeduo.com/goods/images/2019-10-13/5e7b0e4b-d06f-40dc-99a0-4f0f045d58d6.jpg”,
“goods_name”: “男鞋春夏季休闲鞋韩版潮流男士运动鞋防水防滑跑步鞋皮面防臭鞋子”,
“goods_sign”: “Y9r2qEQO8dZJ9NdBwfDZWHkd4B7j0dc0_JQ9AuGvkxv”,
“goods_thumbnail_url”: “https://t00img.yangkeduo.com/goods/images/2019-10-13/b5a2b45d5120b18ff070ae6d8d7777d5.jpeg”,
“has_coupon”: true,
“has_mall_coupon”: false,
“lgst_txt”: “高”,
“mall_coupon_discount_pct”: 0,
“mall_coupon_end_time”: 0,
“mall_coupon_id”: 0,
“mall_coupon_max_discount_amount”: 0,
“mall_coupon_min_order_amount”: 0,
“mall_coupon_remain_quantity”: 0,
“mall_coupon_start_time”: 0,
“mall_coupon_total_quantity”: 0,
“mall_cps”: 1,
“mall_id”: 562416,
“mall_name”: “精品鞋汇”,
“merchant_type”: 1,
“min_group_price”: 3500,
“min_normal_price”: 4990,
“only_scene_auth”: true,
“opt_id”: 1281,
“opt_name”: “鞋包”,
“plan_type”: 2,
“predict_promotion_rate”: 147,
“promotion_rate”: 147,
“sales_tip”: “9.8万”,
“search_id”: “4120d52c-4af0-427d-9e61-73e369365703”,
“serv_txt”: “高”,
“service_tags”: [

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
多多商品采集的Python源码可以如下所示: ``` import requests import json def get_pinduoduo_goods(keyword): url = "http://apiv4.yangkeduo.com/operation/19/groups?opt_type=3&offset=0&size=50&sort_type=DEFAULT&flip=&pdduid=" headers = { "User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36", "Referer": "http://mobile.yangkeduo.com/", "Cookie": "your_cookie" } response = requests.get(url + keyword, headers=headers) data = json.loads(response.text) goods_list = data['goods_list'] if 'goods_list' in data else [] for goods in goods_list: goods_id = goods['goods_id'] goods_name = goods['goods_name'] goods_price = goods['group']['price'] print("商品ID:", goods_id) print("商品名称:", goods_name) print("商品价格:", goods_price) print("---------------------") keyword = input("请输入要搜索商品关键字:") get_pinduoduo_goods(keyword) ``` 以上代码使用了requests库来发送HTTP请求,并使用json库解析返回的数据。通过构造合适的URL和headers,可以获取多多指定关键字商品的信息。将关键字作为参数传入`get_pinduoduo_goods`函数即可实现商品的采集和输出。 需要注意的是,由于多多网站的更新可能会导致以上代码失效,所以需要根据最新的网站结构和规则进行适当的调整。此外,代码中的“your_cookie”部分需要替换成有效的cookie信息才能正常运行。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值