diff --git a/scripts/workflow/build-docs.ts b/scripts/workflow/build-docs.ts index 30cc5bfd88..c24763bb3e 100644 --- a/scripts/workflow/build-docs.ts +++ b/scripts/workflow/build-docs.ts @@ -3,14 +3,15 @@ import fs from 'node:fs'; import path from 'node:path'; import { categories } from './data'; import { getCurrentPath } from '../../lib/utils/helpers'; +import { config } from '../../lib/config'; const fullTests = await (await fetch('https://cdn.jsdelivr.net/gh/DIYgod/RSSHub@gh-pages/build/test-full-routes.json')).json(); const testResult = fullTests.testResults[0].assertionResults; const foloAnalysis = await ( - await fetch('https://api.follow.is/discover/rsshub-analytics', { + await fetch('https://raw.githubusercontent.com/RSSNext/rsshub-docs/refs/heads/main/rsshub-analytics.json', { headers: { - 'user-agent': 'RSSHub', + 'user-agent': config.trueUA, }, }) ).json(); diff --git a/scripts/workflow/build-routes.ts b/scripts/workflow/build-routes.ts index ed2880990e..b2d7d281f0 100644 --- a/scripts/workflow/build-routes.ts +++ b/scripts/workflow/build-routes.ts @@ -4,14 +4,15 @@ import { parse } from 'tldts'; import fs from 'node:fs'; import path from 'node:path'; import toSource from 'tosource'; +import { config } from '../../lib/config'; import { getCurrentPath } from '../../lib/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); const foloAnalysis = await ( - await fetch('https://api.follow.is/discover/rsshub-analytics', { + await fetch('https://raw.githubusercontent.com/RSSNext/rsshub-docs/refs/heads/main/rsshub-analytics.json', { headers: { - 'user-agent': 'RSSHub', + 'user-agent': config.trueUA, }, }) ).json();