fix(route/yahoo/utils): fix yahoo header overflow (#20336)
This commit is contained in:
parent
e03111c570
commit
20e903ef90
|
|
@ -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(
|
||||
|
|
|
|||
Loading…
Reference in New Issue