diff --git a/lib/routes/xueqiu/column.ts b/lib/routes/xueqiu/column.ts index b2053248cd949f..b7bd7c00fcca42 100644 --- a/lib/routes/xueqiu/column.ts +++ b/lib/routes/xueqiu/column.ts @@ -14,7 +14,7 @@ export const route: Route = { features: { requireConfig: false, requirePuppeteer: false, - antiCrawler: false, + antiCrawler: true, supportBT: false, supportPodcast: false, supportScihub: false, @@ -25,7 +25,7 @@ export const route: Route = { }, ], name: '用户专栏', - maintainers: ['TonyRL'], + maintainers: ['TonyRL', 'pseudoyu'], handler, }; @@ -33,6 +33,11 @@ async function handler(ctx) { const id = ctx.req.param('id'); const pageUrl = `${baseUrl}/${id}/column`; + // Get cookie first + await got(baseUrl, { + cookieJar, + }); + const pageData = await got(pageUrl, { cookieJar, }); @@ -49,6 +54,10 @@ async function handler(ctx) { }, }); + if (!data.list) { + throw new Error('Error occurred, please refresh the page or try again after logging back into your account'); + } + const items = data.list.map((item) => ({ title: item.title, description: item.description,