feat: v3 migration - 6/n
This commit is contained in:
parent
e5397f9e3e
commit
3eb1545bc5
|
|
@ -1,7 +1,7 @@
|
|||
import cache from '@/utils/cache';
|
||||
import got from '@/utils/got';
|
||||
import { art } from '@/utils/render';
|
||||
const path = require('path');
|
||||
import * as path from 'node:path';
|
||||
import { config } from '@/config';
|
||||
|
||||
const rootUrl = 'https://kyfw.12306.cn';
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import got from '@/utils/got';
|
|||
import { load } from 'cheerio';
|
||||
import { parseDate } from '@/utils/parse-date';
|
||||
import { art } from '@/utils/render';
|
||||
const path = require('path');
|
||||
import * as path from 'node:path';
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const rootUrl = 'https://www.141jav.com';
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import got from '@/utils/got';
|
|||
import { load } from 'cheerio';
|
||||
import { parseDate } from '@/utils/parse-date';
|
||||
import { art } from '@/utils/render';
|
||||
const path = require('path');
|
||||
import * as path from 'node:path';
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const rootUrl = 'https://www.141ppv.com';
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import got from '@/utils/got';
|
||||
import { parseDate } from '@/utils/parse-date';
|
||||
import { art } from '@/utils/render';
|
||||
const path = require('path');
|
||||
import * as path from 'node:path';
|
||||
|
||||
const root_url = 'https://inf.ds.163.com';
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import { load } from 'cheerio';
|
|||
import timezone from '@/utils/timezone';
|
||||
import { parseDate } from '@/utils/parse-date';
|
||||
import { art } from '@/utils/render';
|
||||
const path = require('path');
|
||||
import * as path from 'node:path';
|
||||
|
||||
const ids = {
|
||||
'': {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import got from '@/utils/got';
|
||||
import { art } from '@/utils/render';
|
||||
const path = require('path');
|
||||
import * as path from 'node:path';
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const { id } = ctx.params;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import got from '@/utils/got';
|
||||
import { art } from '@/utils/render';
|
||||
const path = require('path');
|
||||
import * as path from 'node:path';
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const id = ctx.req.param('id');
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import got from '@/utils/got';
|
||||
import { parseDate } from '@/utils/parse-date';
|
||||
import { art } from '@/utils/render';
|
||||
const path = require('path');
|
||||
import * as path from 'node:path';
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const id = ctx.req.param('id');
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import got from '@/utils/got';
|
||||
import { config } from '@/config';
|
||||
import { art } from '@/utils/render';
|
||||
const path = require('path');
|
||||
import * as path from 'node:path';
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
if (!config.ncm || !config.ncm.cookies) {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
const path = require('path');
|
||||
import * as 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,6 +1,6 @@
|
|||
import got from '@/utils/got';
|
||||
import { art } from '@/utils/render';
|
||||
const path = require('path');
|
||||
import * as path from 'node:path';
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const uid = ctx.req.param('uid');
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import got from '@/utils/got';
|
||||
import { config } from '@/config';
|
||||
import { art } from '@/utils/render';
|
||||
const path = require('path');
|
||||
import * as path from 'node:path';
|
||||
|
||||
const headers = {
|
||||
cookie: config.ncm.cookies,
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import got from '@/utils/got';
|
|||
import { load } from 'cheerio';
|
||||
import { parseDate } from '@/utils/parse-date';
|
||||
import { art } from '@/utils/render';
|
||||
const path = require('path');
|
||||
import * as path from 'node:path';
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const url = 'https://vip.open.163.com';
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import got from '@/utils/got';
|
|||
import { load } from 'cheerio';
|
||||
const iconv = require('iconv-lite');
|
||||
import { art } from '@/utils/render';
|
||||
const path = require('path');
|
||||
import * as path from 'node:path';
|
||||
|
||||
const parseDyArticle = (charset, item, tryGet) =>
|
||||
tryGet(item.link, async () => {
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import got from '@/utils/got';
|
|||
import { load } from 'cheerio';
|
||||
import { parseDate } from '@/utils/parse-date';
|
||||
import { art } from '@/utils/render';
|
||||
const path = require('path');
|
||||
import * as path from 'node:path';
|
||||
import { config } from '@/config';
|
||||
|
||||
const defaultDomain = 'jmcomic1.me';
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import got from '@/utils/got';
|
||||
import { art } from '@/utils/render';
|
||||
import { parseDate } from '@/utils/parse-date';
|
||||
const path = require('path');
|
||||
import * as path from 'node:path';
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
// year 2017-2022
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import got from '@/utils/got';
|
||||
import { parseDate } from '@/utils/parse-date';
|
||||
import { art } from '@/utils/render';
|
||||
const path = require('path');
|
||||
import * as path from 'node:path';
|
||||
const bbcode = require('bbcodejs');
|
||||
|
||||
const rootUrl = 'https://instant.1point3acres.com';
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import { load } from 'cheerio';
|
|||
import timezone from '@/utils/timezone';
|
||||
import { parseDate } from '@/utils/parse-date';
|
||||
import { art } from '@/utils/render';
|
||||
const path = require('path');
|
||||
import * as path from 'node:path';
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const id = ctx.req.param('id') ?? '2';
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import got from '@/utils/got';
|
||||
const path = require('path');
|
||||
import * as path from 'node:path';
|
||||
import { art } from '@/utils/render';
|
||||
import { parseDate } from '@/utils/parse-date';
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import { load } from 'cheerio';
|
|||
import timezone from '@/utils/timezone';
|
||||
import { parseDate } from '@/utils/parse-date';
|
||||
import { art } from '@/utils/render';
|
||||
const path = require('path');
|
||||
import * as path from 'node:path';
|
||||
const iconv = require('iconv-lite');
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import cache from '@/utils/cache';
|
||||
import { parseDate } from '@/utils/parse-date';
|
||||
import { art } from '@/utils/render';
|
||||
const path = require('path');
|
||||
import * as path from 'node:path';
|
||||
|
||||
const { baseUrl, getTribeDetail, getTribeSets } = require('./utils');
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import cache from '@/utils/cache';
|
||||
import { art } from '@/utils/render';
|
||||
import { parseDate } from '@/utils/parse-date';
|
||||
const path = require('path');
|
||||
import * as path from 'node:path';
|
||||
const { baseUrl, getUserInfoFromUsername, getUserInfoFromId, getUserWorks } = require('./utils');
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ const iconv = require('iconv-lite');
|
|||
import timezone from '@/utils/timezone';
|
||||
import { parseDate } from '@/utils/parse-date';
|
||||
import { art } from '@/utils/render';
|
||||
const path = require('path');
|
||||
import * as path from 'node:path';
|
||||
|
||||
const rootUrl = 'https://www.56kog.com';
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
const path = require('path');
|
||||
import * as path from 'node:path';
|
||||
|
||||
const { CookieJar } = require('tough-cookie');
|
||||
import { load } from 'cheerio';
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import { load } from 'cheerio';
|
|||
import timezone from '@/utils/timezone';
|
||||
import { parseDate } from '@/utils/parse-date';
|
||||
import { art } from '@/utils/render';
|
||||
const path = require('path');
|
||||
import * as path from 'node:path';
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const rootUrl = 'https://www.78dm.net';
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import got from '@/utils/got';
|
|||
import { load } from 'cheerio';
|
||||
import { parseDate } from '@/utils/parse-date';
|
||||
import { art } from '@/utils/render';
|
||||
const path = require('path');
|
||||
import * as path from 'node:path';
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const language = ctx.req.param('language') ?? 'en';
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ const iconv = require('iconv-lite');
|
|||
import timezone from '@/utils/timezone';
|
||||
import { parseDate } from '@/utils/parse-date';
|
||||
import { art } from '@/utils/render';
|
||||
const path = require('path');
|
||||
import * as path from 'node:path';
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const { id = '751' } = ctx.params;
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import got from '@/utils/got';
|
|||
import { load } from 'cheerio';
|
||||
import { parseDate } from '@/utils/parse-date';
|
||||
import { art } from '@/utils/render';
|
||||
const path = require('path');
|
||||
import * as path from 'node:path';
|
||||
const { domainValidation } = require('./utils');
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import got from '@/utils/got';
|
|||
import { load } from 'cheerio';
|
||||
import { parseDate } from '@/utils/parse-date';
|
||||
import { art } from '@/utils/render';
|
||||
const path = require('path');
|
||||
import * as path from 'node:path';
|
||||
const { domainValidation } = require('./utils');
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import cache from '@/utils/cache';
|
|||
import got from '@/utils/got';
|
||||
import { load } from 'cheerio';
|
||||
import { art } from '@/utils/render';
|
||||
const path = require('path');
|
||||
import * as path from 'node:path';
|
||||
|
||||
const rootUrl = 'https://www.95mm.vip';
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import got from '@/utils/got';
|
|||
import { load } from 'cheerio';
|
||||
import { parseDate } from '@/utils/parse-date';
|
||||
import { art } from '@/utils/render';
|
||||
const path = require('path');
|
||||
import * as path from 'node:path';
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const { category = 'news/justin' } = ctx.params;
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import cache from '@/utils/cache';
|
|||
import { load } from 'cheerio';
|
||||
import { parseDate } from '@/utils/parse-date';
|
||||
import { art } from '@/utils/render';
|
||||
const path = require('path');
|
||||
import * as path from 'node:path';
|
||||
import { config } from '@/config';
|
||||
import puppeteer from '@/utils/puppeteer';
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import got from '@/utils/got';
|
|||
import { load } from 'cheerio';
|
||||
import { parseDate } from '@/utils/parse-date';
|
||||
import { art } from '@/utils/render';
|
||||
const path = require('path');
|
||||
import * as path from 'node:path';
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
let id = ctx.req.param('id');
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import cache from '@/utils/cache';
|
|||
import { load } from 'cheerio';
|
||||
import got from '@/utils/got';
|
||||
import { art } from '@/utils/render';
|
||||
const path = require('path');
|
||||
import * as path from 'node:path';
|
||||
|
||||
const getData = async (ctx, list) => {
|
||||
const items = await Promise.all(
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import got from '@/utils/got';
|
||||
import { parseDate } from '@/utils/parse-date';
|
||||
import { art } from '@/utils/render';
|
||||
const path = require('path');
|
||||
import * as path from 'node:path';
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const category = ctx.req.param('category') ?? 'latest';
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
const path = require('path');
|
||||
import * as path from 'node:path';
|
||||
import { art } from '@/utils/render';
|
||||
|
||||
const puppeteerGet = async (url, browser) => {
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import got from '@/utils/got';
|
|||
import { load } from 'cheerio';
|
||||
import { parseDate } from '@/utils/parse-date';
|
||||
import { art } from '@/utils/render';
|
||||
const path = require('path');
|
||||
import * as path from 'node:path';
|
||||
|
||||
const languages = {
|
||||
arabic: {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import got from '@/utils/got';
|
||||
import { art } from '@/utils/render';
|
||||
const path = require('path');
|
||||
import * as path from 'node:path';
|
||||
import { load } from 'cheerio';
|
||||
const host = 'https://www.amazon.com';
|
||||
module.exports = async (ctx) => {
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import cache from '@/utils/cache';
|
|||
import got from '@/utils/got';
|
||||
import { parseDate } from '@/utils/parse-date';
|
||||
import { art } from '@/utils/render';
|
||||
const path = require('path');
|
||||
import * as path from 'node:path';
|
||||
const MarkdownIt = require('markdown-it');
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import got from '@/utils/got';
|
|||
import { load } from 'cheerio';
|
||||
import { parseDate } from '@/utils/parse-date';
|
||||
import { art } from '@/utils/render';
|
||||
const path = require('path');
|
||||
import * as path from 'node:path';
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit'), 10) : 50;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import got from '@/utils/got';
|
||||
import { art } from '@/utils/render';
|
||||
const path = require('path');
|
||||
import * as path from 'node:path';
|
||||
const { generateRssData } = require('./utils');
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import got from '@/utils/got';
|
||||
import { art } from '@/utils/render';
|
||||
const path = require('path');
|
||||
import * as path from 'node:path';
|
||||
const { generateRssData } = require('./utils');
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import got from '@/utils/got';
|
||||
import { load } from 'cheerio';
|
||||
import { art } from '@/utils/render';
|
||||
const path = require('path');
|
||||
import * as path from 'node:path';
|
||||
|
||||
const host = 'https://www.regear.arcteryx.com';
|
||||
function getUSDPrice(number) {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import cache from '@/utils/cache';
|
||||
import got from '@/utils/got';
|
||||
import { parseDate } from '@/utils/parse-date';
|
||||
const path = require('path');
|
||||
import * as path from 'node:path';
|
||||
import { art } from '@/utils/render';
|
||||
import { config } from '@/config';
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import got from '@/utils/got';
|
|||
import { load } from 'cheerio';
|
||||
import { parseDate } from '@/utils/parse-date';
|
||||
import { art } from '@/utils/render';
|
||||
const path = require('path');
|
||||
import * as path from 'node:path';
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const { category } = ctx.params;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import got from '@/utils/got';
|
||||
import { parseDate } from '@/utils/parse-date';
|
||||
import { art } from '@/utils/render';
|
||||
const path = require('path');
|
||||
import * as 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,6 +1,6 @@
|
|||
import got from '@/utils/got';
|
||||
import { art } from '@/utils/render';
|
||||
const path = require('path');
|
||||
import * as path from 'node:path';
|
||||
|
||||
const STATUS_MAP = {
|
||||
up: '上涨',
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import cache from '@/utils/cache';
|
|||
import got from '@/utils/got';
|
||||
import { load } from 'cheerio';
|
||||
import { art } from '@/utils/render';
|
||||
const path = require('path');
|
||||
import * as path from 'node:path';
|
||||
const renderDescription = (description, images) => art(path.join(__dirname, './templates/description.art'), { description, images });
|
||||
import { config } from '@/config';
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import got from '@/utils/got';
|
|||
import { parseDate } from '@/utils/parse-date';
|
||||
import timezone from '@/utils/timezone';
|
||||
import { art } from '@/utils/render';
|
||||
const path = require('path');
|
||||
import * as path from 'node:path';
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
// sortBy: created, replied
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import got from '@/utils/got';
|
|||
import { parseDate } from '@/utils/parse-date';
|
||||
import timezone from '@/utils/timezone';
|
||||
import { art } from '@/utils/render';
|
||||
const path = require('path');
|
||||
import * as path from 'node:path';
|
||||
|
||||
/**
|
||||
* 获取最新的帖子回复(倒序查看)
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ const iconv = require('iconv-lite');
|
|||
import timezone from '@/utils/timezone';
|
||||
import { parseDate } from '@/utils/parse-date';
|
||||
import { art } from '@/utils/render';
|
||||
const path = require('path');
|
||||
import * as path from 'node:path';
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const qw = ctx.req.param('qw');
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import got from '@/utils/got';
|
||||
import { load } from 'cheerio';
|
||||
import { art } from '@/utils/render';
|
||||
const path = require('path');
|
||||
import * as path from 'node:path';
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const { board = 'realtime' } = ctx.params;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import got from '@/utils/got';
|
||||
import { parseDate } from '@/utils/parse-date';
|
||||
import { art } from '@/utils/render';
|
||||
const path = require('path');
|
||||
import * as path from 'node:path';
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const rootUrl = 'https://bandcamp.com';
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import got from '@/utils/got';
|
||||
import { art } from '@/utils/render';
|
||||
import { parseDate } from '@/utils/parse-date';
|
||||
const path = require('path');
|
||||
import * as path from 'node:path';
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const url = 'https://api.bangumi.online/serve/home';
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import cache from '@/utils/cache';
|
||||
const getData = require('./_base');
|
||||
import { art } from '@/utils/render';
|
||||
const path = require('path');
|
||||
import * as path from 'node:path';
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const [list, data] = await getData(cache.tryGet);
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import got from '@/utils/got';
|
||||
import { parseDate } from '@/utils/parse-date';
|
||||
import { art } from '@/utils/render';
|
||||
const path = require('path');
|
||||
import * as path from 'node:path';
|
||||
const { getLocalName } = require('./utils');
|
||||
|
||||
module.exports = async (subjectID, showOriginalName) => {
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import cache from '@/utils/cache';
|
|||
import got from '@/utils/got';
|
||||
import { load } from 'cheerio';
|
||||
import { art } from '@/utils/render';
|
||||
const path = require('path');
|
||||
import * as path from 'node:path';
|
||||
|
||||
const rootUrl = 'https://www.baozimh.com';
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import { load } from 'cheerio';
|
|||
import { parseDate } from '@/utils/parse-date';
|
||||
import timezone from '@/utils/timezone';
|
||||
import { art } from '@/utils/render';
|
||||
const path = require('path');
|
||||
import * as path from 'node:path';
|
||||
const asyncPool = require('tiny-async-pool');
|
||||
import { config } from '@/config';
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import got from '@/utils/got';
|
||||
const path = require('path');
|
||||
import * as path from 'node:path';
|
||||
import { parseDate } from '@/utils/parse-date';
|
||||
import { art } from '@/utils/render';
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import cache from '@/utils/cache';
|
||||
import { load } from 'cheerio';
|
||||
const path = require('path');
|
||||
import * as path from 'node:path';
|
||||
const asyncPool = require('tiny-async-pool');
|
||||
|
||||
import { parseDate } from '@/utils/parse-date';
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import cache from '@/utils/cache';
|
|||
import { parseDate } from '@/utils/parse-date';
|
||||
const { resolveHandle, getProfile, getAuthorFeed } = require('./utils');
|
||||
import { art } from '@/utils/render';
|
||||
const path = require('path');
|
||||
import * as path from 'node:path';
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const { handle } = ctx.params;
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import { load } from 'cheerio';
|
|||
import timezone from '@/utils/timezone';
|
||||
import { parseDate } from '@/utils/parse-date';
|
||||
import { art } from '@/utils/render';
|
||||
const path = require('path');
|
||||
import * as path from 'node:path';
|
||||
import { config } from '@/config';
|
||||
const allowDomain = new Set(['2btjia.com', '88btbtt.com', 'btbtt15.com', 'btbtt20.com']);
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import { load } from 'cheerio';
|
||||
import got from '@/utils/got';
|
||||
import { art } from '@/utils/render';
|
||||
const path = require('path');
|
||||
import * as path from 'node:path';
|
||||
import { parseDate } from '@/utils/parse-date';
|
||||
import timezone from '@/utils/timezone';
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import got from '@/utils/got';
|
|||
import { load } from 'cheerio';
|
||||
import { parseDate } from '@/utils/parse-date';
|
||||
import { art } from '@/utils/render';
|
||||
const path = require('path');
|
||||
import * as path from 'node:path';
|
||||
|
||||
const rootUrl = 'http://www.caareviews.org';
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import got from '@/utils/got';
|
|||
import timezone from '@/utils/timezone';
|
||||
import { parseDate } from '@/utils/parse-date';
|
||||
import { art } from '@/utils/render';
|
||||
const path = require('path');
|
||||
import * as path from 'node:path';
|
||||
|
||||
const titles = {
|
||||
'01': '关于我们',
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import { load } from 'cheerio';
|
|||
import timezone from '@/utils/timezone';
|
||||
import { parseDate } from '@/utils/parse-date';
|
||||
import { art } from '@/utils/render';
|
||||
const path = require('path');
|
||||
import * as path from 'node:path';
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const rootUrl = 'https://database.caixin.com';
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import cache from '@/utils/cache';
|
|||
import got from '@/utils/got';
|
||||
import { load } from 'cheerio';
|
||||
import { art } from '@/utils/render';
|
||||
const path = require('path');
|
||||
import * as path from 'node:path';
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const { data } = await got('https://gateway.caixin.com/api/dataplatform/scroll/index').json();
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import got from '@/utils/got';
|
||||
import { load } from 'cheerio';
|
||||
import { art } from '@/utils/render';
|
||||
const path = require('path');
|
||||
import * as path from 'node:path';
|
||||
|
||||
const parseArticle = (item, tryGet) =>
|
||||
/\.blog\.caixin\.com$/.test(new URL(item.link).hostname)
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import got from '@/utils/got';
|
|||
import timezone from '@/utils/timezone';
|
||||
import { parseDate } from '@/utils/parse-date';
|
||||
import { art } from '@/utils/render';
|
||||
const path = require('path');
|
||||
import * as path from 'node:path';
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const id = ctx.req.param('id') ?? 'diyi';
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import { load } from 'cheerio';
|
|||
import got from '@/utils/got';
|
||||
const iconv = require('iconv-lite');
|
||||
import { art } from '@/utils/render';
|
||||
const path = require('path');
|
||||
import * as path from 'node:path';
|
||||
|
||||
const baseUrl = 'https://www.cartoonmad.com';
|
||||
const KEY = '5e585';
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import got from '@/utils/got';
|
|||
import { load } from 'cheerio';
|
||||
import { parseDate } from '@/utils/parse-date';
|
||||
import { art } from '@/utils/render';
|
||||
const path = require('path');
|
||||
import * as path from 'node:path';
|
||||
|
||||
const { rootUrl, apiSlug, GetFilterId } = require('./utils');
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import got from '@/utils/got';
|
|||
import { load } from 'cheerio';
|
||||
import { parseDate } from '@/utils/parse-date';
|
||||
import { art } from '@/utils/render';
|
||||
const path = require('path');
|
||||
import * as path from 'node:path';
|
||||
|
||||
const rootUrl = 'https://tc.ccf.org.cn';
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import { load } from 'cheerio';
|
||||
import got from '@/utils/got';
|
||||
import { art } from '@/utils/render';
|
||||
const path = require('path');
|
||||
import * as path from 'node:path';
|
||||
import { parseDate } from '@/utils/parse-date';
|
||||
import timezone from '@/utils/timezone';
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import cache from '@/utils/cache';
|
||||
import got from '@/utils/got';
|
||||
const path = require('path');
|
||||
import * as path from 'node:path';
|
||||
import { parseDate } from '@/utils/parse-date';
|
||||
import timezone from '@/utils/timezone';
|
||||
import randUserAgent from '@/utils/rand-user-agent';
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import got from '@/utils/got';
|
||||
import { parseDate } from '@/utils/parse-date';
|
||||
import { art } from '@/utils/render';
|
||||
const path = require('path');
|
||||
import * as path from 'node:path';
|
||||
const utils = require('./utils');
|
||||
|
||||
const baseUrl = 'https://www.cde.org.cn';
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import { load } from 'cheerio';
|
|||
import { parseDate } from '@/utils/parse-date';
|
||||
import timezone from '@/utils/timezone';
|
||||
import { art } from '@/utils/render';
|
||||
const path = require('path');
|
||||
import * as path from 'node:path';
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const url = 'https://zw.cdzjryb.com/lottery/accept/projectList';
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import got from '@/utils/got';
|
||||
import { load } from 'cheerio';
|
||||
const path = require('path');
|
||||
import * as path from 'node:path';
|
||||
import { art } from '@/utils/render';
|
||||
import timezone from '@/utils/timezone';
|
||||
import { parseDate } from '@/utils/parse-date';
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import got from '@/utils/got';
|
||||
import { load } from 'cheerio';
|
||||
const path = require('path');
|
||||
import * as path from 'node:path';
|
||||
import { art } from '@/utils/render';
|
||||
const utils = require('./utils');
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import got from '@/utils/got';
|
|||
import { load } from 'cheerio';
|
||||
import { parseDate } from '@/utils/parse-date';
|
||||
import { art } from '@/utils/render';
|
||||
const path = require('path');
|
||||
import * as path from 'node:path';
|
||||
|
||||
const rootUrl = 'https://www.chaincatcher.com';
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import cache from '@/utils/cache';
|
|||
import got from '@/utils/got';
|
||||
import { load } from 'cheerio';
|
||||
import { art } from '@/utils/render';
|
||||
const path = require('path');
|
||||
import * as 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' };
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import got from '@/utils/got';
|
|||
import { load } from 'cheerio';
|
||||
import { parseDate } from '@/utils/parse-date';
|
||||
import { art } from '@/utils/render';
|
||||
const path = require('path');
|
||||
import * as path from 'node:path';
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const id = ctx.req.param('id');
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import cache from '@/utils/cache';
|
|||
import { load } from 'cheerio';
|
||||
import { parseDate } from '@/utils/parse-date';
|
||||
import { art } from '@/utils/render';
|
||||
const path = require('path');
|
||||
import * as path from 'node:path';
|
||||
import { config } from '@/config';
|
||||
import puppeteer from '@/utils/puppeteer';
|
||||
const baseUrl = 'http://www.chinadegrees.com.cn';
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import got from '@/utils/got';
|
|||
import { load } from 'cheerio';
|
||||
import { parseDate } from '@/utils/parse-date';
|
||||
import { art } from '@/utils/render';
|
||||
const path = require('path');
|
||||
import * as path from 'node:path';
|
||||
const md = require('markdown-it')({
|
||||
html: true,
|
||||
});
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import got from '@/utils/got';
|
|||
import { load } from 'cheerio';
|
||||
import { parseDate } from '@/utils/parse-date';
|
||||
import { art } from '@/utils/render';
|
||||
const path = require('path');
|
||||
import * as path from 'node:path';
|
||||
|
||||
const { rootUrl, getSearchParams } = require('./utils');
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import got from '@/utils/got';
|
|||
import { load } from 'cheerio';
|
||||
import { parseDate } from '@/utils/parse-date';
|
||||
import { art } from '@/utils/render';
|
||||
const path = require('path');
|
||||
import * as path from 'node:path';
|
||||
|
||||
const { rootUrl, getSearchParams } = require('./utils');
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import got from '@/utils/got';
|
||||
import { parseDate } from '@/utils/parse-date';
|
||||
import { art } from '@/utils/render';
|
||||
const path = require('path');
|
||||
import * as path from 'node:path';
|
||||
|
||||
const { rootUrl, getSearchParams } = require('./utils');
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import { load } from 'cheerio';
|
|||
import timezone from '@/utils/timezone';
|
||||
import { parseDate } from '@/utils/parse-date';
|
||||
import { art } from '@/utils/render';
|
||||
const path = require('path');
|
||||
import * as path from 'node:path';
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const { id = '380' } = ctx.params;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import got from '@/utils/got';
|
||||
import { art } from '@/utils/render';
|
||||
const path = require('path');
|
||||
import * as path from 'node:path';
|
||||
import { parseDate } from '@/utils/parse-date';
|
||||
import timezone from '@/utils/timezone';
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import got from '@/utils/got';
|
||||
import { art } from '@/utils/render';
|
||||
const path = require('path');
|
||||
import * as path from 'node:path';
|
||||
import { parseDate } from '@/utils/parse-date';
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import got from '@/utils/got';
|
|||
import { load } from 'cheerio';
|
||||
import { parseDate } from '@/utils/parse-date';
|
||||
import { art } from '@/utils/render';
|
||||
const path = require('path');
|
||||
import * as path from 'node:path';
|
||||
|
||||
const categories = {
|
||||
jxrb: '嘉兴日报',
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import got from '@/utils/got';
|
|||
import { load } from 'cheerio';
|
||||
import { parseDate } from '@/utils/parse-date';
|
||||
import { art } from '@/utils/render';
|
||||
const path = require('path');
|
||||
import * as path from 'node:path';
|
||||
|
||||
const rootUrl = 'https://chn.oversea.cnki.net';
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import got from '@/utils/got';
|
||||
import { load } from 'cheerio';
|
||||
import { art } from '@/utils/render';
|
||||
const path = require('path');
|
||||
import * as path from 'node:path';
|
||||
|
||||
const ProcessItem = async (item) => {
|
||||
const detailResponse = await got(item.link);
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import got from '@/utils/got';
|
|||
import { load } from 'cheerio';
|
||||
import { parseDate } from '@/utils/parse-date';
|
||||
import { art } from '@/utils/render';
|
||||
const path = require('path');
|
||||
import * as path from 'node:path';
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const id = ctx.req.param('id');
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import got from '@/utils/got';
|
||||
import { art } from '@/utils/render';
|
||||
const path = require('path');
|
||||
import * as path from 'node:path';
|
||||
import { parseDate } from '@/utils/parse-date';
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import got from '@/utils/got';
|
||||
const path = require('path');
|
||||
import * as path from 'node:path';
|
||||
import { art } from '@/utils/render';
|
||||
|
||||
const dayjs = require('dayjs');
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import got from '@/utils/got';
|
|||
import { load } from 'cheerio';
|
||||
import { parseDate } from '@/utils/parse-date';
|
||||
import { art } from '@/utils/render';
|
||||
const path = require('path');
|
||||
import * as path from 'node:path';
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const baseURL = 'https://comicskingdom.com';
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import { load } from 'cheerio';
|
|||
import got from '@/utils/got';
|
||||
import { parseDate } from '@/utils/parse-date';
|
||||
import { art } from '@/utils/render';
|
||||
const path = require('path');
|
||||
import * as path from 'node:path';
|
||||
import { config } from '@/config';
|
||||
const asyncPool = require('tiny-async-pool');
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import cache from '@/utils/cache';
|
||||
import { parseDate } from '@/utils/parse-date';
|
||||
import { art } from '@/utils/render';
|
||||
const path = require('path');
|
||||
import * as path from 'node:path';
|
||||
const { getUuid, getBook, getChapter, getChapters, getImgEncrypted, getImgKey, decrypt, getRealKey, siteHost } = require('./utils');
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import got from '@/utils/got';
|
||||
import { parseDate } from '@/utils/parse-date';
|
||||
import { art } from '@/utils/render';
|
||||
const path = require('path');
|
||||
import * as path from 'node:path';
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const username = ctx.req.param('name');
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import { load } from 'cheerio';
|
|||
import got from '@/utils/got';
|
||||
import { parseDate } from '@/utils/parse-date';
|
||||
import timezone from '@/utils/timezone';
|
||||
const path = require('path');
|
||||
import * as path from 'node:path';
|
||||
import { art } from '@/utils/render';
|
||||
|
||||
const renderDesc = (item) => art(path.join(__dirname, 'templates/daily.art'), item);
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue