This commit is contained in:
2025-06-21 11:09:58 +08:00
parent 8891b196ba
commit a150cbc533
11 changed files with 332 additions and 129 deletions

0
packages/xhs/readme.md Normal file
View File

View File

@@ -2,9 +2,10 @@ import { QueryRouterServer } from '@kevisual/router/browser';
import { XhsServices } from '@kevisual/xhs/services/xhs-services.ts';
export const app = new QueryRouterServer();
export const xhsServices = new XhsServices();
export const xhsServices = new XhsServices();// Semicolon separated Cookie File
const cookie =
'a1=1969a2df762vy6p46vet3jjpwfvnoce52hge24v0430000640615;abRequestId=48bccb63-a540-5533-8215-546916a6386f;gid=yjKj0JdyjKJ4yjKj0JfiWx4hKJhvKU4Khd9qk84VVUEihdq8IlSd2J888K48Ky28SSqJKYSK;loadts=1746343425888;sec_poison_id=32d8febc-7543-41e7-8a1f-c652d32a1e1a;unread={%22ub%22:%2267f73e21000000001b0384ea%22%2C%22ue%22:%226812f08300000000090166d7%22%2C%22uc%22:32};web_session=040069b6528dbc23c355705e223a4b27b6660a;webBuild=4.62.3;webId=05b45ad626037308d58668196c6af47d;websectiga=8886be45f388a1ee7bf611a69f3e174cae48f1ea02c0f8ec3256031b8be9c7ee;xsecappid=xhs-pc-web;acw_tc=0a00d14717463434250061733e8b2fcd3804e9b06020e1f339ebd8b7e80fc4;';
'a1=1978d0cdcb7p5neac7cesgfm9yat0b4a7hnesexkp30000220066;abRequestId=f98f27d6-cceb-53d9-a9ef-dbd68786231b;access-token-creator.xiaohongshu.com=customer.creator.AT-68c517518075239703025713copo06lnusenqic1;customer-sso-sid=68c517518075239698553486mipyx4lwk2ac5jaj;customerClientId=716985104518687;galaxy_creator_session_id=wda55FJhoiAWZ8cekT2aGiM9fuztft3mOdRM;galaxy.creator.beaker.session.id=1750438297110093146037;gid=yjWYf8Si4SWjyjWYf8SfSxdCDWU2Id0SWSdMITUki6jv0dq898D40M888JJ88KK8fdKS8jiy;loadts=1750444792784;sec_poison_id=2f592adb-ec34-48cd-a6ce-22b90bd67c3b;unread={%22ub%22:%226852a4100000000022030063%22%2C%22ue%22:%226854e0db00000000100251f6%22%2C%22uc%22:28};web_session=040069b6528dbc23c355980a603a4b3e03bb6a;webBuild=4.68.0;webId=1dbb23b746393db622165a22357897d5;websectiga=10f9a40ba454a07755a08f27ef8194c53637eba4551cf9751c009d9afb564467;x-user-id-creator.xiaohongshu.com=6726cef4000000001c019303;xsecappid=xhs-pc-web;acw_tc=0a00d41117504447915317110e41effee63c597aa77f2c9f0dc1b0a10248f8;';
xhsServices.createRoot({
cookie,

View File

@@ -10,6 +10,9 @@ const parseComment = (comment: CommonentInfo) => {
content: comment.content,
};
};
/**
* 格式化评论信息
*/
export class Parse {
static getComment(mention: Mention) {
const typeList = ['comment/item', 'mention/comment', 'comment/comment'];

View File

@@ -0,0 +1,14 @@
import { app, xhsServices } from '@kevisual/xhs/app.ts';
app
.route({
path: 'note',
key: 'create',
})
.define(async (ctx) => {
const client = xhsServices.getClient();
const res = await client.c
if (res.code === 0) {
}
})
.addTo(app);

View File

@@ -0,0 +1 @@
import './create-note.ts'