chore: pull analytics from docs repo instead

This commit is contained in:
Tony
2025-11-19 01:36:31 +08:00
parent d184cfc532
commit 5bf337b2f3
2 changed files with 6 additions and 4 deletions

View File

@@ -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();

View File

@@ -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();