代码拉取完成,页面将自动刷新
#!/usr/bin/env python
# -*- coding:utf-8 -*-
# @FileName :mall_bilibili.py
# @Time :2023/11/17
# @Author :CL
# @email :1037654919@qq.com
# 爬取 :https://mall.bilibili.com/#noReffer=true
import requests
import json
headers = {
"authority": "www.biligo.com",
"accept": "*/*",
"accept-language": "zh-CN,zh;q=0.9",
"cache-control": "no-cache",
"content-type": "application/json",
"origin": "https://www.biligo.com",
"pragma": "no-cache",
"referer": "https://www.biligo.com/list.html?noTitleBar=1&from=category_sb&category=1_107&scene=figure",
"sec-ch-ua": "\"Not.A/Brand\";v=\"8\", \"Chromium\";v=\"114\", \"Google Chrome\";v=\"114\"",
"sec-ch-ua-mobile": "?0",
"sec-ch-ua-platform": "\"Linux\"",
"sec-fetch-dest": "empty",
"sec-fetch-mode": "cors",
"sec-fetch-site": "same-origin",
"user-agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36"
}
url = "https://www.biligo.com/mall/noah/search/category/v2"
data = {
"keyword": "",
"filters": "",
"priceFlow": "",
"priceCeil": "",
"sortType": "totalrank",
"sortOrder": "",
"pageIndex": 1,
"userId": "",
"state": "",
"scene": "figure",
"termQueries": [
{
"field": "category",
"values": [
"1_107"
]
}
],
"rangeQueries": [],
"extra": []
}
data = json.dumps(data, separators=(',', ':'))
response = requests.post(url, headers=headers, data=data)
print(response.text)
print(response)
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。