prepare:cookie 里没有 a1 时先换一份 guest cookie(scripting → webprofile → activate 三个会话请求),已有 a1 则直接跳过。翻页不是声明式的 —— cursor_score 要手动续传上一页响应的 data.cursor_score。num / refresh_type / note_index / category 都有内置默认值,不传就走默认。curl --location 'http://localhost:4567/api/xiaohongshu/fetch_home_feed?cursor_score=undefined&num=undefined&refresh_type=undefined¬e_index=undefined&category=undefined&search_key=undefined'success 判别{
"success": true,
"data": {
"code": 0,
"data": {
"cursor_score": "string",
"items": [
{
"id": "string",
"ignore": true,
"model_type": "string",
"note_card": {
"cover": {
"file_id": "string",
"height": 0,
"info_list": [
{
"image_scene": "string",
"url": "string"
}
],
"url": "string",
"url_default": "string",
"url_pre": "string",
"width": 0
},
"display_title": "string",
"interact_info": {
"liked": true,
"liked_count": "string"
},
"type": "string",
"user": {
"avatar": "string",
"nick_name": "string",
"nickname": "string",
"user_id": "string",
"xsec_token": "string"
},
"video": {
"capa": {
"duration": 0
}
}
},
"track_id": "string",
"xsec_token": "string"
}
]
},
"msg": "string",
"success": true
},
"message": "获取成功",
"meta": {
"requestId": "string",
"clientId": "string",
"platform": "douyin",
"endpoint": "string",
"durationMs": 0,
"attempts": 0,
"trace": [
{
"url": "string",
"method": "string",
"status": 0,
"durationMs": 0,
"reason": "initial",
"retryOf": "string"
}
]
},
"requestPath": "/api/bilibili/fetch_one_video?bvid=BV1xx"
}