某红书发布接口源码点赞评论收藏源码【2024-09-30更新】

某红书发布接口源码点赞评论收藏源码-多点部落
某红薯发布接口+x-sx-tx-s-c
此内容为付费资源,请付费后查看
899
主环境Python
相关依赖环境docker
付费资源

接口文档:小红书创作者接口文档

关联接口

  1. 获取@用户API
  2. 获取话题API
  3. 发布图文笔记API
  4. 发布视频笔记API

获取@用户API

API

url : https://127.0.0.1:8000/get_at_user/
mothod:POST
Content-Type:multipart/form-data; boundary=

请求体multipart/form-data

参数名参数值类型必填说明
cookiestr填写你自己的某红薯WEB端首页cookie字符串
keyword范某冰str要获取用户的用户名

请求示例

import requests

url = "http://127.0.0.1:8000/get_at_user/"

payload={}

headers = {
   'Accept': '*/*',
   'Host': '127.0.0.1:8000',
   'Connection': 'keep-alive',
   'Content-Type': 'multipart/form-data; boundary=--------------------------079144720179326830652880'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)

响应示例

{
    "code": 200,
    "data": [
        {
            "user_base_dto": {
                "red_official_verified": true,
                "red_official_verify_type": 1,
                "show_red_official_verify_icon": true,
                "image": "https://sns-avatar-qc.xhscdn.com/avatar/63635e773cc96e477cccdddb.jpg?imageView2/2/w/80/format/jpg",
                "image_size_large": "https://sns-avatar-qc.xhscdn.com/avatar/63635e773cc96e477cccdddb.jpg?imageView2/2/w/120/format/jpg",
                "followed": false,
                "group_id": "58e9def8f5a2635e3a11ad59",
                "red_id": "261244460",
                "user_id": "5a13b53b4eacab190f3d0667",
                "user_nickname": "范冰冰",
                "desc": "一枚只说实话的小白鼠冰……"
            },
            "fstatus": "none",
            "fans_total": 0,
            "discovery_total": 0
        },
        {
            "user_base_dto": {
                "user_nickname": "范冰儿",
                "image": "https://sns-avatar-qc.xhscdn.com/avatar/625ac3ad630f07e989f6ac11.jpg?imageView2/2/w/80/format/jpg",
                "followed": false,
                "red_id": "6038226173",
                "show_red_official_verify_icon": false,
                "user_id": "625811ed000000001000863d",
                "desc": "一个没有走丟的美姐",
                "image_size_large": "https://sns-avatar-qc.xhscdn.com/avatar/625ac3ad630f07e989f6ac11.jpg?imageView2/2/w/120/format/jpg",
                "red_official_verified": false,
                "red_official_verify_type": 0
            },
            "fstatus": "none",
            "fans_total": 0,
            "discovery_total": 0
        },
        {
            "fans_total": 0,
            "discovery_total": 0,
            "user_base_dto": {
                "user_nickname": "范冰樱",
                "image": "https://sns-avatar-qc.xhscdn.com/avatar/1040g2jo30vav3heol4005nk72ip08o4igee1r0o?imageView2/2/w/80/format/jpg",
                "followed": false,
                "red_id": "fbyfanbingying",
                "show_red_official_verify_icon": false,
                "user_id": "5e8714b20000000001006092",
                "desc": "09 谢谢喜欢 不要🔪图\n🈴️ by10.29@qq.com\n🎶同名 👭@冯韵颐",
                "image_size_large": "https://sns-avatar-qc.xhscdn.com/avatar/1040g2jo30vav3heol4005nk72ip08o4igee1r0o?imageView2/2/w/120/format/jpg",
                "red_official_verified": false,
                "red_official_verify_type": 0
            },
            "fstatus": "none"
        },
        {
            "user_base_dto": {
                "image_size_large": "https://sns-avatar-qc.xhscdn.com/avatar/63903bf10e879fd1278f04bf.jpg?imageView2/2/w/120/format/jpg",
                "red_official_verified": false,
                "user_id": "60ef8c34000000000100b04b",
                "desc": "爱豆: 袁冰妍白澍范丞丞\n        冰淇淋 澍芽 丞星",
                "followed": false,
                "red_official_verify_type": 0,
                "show_red_official_verify_icon": false,
                "red_id": "9531631717",
                "user_nickname": "范冰澍",
                "image": "https://sns-avatar-qc.xhscdn.com/avatar/63903bf10e879fd1278f04bf.jpg?imageView2/2/w/80/format/jpg"
            },
            "fstatus": "none",
            "fans_total": 0,
            "discovery_total": 0
        },
        {
            "fans_total": 0,
            "discovery_total": 0,
            "user_base_dto": {
                "user_nickname": "范水不冰",
                "desc": "我还希望能在那个冬天遇见你🙉\n\n\n想加蛋仔好友私信我🙈",
                "image": "https://sns-avatar-qc.xhscdn.com/avatar/1040g2jo30tblve923u6g5nhq6iu08ffbs2ooc5o?imageView2/2/w/80/format/jpg",
                "red_official_verify_type": 0,
                "user_id": "5e3a34bc0000000001003deb",
                "image_size_large": "https://sns-avatar-qc.xhscdn.com/avatar/1040g2jo30tblve923u6g5nhq6iu08ffbs2ooc5o?imageView2/2/w/120/format/jpg",
                "followed": false,
                "red_official_verified": false,
                "show_red_official_verify_icon": false,
                "red_id": "487305918"
            },
            "fstatus": "none"
        },
        {
            "user_base_dto": {
                "user_nickname": "范冰冰",
                "red_official_verified": false,
                "red_official_verify_type": 0,
                "show_red_official_verify_icon": false,
                "red_id": "GUO1996marry",
                "user_id": "6457fb610000000029011de4",
                "desc": "还没有简介",
                "image": "https://sns-avatar-qc.xhscdn.com/avatar/1040g2jo30png8aasmk005p2nvdgqa7f43vftim0?imageView2/2/w/80/format/jpg",
                "image_size_large": "https://sns-avatar-qc.xhscdn.com/avatar/1040g2jo30png8aasmk005p2nvdgqa7f43vftim0?imageView2/2/w/120/format/jpg",
                "followed": false
            },
            "fstatus": "none",
            "fans_total": 0,
            "discovery_total": 0
        },
        {
            "user_base_dto": {
                "desc": "还没有简介",
                "red_official_verify_type": 0,
                "show_red_official_verify_icon": false,
                "image_size_large": "https://sns-avatar-qc.xhscdn.com/avatar/634513398c9ea7f1fbd784c9.jpg?imageView2/2/w/120/format/jpg",
                "followed": false,
                "red_official_verified": false,
                "red_id": "1808692396",
                "user_id": "603e0cc5000000000101e908",
                "user_nickname": "范冰冰",
                "image": "https://sns-avatar-qc.xhscdn.com/avatar/634513398c9ea7f1fbd784c9.jpg?imageView2/2/w/80/format/jpg"
            },
            "fstatus": "none",
            "fans_total": 0,
            "discovery_total": 0
        },
        {
            "fans_total": 0,
            "discovery_total": 0,
            "user_base_dto": {
                "user_nickname": "某冰",
                "red_official_verified": false,
                "red_official_verify_type": 0,
                "show_red_official_verify_icon": false,
                "user_id": "5d7ce4d0000000000100bd55",
                "desc": "冰莲挂了,没有简介",
                "image": "https://sns-avatar-qc.xhscdn.com/avatar/5f461022f98ae00001304b64.jpg?imageView2/2/w/80/format/jpg",
                "image_size_large": "https://sns-avatar-qc.xhscdn.com/avatar/5f461022f98ae00001304b64.jpg?imageView2/2/w/120/format/jpg",
                "followed": false,
                "red_id": "599896978"
            },
            "fstatus": "none"
        },
        {
            "user_base_dto": {
                "image_size_large": "https://sns-avatar-qc.xhscdn.com/avatar/6410840a2a05a5c7c47f9876.jpg?imageView2/2/w/120/format/jpg",
                "followed": false,
                "show_red_official_verify_icon": false,
                "user_nickname": "-范冰冰",
                "desc": "",
                "image": "https://sns-avatar-qc.xhscdn.com/avatar/6410840a2a05a5c7c47f9876.jpg?imageView2/2/w/80/format/jpg",
                "red_official_verified": false,
                "red_official_verify_type": 0,
                "red_id": "Bailey_226",
                "user_id": "5c15f77c0000000005012b10"
            },
            "fstatus": "none",
            "fans_total": 0,
            "discovery_total": 0
        },
        {
            "fans_total": 0,
            "discovery_total": 0,
            "user_base_dto": {
                "red_official_verified": false,
                "red_official_verify_type": 0,
                "show_red_official_verify_icon": false,
                "user_nickname": "某范",
                "desc": "没有什么捷径,书山有路勤为径。",
                "image": "https://sns-avatar-qc.xhscdn.com/avatar/1000g2jo2li94rumii06g4a3ae2qbcomcc8n1ii8?imageView2/2/w/80/format/jpg",
                "followed": false,
                "user_id": "5aa774b6e8ac2b57b0e062cc",
                "image_size_large": "https://sns-avatar-qc.xhscdn.com/avatar/1000g2jo2li94rumii06g4a3ae2qbcomcc8n1ii8?imageView2/2/w/120/format/jpg",
                "red_id": "636501474"
            },
            "fstatus": "none"
        },
        {
            "user_base_dto": {
                "image_size_large": "https://sns-avatar-qc.xhscdn.com/avatar/60fe238a20ec77c02b1e856d.jpg?imageView2/2/w/120/format/jpg",
                "show_red_official_verify_icon": false,
                "red_id": "FBY1314521",
                "user_id": "5ae065034eacab5135e02c0e",
                "image": "https://sns-avatar-qc.xhscdn.com/avatar/60fe238a20ec77c02b1e856d.jpg?imageView2/2/w/80/format/jpg",
                "followed": false,
                "red_official_verified": false,
                "red_official_verify_type": 0,
                "user_nickname": "范范冰莹",
                "desc": "|文案📃|养肉|旅游|晒娃|追剧|\n热爱生活,谢谢宝关注😁"
            },
            "fstatus": "none",
            "fans_total": 0,
            "discovery_total": 0
        },
        {
            "user_base_dto": {
                "show_red_official_verify_icon": false,
                "red_id": "3817377531",
                "red_official_verified": false,
                "red_official_verify_type": 0,
                "user_id": "631b23fb000000002303f074",
                "user_nickname": "小范冰冰",
                "desc": "嗨你们好我是小范冰冰你们可以叫我冰冰\n希望你成为我的粉丝=͟͟͞💌",
                "image": "https://sns-avatar-qc.xhscdn.com/avatar/1040g2jo30ngkjp6umi6g5oor4ftovs3kaptbqio?imageView2/2/w/80/format/jpg",
                "image_size_large": "https://sns-avatar-qc.xhscdn.com/avatar/1040g2jo30ngkjp6umi6g5oor4ftovs3kaptbqio?imageView2/2/w/120/format/jpg",
                "followed": false
            },
            "fstatus": "none",
            "fans_total": 0,
            "discovery_total": 0
        },
        {
            "user_base_dto": {
                "user_nickname": "范冰冰",
                "followed": false,
                "red_official_verify_type": 0,
                "show_red_official_verify_icon": false,
                "red_id": "183440863",
                "user_id": "5b001b506b58b703fbe31e4b",
                "desc": "",
                "image": "https://sns-avatar-qc.xhscdn.com/avatar/62b59008d3b03cbb5917761b.jpg?imageView2/2/w/80/format/jpg",
                "image_size_large": "https://sns-avatar-qc.xhscdn.com/avatar/62b59008d3b03cbb5917761b.jpg?imageView2/2/w/120/format/jpg",
                "red_official_verified": false
            },
            "fstatus": "none",
            "fans_total": 0,
            "discovery_total": 0
        },
        {
            "user_base_dto": {
                "red_id": "yeah10086",
                "user_nickname": "范饼冰",
                "desc": "👩🏼‍❤️‍💋‍👨🏻:在读研究生情侣📚@f(x) \n🔖:分享好吃好玩的日常\n🫶:努力和男朋友逛吃逛吃哈尔滨每一个角落😋",
                "image": "https://sns-avatar-qc.xhscdn.com/avatar/1040g2jo30q7316avn4005nd5bqdg9704qg1bit0?imageView2/2/w/80/format/jpg",
                "followed": false,
                "show_red_official_verify_icon": false,
                "user_id": "5da55e9b0000000001009c04",
                "image_size_large": "https://sns-avatar-qc.xhscdn.com/avatar/1040g2jo30q7316avn4005nd5bqdg9704qg1bit0?imageView2/2/w/120/format/jpg",
                "red_official_verified": false,
                "red_official_verify_type": 0
            },
            "fstatus": "none",
            "fans_total": 0,
            "discovery_total": 0
        },
        {
            "fans_total": 0,
            "discovery_total": 0,
            "user_base_dto": {
                "red_official_verify_type": 0,
                "user_id": "5d34622100000000120115f7",
                "user_nickname": "范冰冰",
                "image_size_large": "https://sns-avatar-qc.xhscdn.com/avatar/6114f437bc90089b8593f0bf.jpg?imageView2/2/w/120/format/jpg",
                "followed": false,
                "red_id": "452289013",
                "desc": "看到我请叫我去学习,谢谢🙏",
                "image": "https://sns-avatar-qc.xhscdn.com/avatar/6114f437bc90089b8593f0bf.jpg?imageView2/2/w/80/format/jpg",
                "red_official_verified": false,
                "show_red_official_verify_icon": false
            },
            "fstatus": "none"
        },
        {
            "discovery_total": 0,
            "user_base_dto": {
                "image_size_large": "https://sns-avatar-qc.xhscdn.com/avatar/1000g2jo2hl3gce4io0605o0u9jkg8kl6vndt45o?imageView2/2/w/120/format/jpg",
                "red_official_verify_type": 0,
                "show_red_official_verify_icon": false,
                "user_nickname": "范冰冰",
                "desc": "会变好的就像你曾经期待的那样",
                "image": "https://sns-avatar-qc.xhscdn.com/avatar/1000g2jo2hl3gce4io0605o0u9jkg8kl6vndt45o?imageView2/2/w/80/format/jpg",
                "red_id": "2636663324",
                "user_id": "601e4ce900000000010052a6",
                "followed": false,
                "red_official_verified": false
            },
            "fstatus": "none",
            "fans_total": 0
        },
        {
            "user_base_dto": {
                "user_id": "619396ba000000002102903d",
                "image_size_large": "https://sns-avatar-qc.xhscdn.com/avatar/1040g2jo30pnq7j016s605ocjiqt8d41t2rlqv20?imageView2/2/w/120/format/jpg",
                "followed": false,
                "red_official_verified": false,
                "red_official_verify_type": 0,
                "show_red_official_verify_icon": false,
                "user_nickname": "冰某人",
                "desc": "为什么我的眼中常含泪水?\n因为我他妈困的要死",
                "image": "https://sns-avatar-qc.xhscdn.com/avatar/1040g2jo30pnq7j016s605ocjiqt8d41t2rlqv20?imageView2/2/w/80/format/jpg",
                "red_id": "6310898796"
            },
            "fstatus": "none",
            "fans_total": 0,
            "discovery_total": 0
        },
        {
            "fstatus": "none",
            "fans_total": 0,
            "discovery_total": 0,
            "user_base_dto": {
                "image": "https://sns-avatar-qc.xhscdn.com/avatar/1040g2jo3107r7gaa5o005n9ijeskcha7vopjcjg?imageView2/2/w/80/format/jpg",
                "image_size_large": "https://sns-avatar-qc.xhscdn.com/avatar/1040g2jo3107r7gaa5o005n9ijeskcha7vopjcjg?imageView2/2/w/120/format/jpg",
                "followed": false,
                "red_official_verified": false,
                "user_id": "5d329bb90000000011024547",
                "user_nickname": "范冰冰",
                "desc": "小红书爱好者,只要你给我点关注我会秒回并发教程的",
                "red_official_verify_type": 0,
                "show_red_official_verify_icon": false,
                "red_id": "816559619"
            }
        },
        {
            "user_base_dto": {
                "user_nickname": "范冰冰",
                "desc": "不打扮,不攀比",
                "red_official_verify_type": 0,
                "red_id": "272265701",
                "red_official_verified": false,
                "show_red_official_verify_icon": false,
                "user_id": "5a5f1dfb4eacab12061a2fa6",
                "image": "https://sns-avatar-qc.xhscdn.com/avatar/61d5b14ab6827e35d2ebfd02.jpg?imageView2/2/w/80/format/jpg",
                "image_size_large": "https://sns-avatar-qc.xhscdn.com/avatar/61d5b14ab6827e35d2ebfd02.jpg?imageView2/2/w/120/format/jpg",
                "followed": false
            },
            "fstatus": "none",
            "fans_total": 0,
            "discovery_total": 0
        },
        {
            "fstatus": "none",
            "fans_total": 0,
            "discovery_total": 0,
            "user_base_dto": {
                "red_official_verify_type": 0,
                "user_id": "6174cea90000000002027bfa",
                "desc": "还没有简介",
                "image_size_large": "https://sns-avatar-qc.xhscdn.com/avatar/1040g2jo310oq7g1omc005obkpqkgkuvqobbvn28?imageView2/2/w/120/format/jpg",
                "followed": false,
                "red_official_verified": false,
                "show_red_official_verify_icon": false,
                "red_id": "9445172291",
                "user_nickname": "范冰冰",
                "image": "https://sns-avatar-qc.xhscdn.com/avatar/1040g2jo310oq7g1omc005obkpqkgkuvqobbvn28?imageView2/2/w/80/format/jpg"
            }
        }
    ],
    "message": "成功"
}

获取话题API

API

url : https://127.0.0.1:8000/get_suggest_topic/
mothod:POST
Content-Type:multipart/form-data; boundary=

请求体multipart/form-data

参数名参数值类型必填说明
cookiestr填写你自己的某红薯WEB端首页cookie字符串
keywordPythonstr要获取话题的名称

请求示例

import requests

url = "http://127.0.0.1:8000/get_suggest_topic/"

payload={}

headers = {
   'Accept': '*/*',
   'Host': '127.0.0.1:8000',
   'Connection': 'keep-alive',
   'Content-Type': 'multipart/form-data; boundary=--------------------------079144720179326830652880'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)

响应示例

{
    "code": 200,
    "data": [
        {
            "id": "5d35dd9b000000000e0088dc",
            "name": "Python",
            "link": "https://www.xiaohongshu.com/page/topics/5d35dd9ba059940001703e38?naviHidden=yes",
            "view_num": 359712878,
            "type": "official",
            "smart": false
        },
        {
            "id": "608b992400000000010089c5",
            "name": "python",
            "link": "https://www.xiaohongshu.com/page/topics/608b992458b0ca0001b5540c?naviHidden=yes",
            "view_num": 135769944,
            "type": "official",
            "smart": false
        },
        {
            "view_num": 99056283,
            "type": "official",
            "smart": false,
            "id": "5c0537823eb024000140b613",
            "name": "python学习",
            "link": "https://www.xiaohongshu.com/page/topics/5c053782f5aff90001fa265a?naviHidden=yes"
        },
        {
            "view_num": 57235876,
            "type": "official",
            "smart": false,
            "id": "5d0af114000000000e03b2c2",
            "name": "python自学",
            "link": "https://www.xiaohongshu.com/page/topics/5d0af114f5fbd30001d0beaa?naviHidden=yes"
        },
        {
            "smart": false,
            "id": "5e4fa2fb0000000001008a34",
            "name": "python编程",
            "link": "https://www.xiaohongshu.com/page/topics/5e4fa2fbde8c110001c1c273?naviHidden=yes",
            "view_num": 8425780,
            "type": "official"
        },
        {
            "id": "5decffd400000000010029d9",
            "name": "python爬虫",
            "link": "https://www.xiaohongshu.com/page/topics/5decffd470940400017f2d3e?naviHidden=yes",
            "view_num": 9179172,
            "type": "official",
            "smart": false
        },
        {
            "smart": false,
            "id": "61c322dc0000000001008168",
            "name": "python机器学习",
            "link": "https://www.xiaohongshu.com/page/topics/61c322dc112f010001802612?naviHidden=yes",
            "view_num": 3585040,
            "type": "official"
        },
        {
            "id": "5e9ede850000000001003221",
            "name": "python入门",
            "link": "https://www.xiaohongshu.com/page/topics/5e9ede850030d50001423ee3?naviHidden=yes",
            "view_num": 1889942,
            "type": "official",
            "smart": false
        },
        {
            "id": "615283d70000000001003b45",
            "name": "python培训",
            "link": "https://www.xiaohongshu.com/page/topics/615283d794f3eb0001d0c441?naviHidden=yes",
            "view_num": 118674,
            "type": "official",
            "smart": false
        },
        {
            "type": "official",
            "smart": false,
            "id": "602d35a70000000001005bb5",
            "name": "python办公自动化",
            "link": "https://www.xiaohongshu.com/page/topics/602d35a79a295700012f4452?naviHidden=yes",
            "view_num": 852116
        },
        {
            "name": "python辅导",
            "link": "https://www.xiaohongshu.com/page/topics/6264e04a1eae920001d81ca0?naviHidden=yes",
            "view_num": 433966,
            "type": "official",
            "smart": false,
            "id": "6264e04a000000000101ec77"
        },
        {
            "type": "official",
            "smart": false,
            "id": "61b53701000000000101f6f6",
            "name": "python网络爬虫",
            "link": "https://www.xiaohongshu.com/page/topics/61b53701df708700018b2749?naviHidden=yes",
            "view_num": 367730
        },
        {
            "view_num": 110250,
            "type": "official",
            "smart": false,
            "id": "623042ad00000000010087f2",
            "name": "python代做",
            "link": "https://www.xiaohongshu.com/page/topics/623042add483bf0001889a37?naviHidden=yes"
        },
        {
            "smart": false,
            "id": "611e38510000000001003445",
            "name": "python入门学习",
            "link": "https://www.xiaohongshu.com/page/topics/611e38512328ed00011924bf?naviHidden=yes",
            "view_num": 711344,
            "type": "official"
        },
        {
            "id": "5bec337faafb3e0001a9a129",
            "name": "嗨翻python",
            "link": "https://www.xiaohongshu.com/page/topics/5bec337fc3c3cb0001bc5fa4?naviHidden=yes",
            "view_num": 82901020,
            "type": "official",
            "smart": false
        }
    ],
    "message": "成功"
}

发布图文笔记API

API

url : https://127.0.0.1:8000/create_images_note/
mothod:POST
Content-Type:multipart/form-data; boundary=

请求体multipart/form-data

参数名参数值示例类型必填说明
cookiestr填写你自己的某红薯WEB端首页cookie字符串
proxystr代理地址
title我是标题啊str笔记标题
desc我是发布的笔记详情, #Python[话题]# @范冰冰str笔记详情
imagesfile图片列表
ats_list[{“nickname”: “范冰冰”, “user_id”: “6174cea90000000002027bfa”, “name”: “范冰冰”}]array@用户信息
topic_list[{ “id”: “5d35dd9b000000000e0088dc”, “name”: “Python”, “type”: “topic”, “link”: “https://www.xiaohongshu.com/page/topics/5d35dd9ba059940001703e38?naviHidden=yes” }]array话题信息
is_private1str是否私密发布 1:是,0:否
post_time2023-10-11 12:11:11str发布时间,例如 “2023-10-11 12:11:11”

请求示例

import requests

url = "http://127.0.0.1:8000/create_images_note/"

payload={}
files=[
   ('images',('C:\Users\admin\Downloads\微信图片_20240322110151.jpg',open('C:\\Users\\admin\\Downloads\\微信图片_20240322110151.jpg','rb'),'image/jpeg')),
   ('images',('C:\Users\admin\Downloads\123.png',open('C:\\Users\\admin\\Downloads\\123.png','rb'),'image/png'))
]
headers = {
   'Accept': '*/*',
   'Host': '127.0.0.1:8000',
   'Connection': 'keep-alive',
   'Content-Type': 'multipart/form-data; boundary=--------------------------079144720179326830652880'
}

response = requests.request("POST", url, headers=headers, data=payload, files=files)

print(response.text)

响应示例

{
    "code": 200,
    "data": {
        "id": "66023562000000000d00f8e5",
        "score": 10
    },
    "message": "成功"
}

发布视频笔记API

API

url : https://127.0.0.1:8000/create_note/
mothod:POST
Content-Type:multipart/form-data; boundary=

请求体multipart/form-data

参数名参数值示例类型必填说明
cookiestr填写你自己的某红薯WEB端首页cookie字符串
proxystr代理地址
title我是标题啊str笔记标题
desc我是发布的笔记详情, #Python[话题]# @范冰冰str笔记详情
coverfile上传封面
videofile上传视频
ats_list[{“nickname”: “范冰冰”, “user_id”: “6174cea90000000002027bfa”, “name”: “范冰冰”}]array@用户信息
topic_list[{ “id”: “5d35dd9b000000000e0088dc”, “name”: “Python”, “type”: “topic”, “link”: “https://www.xiaohongshu.com/page/topics/5d35dd9ba059940001703e38?naviHidden=yes” }]array话题信息
is_private1str是否私密发布 1:是,0:否
post_time2024-10-11 12:11:11str发布时间,例如 “2024-10-11 12:11:11”

请求示例

import requests

url = "http://127.0.0.1:8000/create_note/"

payload={}
files=[
   ('cover',('C:\Users\admin\Downloads\icpjt.png',open('C:\\Users\\admin\\Downloads\\icpjt.png','rb'),'image/png')),
   ('video',('C:\Users\admin\Downloads\下载.mp4',open('C:\\Users\\admin\\Downloads\\下载.mp4','rb'),'application/octet-stream'))
]
headers = {
   'Accept': '*/*',
   'Host': '127.0.0.1:8000',
   'Connection': 'keep-alive',
   'Content-Type': 'multipart/form-data; boundary=--------------------------366495411114374131335367'
}

response = requests.request("POST", url, headers=headers, data=payload, files=files)

print(response.text)

响应示例

{
    "code": 200,
    "data": {
        "id": "66023562000000000d00f8e5",
        "score": 10
    },
    "message": "成功"
}
© 版权声明
THE END
喜欢就支持一下吧
点赞5赞赏 分享
评论 抢沙发

请登录后发表评论

    暂无评论内容