We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e03111c commit 20e903eCopy full SHA for 20e903e
lib/routes/yahoo/news/utils.ts
@@ -3,6 +3,7 @@ import { load } from 'cheerio';
3
import { parseDate } from '@/utils/parse-date';
4
import path from 'node:path';
5
import { art } from '@/utils/render';
6
+import { config } from '@/config';
7
8
const getArchive = async (region, limit, tag, providerId?) => {
9
const { data: response } = await got(
@@ -79,7 +80,11 @@ const parseList = (region, response) =>
79
80
81
const parseItem = (item, tryGet) =>
82
tryGet(item.link, async () => {
- const { data: response } = await got(item.link);
83
+ const { data: response } = await got(item.link, {
84
+ headers: {
85
+ 'User-Agent': config.trueUA,
86
+ },
87
+ });
88
const $ = load(response);
89
90
const ldJson = JSON.parse(
0 commit comments