| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117 |
- # -*- coding: utf-8 -*-
- # Author : Charley
- # Python : 3.10.8
- # Date : 2025/7/2 16:02
- from loguru import logger
- from qd_toy_spider.utils import request_get_data
- # url = "https://api.qiandao.com/shelf-web/list-home-recommender"
- # params = {
- # "offset": "0",
- # "limit": "20",
- # "cmd": "b2c_homepage_feed",
- # "name": "",
- # "project": "",
- # "recommendTagIds%5B%5D": [
- # "307",
- # "682",
- # "302",
- # "305",
- # "1163995",
- # "50124",
- # "303",
- # "1153225",
- # "525",
- # "57703",
- # "1285426",
- # "313",
- # "671",
- # "589",
- # "590",
- # "10210",
- # "1206",
- # "1387773",
- # "1424125",
- # "1270645",
- # "1285466",
- # "42474"
- # ],
- # "fixedShelfId": "568851822601738191",
- # "withLive": "true"
- # }
- # [
- # 307,
- # 682,
- # 302,
- # 305,
- # 1163995,
- # 50124,
- # 303,
- # 1153225,
- # 525,
- # 57703,
- # 1285426,
- # 313,
- # 671,
- # 589,
- # 590,
- # 10210,
- # 1206,
- # 1387773,
- # 1424125,
- # 1270645,
- # 1285466,
- # 42474
- # ]
- #
- # # 请求参数
- # params = {
- # "offset": 0,
- # "limit": 20,
- # "cmd": "b2c_homepage_feed",
- # "name": "",
- # "project": "",
- # "recommendTagIds": [
- # 49695,
- # 1572285,
- # 1542944,
- # 1541805,
- # 1515843,
- # 1436291,
- # 1422849,
- # 1398583,
- # 1132249,
- # 1000375
- # ],
- # "fixedShelfId": 568851822601738191,
- # "withLive": "true"
- # }
- #
- # url = "https://api.qiandao.com/shelf-web/list-home-recommender"
- url = "https://api.qiandao.com/shelf-web/list-home-recommender"
- params = {
- "limit": 10,
- "offset": 0,
- "cmd": "b2c_homepage_feed",
- "project": "channel",
- "name": "manghe",
- "type": [
- "BLIND_BOX_MACHINE",
- "KUJI",
- "NEW_LUCKY_BAG",
- "B2C"
- ],
- "typeIds": 15,
- "channelId": 397228442736842784,
- "screenName": "推荐"
- }
- # 发送 GET 请求
- try:
- response = request_get_data(logger, url, params)
- print(response)
- except Exception as e:
- logger.error(f"Request failed: {e}")
|