fix(route/yahoo/utils): fix yahoo header overflow (#20336)

This commit is contained in:
Tony 2025-10-20 21:24:44 +08:00 committed by GitHub
parent e03111c570
commit 20e903ef90
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 6 additions and 1 deletions

View File

@ -3,6 +3,7 @@ import { load } from 'cheerio';
import { parseDate } from '@/utils/parse-date';
import path from 'node:path';
import { art } from '@/utils/render';
import { config } from '@/config';
const getArchive = async (region, limit, tag, providerId?) => {
const { data: response } = await got(
@ -79,7 +80,11 @@ const parseList = (region, response) =>
const parseItem = (item, tryGet) =>
tryGet(item.link, async () => {
const { data: response } = await got(item.link);
const { data: response } = await got(item.link, {
headers: {
'User-Agent': config.trueUA,
},
});
const $ = load(response);
const ldJson = JSON.parse(