fix(route/fanbox): use rsshub ua (#19433)

This commit is contained in:
Tony 2025-06-23 01:32:23 +08:00 committed by GitHub
parent d6ea75914f
commit 92cb64dfe1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -166,7 +166,7 @@ async function parseDetail(i: PostDetailResponse['body']) {
export function parseItem(item: PostItem) {
return cache.tryGet(`fanbox-${item.id}-${item.updatedDatetime}`, async () => {
const postDetail = (await ofetch(`https://api.fanbox.cc/post.info?postId=${item.id}`, { headers: getHeaders() })) as PostDetailResponse;
const postDetail = (await ofetch(`https://api.fanbox.cc/post.info?postId=${item.id}`, { headers: { ...getHeaders(), 'User-Agent': config.trueUA } })) as PostDetailResponse;
return {
title: item.title || `No title`,
description: await parseDetail(postDetail.body),