style(eslint): lint tsx (#15098)

This commit is contained in:
Tony
2024-04-04 20:28:45 +08:00
committed by GitHub
parent d5daf23f41
commit 0893debb07
492 changed files with 529 additions and 576 deletions
+2 -2
View File
@@ -1,9 +1,9 @@
const { join } = require('path');
const path = require('path');
/**
* @type {import("puppeteer").Configuration}
*/
module.exports = {
// Changes the cache location for Puppeteer.
cacheDirectory: join(__dirname, 'node_modules', '.cache', 'puppeteer'),
cacheDirectory: path.join(__dirname, 'node_modules', '.cache', 'puppeteer'),
};
-4
View File
@@ -1,13 +1,9 @@
import { rss3Ums, json, RSS, Atom } from '@/utils/render';
import * as path from 'node:path';
import { config } from '@/config';
import { collapseWhitespace, convertDateToISO8601 } from '@/utils/common-utils';
import type { MiddlewareHandler } from 'hono';
import { Data } from '@/types';
import { getCurrentPath } from '@/utils/helpers';
const __dirname = getCurrentPath(import.meta.url);
// Set RSS <ttl> (minute) according to the availability of cache
// * available: max(config.cache.routeExpire / 60, 1)
// * unavailable: 1
+1 -1
View File
@@ -1,7 +1,7 @@
import type { Namespace, Route } from '@/types';
import { directoryImport } from 'directory-import';
import { Hono, type Handler } from 'hono';
import * as path from 'node:path';
import path from 'node:path';
import { fileURLToPath } from 'node:url';
import { serveStatic } from '@hono/node-server/serve-static';
+1 -1
View File
@@ -8,7 +8,7 @@ import { load } from 'cheerio';
import timezone from '@/utils/timezone';
import { parseDate } from '@/utils/parse-date';
import { art } from '@/utils/render';
import * as path from 'node:path';
import path from 'node:path';
export const handler = async (ctx) => {
const { category = 'zx' } = ctx.req.param();
+1 -1
View File
@@ -5,7 +5,7 @@ const __dirname = getCurrentPath(import.meta.url);
import cache from '@/utils/cache';
import got from '@/utils/got';
import { art } from '@/utils/render';
import * as path from 'node:path';
import path from 'node:path';
import { config } from '@/config';
const rootUrl = 'https://kyfw.12306.cn';
+1 -1
View File
@@ -7,7 +7,7 @@ import got from '@/utils/got';
import { load } from 'cheerio';
import { parseDate } from '@/utils/parse-date';
import { art } from '@/utils/render';
import * as path from 'node:path';
import path from 'node:path';
export const route: Route = {
path: '/{.*}?',
+1 -1
View File
@@ -7,7 +7,7 @@ import got from '@/utils/got';
import { load } from 'cheerio';
import { parseDate } from '@/utils/parse-date';
import { art } from '@/utils/render';
import * as path from 'node:path';
import path from 'node:path';
export const route: Route = {
path: '/{.*}?',
+1 -1
View File
@@ -5,7 +5,7 @@ const __dirname = getCurrentPath(import.meta.url);
import got from '@/utils/got';
import { parseDate } from '@/utils/parse-date';
import { art } from '@/utils/render';
import * as path from 'node:path';
import path from 'node:path';
const root_url = 'https://inf.ds.163.com';
+1 -1
View File
@@ -8,7 +8,7 @@ import { load } from 'cheerio';
import timezone from '@/utils/timezone';
import { parseDate } from '@/utils/parse-date';
import { art } from '@/utils/render';
import * as path from 'node:path';
import path from 'node:path';
const ids = {
'': {
+1 -1
View File
@@ -4,7 +4,7 @@ const __dirname = getCurrentPath(import.meta.url);
import got from '@/utils/got';
import { art } from '@/utils/render';
import * as path from 'node:path';
import path from 'node:path';
export const route: Route = {
path: '/music/artist/songs/:id',
+1 -1
View File
@@ -4,7 +4,7 @@ const __dirname = getCurrentPath(import.meta.url);
import got from '@/utils/got';
import { art } from '@/utils/render';
import * as path from 'node:path';
import path from 'node:path';
export const route: Route = {
path: '/music/artist/:id',
+1 -1
View File
@@ -5,7 +5,7 @@ const __dirname = getCurrentPath(import.meta.url);
import got from '@/utils/got';
import { parseDate } from '@/utils/parse-date';
import { art } from '@/utils/render';
import * as path from 'node:path';
import path from 'node:path';
export const route: Route = {
path: '/music/djradio/:id',
+1 -1
View File
@@ -5,7 +5,7 @@ const __dirname = getCurrentPath(import.meta.url);
import got from '@/utils/got';
import { config } from '@/config';
import { art } from '@/utils/render';
import * as path from 'node:path';
import path from 'node:path';
export const route: Route = {
path: '/music/playlist/:id',
+1 -1
View File
@@ -2,7 +2,7 @@ import { Route } from '@/types';
import { getCurrentPath } from '@/utils/helpers';
const __dirname = getCurrentPath(import.meta.url);
import * as path from 'node:path';
import path from 'node:path';
import got from '@/utils/got';
import { art } from '@/utils/render';
const renderDescription = (info) => art(path.join(__dirname, '../templates/music/userevents.art'), info);
+1 -1
View File
@@ -4,7 +4,7 @@ const __dirname = getCurrentPath(import.meta.url);
import got from '@/utils/got';
import { art } from '@/utils/render';
import * as path from 'node:path';
import path from 'node:path';
export const route: Route = {
path: '/music/user/playlist/:uid',
+1 -1
View File
@@ -5,7 +5,7 @@ const __dirname = getCurrentPath(import.meta.url);
import got from '@/utils/got';
import { config } from '@/config';
import { art } from '@/utils/render';
import * as path from 'node:path';
import path from 'node:path';
const headers = {
cookie: config.ncm.cookies,
+1 -1
View File
@@ -7,7 +7,7 @@ import got from '@/utils/got';
import { load } from 'cheerio';
import { parseDate } from '@/utils/parse-date';
import { art } from '@/utils/render';
import * as path from 'node:path';
import path from 'node:path';
export const route: Route = {
path: '/open/vip',
+1 -1
View File
@@ -4,7 +4,7 @@ const __dirname = getCurrentPath(import.meta.url);
import got from '@/utils/got';
import { load } from 'cheerio';
import { art } from '@/utils/render';
import * as path from 'node:path';
import path from 'node:path';
const parseDyArticle = (item, tryGet) =>
tryGet(item.link, async () => {
+1 -1
View File
@@ -6,7 +6,7 @@ import got from '@/utils/got';
import { load } from 'cheerio';
import { parseDate } from '@/utils/parse-date';
import { art } from '@/utils/render';
import * as path from 'node:path';
import path from 'node:path';
import { config } from '@/config';
const defaultDomain = 'jmcomic1.me';
+1 -1
View File
@@ -5,7 +5,7 @@ const __dirname = getCurrentPath(import.meta.url);
import got from '@/utils/got';
import { art } from '@/utils/render';
import { parseDate } from '@/utils/parse-date';
import * as path from 'node:path';
import path from 'node:path';
export const route: Route = {
path: '/offer/:year?/:major?/:school?',
+1 -1
View File
@@ -4,7 +4,7 @@ const __dirname = getCurrentPath(import.meta.url);
import got from '@/utils/got';
import { parseDate } from '@/utils/parse-date';
import { art } from '@/utils/render';
import * as path from 'node:path';
import path from 'node:path';
import bbcode from 'bbcodejs';
const rootUrl = 'https://instant.1point3acres.com';
+1 -1
View File
@@ -5,7 +5,7 @@ const __dirname = getCurrentPath(import.meta.url);
import got from '@/utils/got';
import { load } from 'cheerio';
import { art } from '@/utils/render';
import * as path from 'node:path';
import path from 'node:path';
export const handler = async (ctx) => {
const { category = 'latest/awarded' } = ctx.req.param();
+1 -1
View File
@@ -8,7 +8,7 @@ import { load } from 'cheerio';
import timezone from '@/utils/timezone';
import { parseDate } from '@/utils/parse-date';
import { art } from '@/utils/render';
import * as path from 'node:path';
import path from 'node:path';
export const route: Route = {
path: '/:id?',
+1 -1
View File
@@ -5,7 +5,7 @@ import { parseDate } from '@/utils/parse-date';
import { art } from '@/utils/render';
import { load } from 'cheerio';
import { Context } from 'hono';
import * as path from 'node:path';
import path from 'node:path';
const __dirname = getCurrentPath(import.meta.url);
export const route: Route = {
+1 -1
View File
@@ -2,7 +2,7 @@ import { getCurrentPath } from '@/utils/helpers';
const __dirname = getCurrentPath(import.meta.url);
import got from '@/utils/got';
import * as path from 'node:path';
import path from 'node:path';
import { art } from '@/utils/render';
import { parseDate } from '@/utils/parse-date';
+1 -1
View File
@@ -8,7 +8,7 @@ import { load } from 'cheerio';
import timezone from '@/utils/timezone';
import { parseDate } from '@/utils/parse-date';
import { art } from '@/utils/render';
import * as path from 'node:path';
import path from 'node:path';
import iconv from 'iconv-lite';
export const route: Route = {
+1 -1
View File
@@ -5,7 +5,7 @@ const __dirname = getCurrentPath(import.meta.url);
import cache from '@/utils/cache';
import { parseDate } from '@/utils/parse-date';
import { art } from '@/utils/render';
import * as path from 'node:path';
import path from 'node:path';
import { baseUrl, getTribeDetail, getTribeSets } from './utils';
+1 -1
View File
@@ -5,7 +5,7 @@ const __dirname = getCurrentPath(import.meta.url);
import cache from '@/utils/cache';
import { art } from '@/utils/render';
import { parseDate } from '@/utils/parse-date';
import * as path from 'node:path';
import path from 'node:path';
import { baseUrl, getUserInfoFromUsername, getUserInfoFromId, getUserWorks } from './utils';
export const route: Route = {
+1 -1
View File
@@ -7,7 +7,7 @@ import iconv from 'iconv-lite';
import timezone from '@/utils/timezone';
import { parseDate } from '@/utils/parse-date';
import { art } from '@/utils/render';
import * as path from 'node:path';
import path from 'node:path';
const rootUrl = 'https://www.56kog.com';
+1 -1
View File
@@ -2,7 +2,7 @@ import { Route } from '@/types';
import { getCurrentPath } from '@/utils/helpers';
const __dirname = getCurrentPath(import.meta.url);
import * as path from 'node:path';
import path from 'node:path';
import { CookieJar } from 'tough-cookie';
import { load } from 'cheerio';
+1 -1
View File
@@ -9,7 +9,7 @@ import { load } from 'cheerio';
import timezone from '@/utils/timezone';
import { parseDate } from '@/utils/parse-date';
import { art } from '@/utils/render';
import * as path from 'node:path';
import path from 'node:path';
export const route: Route = {
path: '*',
+1 -1
View File
@@ -7,7 +7,7 @@ import got from '@/utils/got';
import { load } from 'cheerio';
import { parseDate } from '@/utils/parse-date';
import { art } from '@/utils/render';
import * as path from 'node:path';
import path from 'node:path';
export const route: Route = {
path: '/:language?/:category?/:type?',
+1 -1
View File
@@ -9,7 +9,7 @@ import iconv from 'iconv-lite';
import timezone from '@/utils/timezone';
import { parseDate } from '@/utils/parse-date';
import { art } from '@/utils/render';
import * as path from 'node:path';
import path from 'node:path';
export const route: Route = {
path: '/list/:id?',
+1 -1
View File
@@ -7,7 +7,7 @@ import got from '@/utils/got';
import { load } from 'cheerio';
import { parseDate } from '@/utils/parse-date';
import { art } from '@/utils/render';
import * as path from 'node:path';
import path from 'node:path';
import { domainValidation } from './utils';
export const route: Route = {
+1 -1
View File
@@ -7,7 +7,7 @@ import got from '@/utils/got';
import { load } from 'cheerio';
import { parseDate } from '@/utils/parse-date';
import { art } from '@/utils/render';
import * as path from 'node:path';
import path from 'node:path';
import { domainValidation } from './utils';
export const route: Route = {
+1 -1
View File
@@ -5,7 +5,7 @@ import cache from '@/utils/cache';
import got from '@/utils/got';
import { load } from 'cheerio';
import { art } from '@/utils/render';
import * as path from 'node:path';
import path from 'node:path';
const rootUrl = 'https://www.95mm.vip';
+1 -1
View File
@@ -7,7 +7,7 @@ import got from '@/utils/got';
import { load } from 'cheerio';
import { parseDate } from '@/utils/parse-date';
import { art } from '@/utils/render';
import * as path from 'node:path';
import path from 'node:path';
export const route: Route = {
path: '/:category{.+}?',
+1 -1
View File
@@ -6,7 +6,7 @@ import cache from '@/utils/cache';
import { load } from 'cheerio';
import { parseDate } from '@/utils/parse-date';
import { art } from '@/utils/render';
import * as path from 'node:path';
import path from 'node:path';
import { config } from '@/config';
import puppeteer from '@/utils/puppeteer';
+1 -1
View File
@@ -7,7 +7,7 @@ import got from '@/utils/got';
import { load } from 'cheerio';
import { parseDate } from '@/utils/parse-date';
import { art } from '@/utils/render';
import * as path from 'node:path';
import path from 'node:path';
export const route: Route = {
path: '/:id',
+1 -1
View File
@@ -5,7 +5,7 @@ import cache from '@/utils/cache';
import { load } from 'cheerio';
import got from '@/utils/got';
import { art } from '@/utils/render';
import * as path from 'node:path';
import path from 'node:path';
const getData = async (ctx, list) => {
const items = await Promise.all(
+1 -1
View File
@@ -5,7 +5,7 @@ const __dirname = getCurrentPath(import.meta.url);
import got from '@/utils/got';
import { parseDate } from '@/utils/parse-date';
import { art } from '@/utils/render';
import * as path from 'node:path';
import path from 'node:path';
export const route: Route = {
path: '/:category?/:id?',
+2 -1
View File
@@ -5,7 +5,7 @@ import { config } from '@/config';
import { isValidHost } from '@/utils/valid-host';
import puppeteer from '@/utils/puppeteer';
export default async (ctx) => {
const handler = async (ctx) => {
const pub = ctx.req.param('pub');
const jrn = ctx.req.param('jrn');
const host = `https://pubs.aip.org`;
@@ -58,3 +58,4 @@ export default async (ctx) => {
allowEmpty: true,
};
};
export default handler;
+1 -1
View File
@@ -1,7 +1,7 @@
import { getCurrentPath } from '@/utils/helpers';
const __dirname = getCurrentPath(import.meta.url);
import * as path from 'node:path';
import path from 'node:path';
import { art } from '@/utils/render';
const puppeteerGet = async (url, browser) => {
+1 -1
View File
@@ -8,7 +8,7 @@ import got from '@/utils/got';
import { load } from 'cheerio';
import { parseDate } from '@/utils/parse-date';
import { art } from '@/utils/render';
import * as path from 'node:path';
import path from 'node:path';
const languages = {
arabic: {
+1 -1
View File
@@ -4,7 +4,7 @@ const __dirname = getCurrentPath(import.meta.url);
import got from '@/utils/got';
import { art } from '@/utils/render';
import * as path from 'node:path';
import path from 'node:path';
import { load } from 'cheerio';
const host = 'https://www.amazon.com';
export const route: Route = {
+3 -1
View File
@@ -2,7 +2,7 @@ import got from '@/utils/got';
import { load } from 'cheerio';
import { parseDate } from '@/utils/parse-date';
export default async () => {
const handler = async () => {
const url = 'https://www.anquanke.com';
const response = await got(`${url}/vul`);
@@ -32,3 +32,5 @@ export default async () => {
item: items,
};
};
export default handler;
+1 -1
View File
@@ -6,7 +6,7 @@ import cache from '@/utils/cache';
import got from '@/utils/got';
import { parseDate } from '@/utils/parse-date';
import { art } from '@/utils/render';
import * as path from 'node:path';
import path from 'node:path';
import MarkdownIt from 'markdown-it';
export const route: Route = {
+1 -1
View File
@@ -7,7 +7,7 @@ import { art } from '@/utils/render';
import { load } from 'cheerio';
import dayjs from 'dayjs';
import { Context } from 'hono';
import * as path from 'node:path';
import path from 'node:path';
const __dirname = getCurrentPath(import.meta.url);
export const route: Route = {
+1 -1
View File
@@ -7,7 +7,7 @@ import got from '@/utils/got';
import { load } from 'cheerio';
import { parseDate } from '@/utils/parse-date';
import { art } from '@/utils/render';
import * as path from 'node:path';
import path from 'node:path';
export const route: Route = {
path: '*',
+1 -1
View File
@@ -4,7 +4,7 @@ const __dirname = getCurrentPath(import.meta.url);
import got from '@/utils/got';
import { art } from '@/utils/render';
import * as path from 'node:path';
import path from 'node:path';
import { generateRssData } from './utils';
export const route: Route = {
+1 -1
View File
@@ -4,7 +4,7 @@ const __dirname = getCurrentPath(import.meta.url);
import got from '@/utils/got';
import { art } from '@/utils/render';
import * as path from 'node:path';
import path from 'node:path';
import { generateRssData } from './utils';
export const route: Route = {
+1 -1
View File
@@ -5,7 +5,7 @@ const __dirname = getCurrentPath(import.meta.url);
import got from '@/utils/got';
import { load } from 'cheerio';
import { art } from '@/utils/render';
import * as path from 'node:path';
import path from 'node:path';
const host = 'https://www.regear.arcteryx.com';
function getUSDPrice(number) {
+1 -1
View File
@@ -5,7 +5,7 @@ const __dirname = getCurrentPath(import.meta.url);
import cache from '@/utils/cache';
import got from '@/utils/got';
import { parseDate } from '@/utils/parse-date';
import * as path from 'node:path';
import path from 'node:path';
import { art } from '@/utils/render';
import { config } from '@/config';
+1 -1
View File
@@ -7,7 +7,7 @@ import got from '@/utils/got';
import { load } from 'cheerio';
import { parseDate } from '@/utils/parse-date';
import { art } from '@/utils/render';
import * as path from 'node:path';
import path from 'node:path';
export const route: Route = {
path: '/:category{.+}?',
+1 -1
View File
@@ -5,7 +5,7 @@ const __dirname = getCurrentPath(import.meta.url);
import got from '@/utils/got';
import { parseDate } from '@/utils/parse-date';
import { art } from '@/utils/render';
import * as path from 'node:path';
import path from 'node:path';
const getProductID = async (model) => {
const searchAPI = `https://odinapi.asus.com.cn/recent-data/apiv2/SearchSuggestion?SystemCode=asus&WebsiteCode=cn&SearchKey=${model}&SearchType=ProductsAll&RowLimit=4&sitelang=cn`;
+1 -1
View File
@@ -4,7 +4,7 @@ const __dirname = getCurrentPath(import.meta.url);
import got from '@/utils/got';
import { art } from '@/utils/render';
import * as path from 'node:path';
import path from 'node:path';
const STATUS_MAP = {
up: '上涨',
+1 -1
View File
@@ -6,7 +6,7 @@ import cache from '@/utils/cache';
import got from '@/utils/got';
import { load } from 'cheerio';
import { art } from '@/utils/render';
import * as path from 'node:path';
import path from 'node:path';
const renderDescription = (description, images) => art(path.join(__dirname, './templates/description.art'), { description, images });
import { config } from '@/config';
+1 -1
View File
@@ -7,7 +7,7 @@ import got from '@/utils/got';
import { parseDate } from '@/utils/parse-date';
import timezone from '@/utils/timezone';
import { art } from '@/utils/render';
import * as path from 'node:path';
import path from 'node:path';
export const route: Route = {
path: ['/tieba/forum/good/:kw/:cid?/:sortBy?', '/tieba/forum/:kw/:sortBy?'],
+1 -1
View File
@@ -7,7 +7,7 @@ import got from '@/utils/got';
import { parseDate } from '@/utils/parse-date';
import timezone from '@/utils/timezone';
import { art } from '@/utils/render';
import * as path from 'node:path';
import path from 'node:path';
/**
* 获取最新的帖子回复(倒序查看)
+1 -1
View File
@@ -8,7 +8,7 @@ import iconv from 'iconv-lite';
import timezone from '@/utils/timezone';
import { parseDate } from '@/utils/parse-date';
import { art } from '@/utils/render';
import * as path from 'node:path';
import path from 'node:path';
export const route: Route = {
path: '/tieba/search/:qw/:routeParams?',
+1 -1
View File
@@ -5,7 +5,7 @@ const __dirname = getCurrentPath(import.meta.url);
import got from '@/utils/got';
import { load } from 'cheerio';
import { art } from '@/utils/render';
import * as path from 'node:path';
import path from 'node:path';
export const route: Route = {
path: '/top/:board?',
+1 -1
View File
@@ -5,7 +5,7 @@ const __dirname = getCurrentPath(import.meta.url);
import got from '@/utils/got';
import { parseDate } from '@/utils/parse-date';
import { art } from '@/utils/render';
import * as path from 'node:path';
import path from 'node:path';
export const route: Route = {
path: '/weekly',
+1 -1
View File
@@ -5,7 +5,7 @@ const __dirname = getCurrentPath(import.meta.url);
import got from '@/utils/got';
import { art } from '@/utils/render';
import { parseDate } from '@/utils/parse-date';
import * as path from 'node:path';
import path from 'node:path';
export const route: Route = {
path: '/online',
+2 -1
View File
@@ -1,7 +1,7 @@
import got from '@/utils/got';
import { config } from '@/config';
export default (tryGet) => {
const getData = (tryGet) => {
const bgmCalendarUrl = 'https://api.bgm.tv/calendar';
const bgmDataUrl = 'https://cdn.jsdelivr.net/npm/bangumi-data/dist/data.json';
@@ -35,3 +35,4 @@ export default (tryGet) => {
)
);
};
export default getData;
+1 -1
View File
@@ -5,7 +5,7 @@ const __dirname = getCurrentPath(import.meta.url);
import cache from '@/utils/cache';
import getData from './_base';
import { art } from '@/utils/render';
import * as path from 'node:path';
import path from 'node:path';
export const route: Route = {
path: '/tv/calendar/today',
+2 -1
View File
@@ -2,7 +2,7 @@ import got from '@/utils/got';
import { load } from 'cheerio';
import { parseDate, parseRelativeDate } from '@/utils/parse-date';
export default async (subjectID, minLength) => {
const getComments = async (subjectID, minLength) => {
// bangumi.tv未提供获取“吐槽(comments)”的API,因此仍需要通过抓取网页来获取
const link = `https://bgm.tv/subject/${subjectID}/comments`;
const { data: html } = await got(link);
@@ -45,3 +45,4 @@ export default async (subjectID, minLength) => {
})),
};
};
export default getComments;
+3 -2
View File
@@ -4,10 +4,10 @@ const __dirname = getCurrentPath(import.meta.url);
import got from '@/utils/got';
import { parseDate } from '@/utils/parse-date';
import { art } from '@/utils/render';
import * as path from 'node:path';
import path from 'node:path';
import { getLocalName } from './utils';
export default async (subjectID, showOriginalName) => {
const getEps = async (subjectID, showOriginalName) => {
const url = `https://api.bgm.tv/subject/${subjectID}?responseGroup=large`;
const { data: epsInfo } = await got(url);
const activeEps = [];
@@ -33,3 +33,4 @@ export default async (subjectID, showOriginalName) => {
})),
};
};
export default getEps;
@@ -2,7 +2,7 @@ import got from '@/utils/got';
import { parseDate } from '@/utils/parse-date';
import { getLocalName } from './utils';
export default (type) => {
const getFromAPI = (type) => {
const mapping = {
blog: {
en: 'reviews',
@@ -31,3 +31,4 @@ export default (type) => {
};
};
};
export default getFromAPI;
+1 -1
View File
@@ -6,7 +6,7 @@ import cache from '@/utils/cache';
import got from '@/utils/got';
import { load } from 'cheerio';
import { art } from '@/utils/render';
import * as path from 'node:path';
import path from 'node:path';
const rootUrl = 'https://www.baozimh.com';
+1 -1
View File
@@ -8,7 +8,7 @@ import { load } from 'cheerio';
import { parseDate } from '@/utils/parse-date';
import timezone from '@/utils/timezone';
import { art } from '@/utils/render';
import * as path from 'node:path';
import path from 'node:path';
import asyncPool from 'tiny-async-pool';
import { config } from '@/config';
+1 -1
View File
@@ -3,7 +3,7 @@ import { getCurrentPath } from '@/utils/helpers';
const __dirname = getCurrentPath(import.meta.url);
import got from '@/utils/got';
import * as path from 'node:path';
import path from 'node:path';
import { parseDate } from '@/utils/parse-date';
import { art } from '@/utils/render';
+1 -1
View File
@@ -3,7 +3,7 @@ const __dirname = getCurrentPath(import.meta.url);
import cache from '@/utils/cache';
import { load } from 'cheerio';
import * as path from 'node:path';
import path from 'node:path';
import asyncPool from 'tiny-async-pool';
import { parseDate } from '@/utils/parse-date';
+1 -1
View File
@@ -8,7 +8,7 @@ import { load } from 'cheerio';
import { parseDate } from '@/utils/parse-date';
import cache from '@/utils/cache';
import { art } from '@/utils/render';
import * as path from 'node:path';
import path from 'node:path';
export const route: Route = {
path: '/mmda/tags/:tags?',
+1 -1
View File
@@ -6,7 +6,7 @@ import cache from '@/utils/cache';
import { parseDate } from '@/utils/parse-date';
import { resolveHandle, getProfile, getAuthorFeed } from './utils';
import { art } from '@/utils/render';
import * as path from 'node:path';
import path from 'node:path';
export const route: Route = {
path: '/profile/:handle',
+1 -1
View File
@@ -8,7 +8,7 @@ import { load } from 'cheerio';
import timezone from '@/utils/timezone';
import { parseDate } from '@/utils/parse-date';
import { art } from '@/utils/render';
import * as path from 'node:path';
import path from 'node:path';
import { config } from '@/config';
const allowDomain = new Set(['2btjia.com', '88btbtt.com', 'btbtt15.com', 'btbtt20.com']);
+1 -1
View File
@@ -4,7 +4,7 @@ const __dirname = getCurrentPath(import.meta.url);
import { load } from 'cheerio';
import got from '@/utils/got';
import { art } from '@/utils/render';
import * as path from 'node:path';
import path from 'node:path';
import { parseDate } from '@/utils/parse-date';
import timezone from '@/utils/timezone';
+1 -1
View File
@@ -6,7 +6,7 @@ import got from '@/utils/got';
import { load } from 'cheerio';
import { parseDate } from '@/utils/parse-date';
import { art } from '@/utils/render';
import * as path from 'node:path';
import path from 'node:path';
const rootUrl = 'http://www.caareviews.org';
+1 -1
View File
@@ -7,7 +7,7 @@ import got from '@/utils/got';
import timezone from '@/utils/timezone';
import { parseDate } from '@/utils/parse-date';
import { art } from '@/utils/render';
import * as path from 'node:path';
import path from 'node:path';
const titles = {
'01': '关于我们',
+1 -1
View File
@@ -8,7 +8,7 @@ import { load } from 'cheerio';
import timezone from '@/utils/timezone';
import { parseDate } from '@/utils/parse-date';
import { art } from '@/utils/render';
import * as path from 'node:path';
import path from 'node:path';
export const route: Route = {
path: '/database',
+1 -1
View File
@@ -6,7 +6,7 @@ import cache from '@/utils/cache';
import got from '@/utils/got';
import { load } from 'cheerio';
import { art } from '@/utils/render';
import * as path from 'node:path';
import path from 'node:path';
export const route: Route = {
path: '/latest',
+1 -1
View File
@@ -4,7 +4,7 @@ const __dirname = getCurrentPath(import.meta.url);
import got from '@/utils/got';
import { load } from 'cheerio';
import { art } from '@/utils/render';
import * as path from 'node:path';
import path from 'node:path';
const parseArticle = (item, tryGet) =>
/\.blog\.caixin\.com$/.test(new URL(item.link).hostname)
+1 -1
View File
@@ -7,7 +7,7 @@ import got from '@/utils/got';
import timezone from '@/utils/timezone';
import { parseDate } from '@/utils/parse-date';
import { art } from '@/utils/render';
import * as path from 'node:path';
import path from 'node:path';
export const route: Route = {
path: ['/column/:id?', '/:id?'],
+1 -1
View File
@@ -7,7 +7,7 @@ import { load } from 'cheerio';
import got from '@/utils/got';
import iconv from 'iconv-lite';
import { art } from '@/utils/render';
import * as path from 'node:path';
import path from 'node:path';
const baseUrl = 'https://www.cartoonmad.com';
const KEY = '5e585';
+1 -1
View File
@@ -7,7 +7,7 @@ import got from '@/utils/got';
import { load } from 'cheerio';
import { parseDate } from '@/utils/parse-date';
import { art } from '@/utils/render';
import * as path from 'node:path';
import path from 'node:path';
import { rootUrl, apiSlug, GetFilterId } from './utils';
+1 -1
View File
@@ -7,7 +7,7 @@ import got from '@/utils/got';
import { load } from 'cheerio';
import { parseDate } from '@/utils/parse-date';
import { art } from '@/utils/render';
import * as path from 'node:path';
import path from 'node:path';
const rootUrl = 'https://tc.ccf.org.cn';
+1 -1
View File
@@ -4,7 +4,7 @@ const __dirname = getCurrentPath(import.meta.url);
import { load } from 'cheerio';
import got from '@/utils/got';
import { art } from '@/utils/render';
import * as path from 'node:path';
import path from 'node:path';
import { parseDate } from '@/utils/parse-date';
import timezone from '@/utils/timezone';
+2 -1
View File
@@ -2,7 +2,7 @@ import got from '@/utils/got';
import { parseDate } from '@/utils/parse-date';
import timezone from '@/utils/timezone';
export default async () => {
const getMzzlbg = async () => {
const url = 'https://api.cntv.cn/video/videolistById?serviceId=cbox&vsid=C10354&em=01&p=1&n=50';
const response = await got({
@@ -39,3 +39,4 @@ export default async () => {
item: resultItem,
};
};
export default getMzzlbg;
+3 -2
View File
@@ -1,13 +1,13 @@
import cache from '@/utils/cache';
import got from '@/utils/got';
import * as path from 'node:path';
import path from 'node:path';
import { parseDate } from '@/utils/parse-date';
import timezone from '@/utils/timezone';
import randUserAgent from '@/utils/rand-user-agent';
const UA = randUserAgent({ browser: 'mobile safari', os: 'ios', device: 'mobile' });
export default async (category) => {
const getNews = async (category) => {
const url = `https://news.cctv.com/2019/07/gaiban/cmsdatainterface/page/${category}_1.jsonp`;
const response = await got({
@@ -106,3 +106,4 @@ export default async (category) => {
item: resultItem,
};
};
export default getNews;
+2 -1
View File
@@ -53,7 +53,7 @@ const ProcessFeed = (data) =>
return { ...single, ...other };
})
);
export default async () => {
const xinwen1j1 = async () => {
const baseUrl = 'https://api.cntv.cn/NewVideo/getVideoListByColumn?id=TOPC1451559066181661&n=20&sort=desc&p=1&mode=0&serviceId=tvcctv';
// 获取要处理的页面
const res = await got({
@@ -80,3 +80,4 @@ export default async () => {
item: result,
};
};
export default xinwen1j1;
+1 -1
View File
@@ -5,7 +5,7 @@ const __dirname = getCurrentPath(import.meta.url);
import got from '@/utils/got';
import { parseDate } from '@/utils/parse-date';
import { art } from '@/utils/render';
import * as path from 'node:path';
import path from 'node:path';
import utils from './utils';
const baseUrl = 'https://www.cde.org.cn';
+1 -1
View File
@@ -8,7 +8,7 @@ import { load } from 'cheerio';
import { parseDate } from '@/utils/parse-date';
import timezone from '@/utils/timezone';
import { art } from '@/utils/render';
import * as path from 'node:path';
import path from 'node:path';
export const route: Route = {
path: '/zw/projectList',
+1 -1
View File
@@ -4,7 +4,7 @@ const __dirname = getCurrentPath(import.meta.url);
import got from '@/utils/got';
import { load } from 'cheerio';
import * as path from 'node:path';
import path from 'node:path';
import { art } from '@/utils/render';
import timezone from '@/utils/timezone';
import { parseDate } from '@/utils/parse-date';
+1 -1
View File
@@ -4,7 +4,7 @@ const __dirname = getCurrentPath(import.meta.url);
import got from '@/utils/got';
import { load } from 'cheerio';
import * as path from 'node:path';
import path from 'node:path';
import { art } from '@/utils/render';
import utils from './utils';
+1 -1
View File
@@ -7,7 +7,7 @@ import got from '@/utils/got';
import { load } from 'cheerio';
import { parseDate } from '@/utils/parse-date';
import { art } from '@/utils/render';
import * as path from 'node:path';
import path from 'node:path';
const rootUrl = 'https://www.chaincatcher.com';
+1 -1
View File
@@ -6,7 +6,7 @@ import cache from '@/utils/cache';
import got from '@/utils/got';
import { load } from 'cheerio';
import { art } from '@/utils/render';
import * as path from 'node:path';
import path from 'node:path';
const headers = { 'User-Agent': 'Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/11.0 Mobile/15A372 Safari/604.1' };
export const route: Route = {
+1 -1
View File
@@ -7,7 +7,7 @@ import got from '@/utils/got';
import { load } from 'cheerio';
import { parseDate } from '@/utils/parse-date';
import { art } from '@/utils/render';
import * as path from 'node:path';
import path from 'node:path';
export const route: Route = {
path: '/qk/:id/:needContent?',
+1 -1
View File
@@ -6,7 +6,7 @@ import cache from '@/utils/cache';
import { load } from 'cheerio';
import { parseDate } from '@/utils/parse-date';
import { art } from '@/utils/render';
import * as path from 'node:path';
import path from 'node:path';
import { config } from '@/config';
import puppeteer from '@/utils/puppeteer';
const baseUrl = 'http://www.chinadegrees.com.cn';
+1 -1
View File
@@ -6,7 +6,7 @@ import got from '@/utils/got';
import { load } from 'cheerio';
import { parseDate } from '@/utils/parse-date';
import { art } from '@/utils/render';
import * as path from 'node:path';
import path from 'node:path';
import MarkdownIt from 'markdown-it';
const md = MarkdownIt({
html: true,
+1 -1
View File
@@ -7,7 +7,7 @@ import got from '@/utils/got';
import { load } from 'cheerio';
import { parseDate } from '@/utils/parse-date';
import { art } from '@/utils/render';
import * as path from 'node:path';
import path from 'node:path';
import { rootUrl, getSearchParams } from './utils';
+1 -1
View File
@@ -7,7 +7,7 @@ import got from '@/utils/got';
import { load } from 'cheerio';
import { parseDate } from '@/utils/parse-date';
import { art } from '@/utils/render';
import * as path from 'node:path';
import path from 'node:path';
import { rootUrl, getSearchParams } from './utils';

Some files were not shown because too many files have changed in this diff Show More