diff --git a/lib/routes/ixigua/userVideo.js b/lib/routes/ixigua/userVideo.js
index 95390c962..45bada1f6 100644
--- a/lib/routes/ixigua/userVideo.js
+++ b/lib/routes/ixigua/userVideo.js
@@ -4,28 +4,28 @@ module.exports = async (ctx) => {
const uid = ctx.params.uid;
const disableEmbed = ctx.params.disableEmbed;
const homeUrl = 'https://www.ixigua.com';
- const videoApiUrl = `${homeUrl}/api/videov2/author/video?&author_id=${uid}&type=video&max_time=0`;
+ const videoApiUrl = `${homeUrl}/api/videov2/author/new_video_list?&to_user_id=${uid}&offset=0&limit=20&order=new`;
const resp = await got(videoApiUrl, { headers: { referer: homeUrl } });
const jsonData = resp.data;
if (jsonData.code !== 200) {
- throw Error(`xigua video API: code = ${jsonData.code}, message = ${jsonData.data.message}`);
+ throw Error(`xigua video API: code = ${jsonData.data.code}, message = ${jsonData.data.message}`);
}
- if (jsonData.data.data.length === 0) {
- throw Error('xigua video API: data is empty');
+ if (jsonData.data.videoList.length === 0) {
+ throw Error('xigua video API: videoList is empty');
}
- const videoInfos = jsonData.data.data;
+ const videoInfos = jsonData.data.videoList;
const userInfo = videoInfos[0].user_info;
ctx.state.data = {
title: `${userInfo.name} 的西瓜视频`,
link: `${homeUrl}/home/${uid}`,
- description: userInfo.author_desc,
+ description: userInfo.description,
item: videoInfos.map((i) => ({
title: i.title,
description:
- (disableEmbed ? '' : `
`) +
+ (disableEmbed ? '' : `
`) +
`
${i.abstract}
`, link: `${homeUrl}/${i.gid}`, pubDate: i.publish_time * 1000,