fix(route/zhihu): enable processImage for people/answers to fix lazy-loaded images (#18671) (#21153)

This commit is contained in:
9k001 2026-02-26 00:52:06 +08:00 committed by GitHub
parent 79c8adcca7
commit 9cb29513b4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 4 deletions

View File

@ -1,8 +1,7 @@
import type { Route } from '@/types';
import got from '@/utils/got';
import { parseDate } from '@/utils/parse-date';
import { getSignedHeader, header } from './utils';
import { getSignedHeader, header, processImage } from './utils';
export const route: Route = {
path: '/people/answers/:id',
@ -53,10 +52,9 @@ async function handler(ctx) {
const data = response.data.data;
const items = data.map((item) => {
const title = item.question.title;
// let description = processImage(detail.content);
const url = `https://www.zhihu.com/question/${item.question.id}/answer/${item.id}`;
const author = item.author.name;
const description = item.content;
const description = processImage(item.content);
return {
title,