云盘搜爬虫
Published on 2024-05-30 15:37 in 分类: python 爬虫 with 萧海~
分类: python 爬虫

云盘搜爬虫

    import requests
    cookies = {
    '__vtins__3Egp6W6ZKbl41A1y': '%7B%22sid%22%3A%20%22bc2a93f0-68aa-5609-b792-91647e3f0813%22%2C%20%22vd%22%3A%201%2C%20%22stt%22%3A%200%2C%20%22dr%22%3A%200%2C%20%22expires%22%3A%201717056272498%2C%20%22ct%22%3A%201717054472498%7D',
    '__51uvsct__3Egp6W6ZKbl41A1y': '1',
    '__51vcke__3Egp6W6ZKbl41A1y': 'e546c07d-113c-52f1-ad0f-c5d47144357d',
    '__51vuft__3Egp6W6ZKbl41A1y': '1717054472501',
    }
    headers = {
    'accept': 'application/json, text/plain, */*',
    'accept-language': 'zh-CN,zh;q=0.9',
    'cache-control': 'no-cache',
    # Already added when you pass json=
    # 'content-type': 'application/json',
    # Requests sorts cookies= alphabetically
    # 'cookie': '__vtins__3Egp6W6ZKbl41A1y=%7B%22sid%22%3A%20%22bc2a93f0-68aa-5609-b792-91647e3f0813%22%2C%20%22vd%22%3A%201%2C%20%22stt%22%3A%200%2C%20%22dr%22%3A%200%2C%20%22expires%22%3A%201717056272498%2C%20%22ct%22%3A%201717054472498%7D; __51uvsct__3Egp6W6ZKbl41A1y=1; __51vcke__3Egp6W6ZKbl41A1y=e546c07d-113c-52f1-ad0f-c5d47144357d; __51vuft__3Egp6W6ZKbl41A1y=1717054472501',
    'origin': 'https://www.pixiaobao.com',
    'pragma': 'no-cache',
    'priority': 'u=1, i',
    'referer': 'https://www.pixiaobao.com/search?exact=false&page=1&q=%E5%BA%86%E4%BD%99%E5%B9%B42&share_time=&type=&user=',
    'sec-ch-ua': '"Google Chrome";v="125", "Chromium";v="125", "Not.A/Brand";v="24"',
    'sec-ch-ua-mobile': '?0',
    'sec-ch-ua-platform': '"Windows"',
    'sec-fetch-dest': 'empty',
    'sec-fetch-mode': 'cors',
    'sec-fetch-site': 'same-origin',
    'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0.0.0 Safari/537.36',
    }
    json_data = {
    'page': 1,
    'q': '庆余年2',
    'user': '',
    'exact': False,
    'format': [],
    'share_time': '',
    'size': 15,
    'type': '',
    'exclude_user': [],
    'adv_params': {
    'wechat_pwd': '',
    },
    }
    response = requests.post('https://www.pixiaobao.com/v1/search/disk', cookies=cookies, headers=headers, json=json_data)
    for item in response.json()['data']['list']:
    print(item['disk_name'],item['disk_id'])
    posted @   萧海~  阅读(28)  评论(0编辑  收藏  举报
    相关博文:
    阅读排行:
    · winform 绘制太阳,地球,月球 运作规律
    · AI与.NET技术实操系列(五):向量存储与相似性搜索在 .NET 中的实现
    · 超详细:普通电脑也行Windows部署deepseek R1训练数据并当服务器共享给他人
    · 【硬核科普】Trae如何「偷看」你的代码?零基础破解AI编程运行原理
    · 上周热点回顾(3.3-3.9)
    历史上的今天:
    2022-05-30 Leetcode 645. 错误的集合
    2022-05-30 Eclipse安装教程
    2022-05-30 JDK环境变量配置
    2022-05-30 Qt添加撤销-前进动作(转)
    2022-05-30 map、vector内存释放
    2022-05-30 C/C++常用工具库
    2022-05-30 Windows/Linux通用c语言日志log库(零依赖)
    点击右上角即可分享
    微信分享提示
    电磁波切换