hash
stringlengths 40
40
| date
stringdate 2018-04-19 20:42:56
2025-03-25 18:01:26
| author
stringlengths 1
23
| commit_message
stringlengths 9
121
| is_merge
bool 1
class | masked_commit_message
stringlengths 3
111
| type
stringclasses 10
values | git_diff
stringlengths 108
2.8M
|
|---|---|---|---|---|---|---|---|
d5e38c8f5d140d14dd1d8449f00899e6ab45eb01
|
2024-01-25 10:59:00
|
DIYgod
|
feat: use npm directory-import
| false
|
use npm directory-import
|
feat
|
diff --git a/lib/routes.ts b/lib/routes.ts
index ade7d80f30b790..b32091a0abf265 100644
--- a/lib/routes.ts
+++ b/lib/routes.ts
@@ -1,4 +1,4 @@
-import { directoryImport } from '@/utils/directory-import';
+import { directoryImport } from 'directory-import';
import type { Handler } from 'hono'
type Root = {
@@ -6,7 +6,6 @@ type Root = {
}
const imports = directoryImport({
- callerDirectoryPath: __dirname,
targetDirectoryPath: './v3',
importPattern: /router\.js$/,
});
diff --git a/lib/utils/directory-import/directory-reader-async.ts b/lib/utils/directory-import/directory-reader-async.ts
deleted file mode 100644
index 0037ddc1e22e84..00000000000000
--- a/lib/utils/directory-import/directory-reader-async.ts
+++ /dev/null
@@ -1,41 +0,0 @@
-import { promises as fs } from 'node:fs';
-
-import { ImportedModulesPrivateOptions } from './types.d';
-
-/**
- * Async version of the directory reader.
- *
- * I use *for loop* instead of forEach because it is faster.
- * I define the *counter* variable outside the loop because it is faster. Because it is not redefined every iteration.
- * @param {ImportedModulesPrivateOptions} options - The private options generated by the preparePrivateOptions function.
- * @param {string} targetDirectoryPath - The path to the directory to import modules from. Required for recursive calls.
- * @returns {Promise<string[]>} An object containing all imported modules.
- */
-export default async function readDirectoryAsync(
- options: ImportedModulesPrivateOptions,
- targetDirectoryPath: string,
-): Promise<string[]> {
- const receivedItemsPaths = await fs.readdir(targetDirectoryPath);
-
- const result = await Promise.all(
- receivedItemsPaths.map(async (itemPath) => {
- const receivedFilesPaths = [];
-
- const relativeItemPath = `${targetDirectoryPath}/${itemPath}`;
-
- const stat = await fs.stat(relativeItemPath);
-
- if (stat.isDirectory() && options.includeSubdirectories) {
- const files = await readDirectoryAsync(options, relativeItemPath);
-
- receivedFilesPaths.push(...files);
- } else if (stat.isFile()) {
- receivedFilesPaths.push('/' + relativeItemPath);
- }
-
- return receivedFilesPaths;
- }),
- );
-
- return result.flat();
-}
diff --git a/lib/utils/directory-import/directory-reader-sync.ts b/lib/utils/directory-import/directory-reader-sync.ts
deleted file mode 100644
index f3a0ef6dd40655..00000000000000
--- a/lib/utils/directory-import/directory-reader-sync.ts
+++ /dev/null
@@ -1,46 +0,0 @@
-import * as fs from 'node:fs';
-
-import { ImportedModulesPrivateOptions } from './types.d';
-
-/**
- * Sync version of the directory reader.
- *
- * !important this function will block the event loop until it finishes.
- * I use *for loop* instead of forEach because it is faster.
- * I define the *counter* variable outside the loop because it is faster. Because it is not redefined every iteration.
- * @param {ImportedModulesPrivateOptions} options - The private options generated by the preparePrivateOptions function.
- * @param {string} targetDirectoryPath - The path to the directory to import modules from. Required for recursive calls.
- * @returns {string[]} An array of file paths.
- */
-export default function readDirectorySync(
- options: ImportedModulesPrivateOptions,
- targetDirectoryPath: string,
-): string[] {
- const receivedItemsPaths = fs.readdirSync(targetDirectoryPath);
- const receivedDirectoriesPaths = [];
- const receivedFilesPaths = [];
-
- // Get the files and directories paths from the target directory.
- let itemsCounter = 0;
- for (itemsCounter; itemsCounter < receivedItemsPaths.length; itemsCounter += 1) {
- const itemPath = `${targetDirectoryPath}/${receivedItemsPaths[itemsCounter]}`;
- const stat = fs.statSync(itemPath);
-
- if (stat.isDirectory() && options.includeSubdirectories) {
- receivedDirectoriesPaths.push(itemPath);
- } else if (stat.isFile()) {
- receivedFilesPaths.push('/' + itemPath);
- }
- }
-
- // Recursively get the files paths from the subdirectories.
- let directoriesCounter = 0;
- for (directoriesCounter; directoriesCounter < receivedDirectoriesPaths.length; directoriesCounter += 1) {
- const files = readDirectorySync(options, receivedDirectoriesPaths[directoriesCounter] as string);
-
- receivedFilesPaths.push(...files);
- }
-
- // Return the files paths.
- return receivedFilesPaths;
-}
diff --git a/lib/utils/directory-import/import-modules.ts b/lib/utils/directory-import/import-modules.ts
deleted file mode 100644
index 00982169bd56f4..00000000000000
--- a/lib/utils/directory-import/import-modules.ts
+++ /dev/null
@@ -1,105 +0,0 @@
-import * as path from 'node:path';
-
-import readDirectoryAsync from './directory-reader-async';
-import readDirectorySync from './directory-reader-sync';
-import { ImportedModules, ImportedModulesPrivateOptions } from './types.d';
-
-const VALID_IMPORT_EXTENSIONS = new Set(['.js', '.mjs', '.ts', '.json']);
-
-const handlers = { async: asyncHandler, sync: syncHandler };
-
-/**
- * Synchronously import modules from the specified directory.
- * @param {ImportedModulesPrivateOptions} options - The private options generated by the preparePrivateOptions function.
- * @returns {ImportedModules} An object containing all imported modules.
- */
-function syncHandler(options: ImportedModulesPrivateOptions): ImportedModules {
- const modules = {};
-
- const filesPaths = readDirectorySync(options, options.targetDirectoryPath);
-
- let index = 0;
-
- for (const filePath of filesPaths) {
- const isModuleImported = importModule(filePath, index, options, modules);
-
- if (isModuleImported) index += 1;
- if (index === options.limit) break;
- }
-
- return modules;
-}
-
-/**
- * Asynchronously import modules from the specified directory.
- * @param {ImportedModulesPrivateOptions} options - The private options generated by the preparePrivateOptions function.
- * @returns {Promise<ImportedModules>} An object containing all imported modules.
- */
-async function asyncHandler(options: ImportedModulesPrivateOptions): Promise<ImportedModules> {
- const modules = {};
-
- const filesPaths = await readDirectoryAsync(options, options.targetDirectoryPath);
-
- let index = 0;
-
- for (const filePath of filesPaths) {
- const isModuleImported = importModule(filePath, index, options, modules);
-
- if (isModuleImported) index += 1;
- if (index === options.limit) break;
- }
-
- return modules;
-}
-
-/**
- * Import a module and add it to the modules object.
- * @param {string} filePath - The path to the file to import.
- * @param {number} index - The index of the module.
- * @param {ImportedModulesPrivateOptions} options - The private options generated by the preparePrivateOptions function.
- * @param {ImportedModules} modules - The object containing all imported modules.
- * @returns {boolean} Whether the module was imported or not.
- */
-function importModule(
- filePath: string,
- index: number,
- options: ImportedModulesPrivateOptions,
- modules: ImportedModules,
-) {
- const { name: fileName, ext: fileExtension } = path.parse(filePath);
- const isValidModuleExtension = VALID_IMPORT_EXTENSIONS.has(fileExtension);
- const isDeclarationFile = filePath.endsWith('.d.ts');
- const isValidFilePath = options.importPattern ? options.importPattern.test(filePath) : true;
-
- if (!isValidModuleExtension) return false;
- if (!isValidFilePath) return false;
- if (isDeclarationFile) return false;
-
- const relativeModulePath = filePath.slice(options.targetDirectoryPath.length + 1);
-
- // eslint-disable-next-line security/detect-non-literal-require, @typescript-eslint/no-var-requires, unicorn/prefer-module
- const importedModule = require(filePath) as unknown;
-
- modules[relativeModulePath] = importedModule;
-
- if (options.callback) {
- options.callback(fileName, relativeModulePath, importedModule, index);
- }
-
- return true;
-}
-
-/**
- * Import all modules from the specified directory synchronously or asynchronously.
- * @param {ImportedModulesPrivateOptions} options - The private options generated by the preparePrivateOptions function.
- * @returns {ImportedModules | Promise<ImportedModules>} An object containing all imported modules.
- */
-export default function importModules(
- options: ImportedModulesPrivateOptions,
-): ImportedModules | Promise<ImportedModules> {
- if (!handlers[options.importMode]) {
- throw new Error(`Expected sync or async import method, but got: ${options.importMode}`);
- }
-
- return handlers[options.importMode](options);
-}
diff --git a/lib/utils/directory-import/index.ts b/lib/utils/directory-import/index.ts
deleted file mode 100644
index 6660574bc62ad9..00000000000000
--- a/lib/utils/directory-import/index.ts
+++ /dev/null
@@ -1,92 +0,0 @@
-import importModules from './import-modules';
-import preparePrivateOptions from './prepare-private-options';
-import {
- ImportedModules,
- ImportedModulesPublicOptions,
- ImportModulesCallback,
- ImportModulesInputArguments,
- ImportModulesMode,
-} from './types.d';
-
-/**
- * Import modules from the current directory synchronously
- * @returns {ImportedModules} An object containing all imported modules.
- */
-function directoryImport(): ImportedModules;
-
-/**
- * Import modules from the current directory synchronously and call the provided callback for each imported module.
- * @param {ImportModulesCallback} callback - The callback function to call for each imported module.
- * @returns {ImportedModules} An object containing all imported modules.
- */
-function directoryImport(callback: ImportModulesCallback): ImportedModules;
-
-/**
- * Import modules from the specified directory synchronously.
- * @param {string} targetDirectoryPath - The path to the directory to import modules from.
- * @returns {ImportedModules} An object containing all imported modules.
- */
-function directoryImport(targetDirectoryPath: string): ImportedModules;
-
-/**
- * Import all modules from the specified directory synchronously and call the provided callback for each imported module.
- * @param {string} targetDirectoryPath - The path to the directory to import modules from.
- * @param {ImportModulesCallback} callback - The callback function to call for each imported module.
- * @returns {ImportedModules} An object containing all imported modules.
- */
-function directoryImport(targetDirectoryPath: string, callback: ImportModulesCallback): ImportedModules;
-
-/**
- * Import all modules from the specified directory synchronously or asynchronously.
- * @param {string} targetDirectoryPath - The path to the directory to import modules from.
- * @param {ImportModulesMode} mode - The import mode. Can be 'sync' or 'async'.
- * @returns {ImportedModules} An object containing all imported modules.
- */
-function directoryImport(targetDirectoryPath: string, mode: ImportModulesMode): ImportedModules;
-
-/**
- * Import all modules from the specified directory synchronously or asynchronously and call the provided callback for each imported module.
- * @param {string} targetDirectoryPath - The path to the directory to import modules from.
- * @param {ImportModulesMode} importMode - The import mode. Can be 'sync' or 'async'.
- * @param {ImportModulesCallback} callback - The callback function to call for each imported module.
- * @returns {ImportedModules} An object containing all imported modules.
- */
-function directoryImport(
- targetDirectoryPath: string,
- importMode: ImportModulesMode,
- callback: ImportModulesCallback,
-): ImportedModules;
-
-/**
- * Import all modules from the specified directory
- * @param {ImportedModulesPublicOptions} options - The options object.
- * @returns {ImportedModules} An object containing all imported modules.
- */
-function directoryImport(options: ImportedModulesPublicOptions): ImportedModules;
-
-/**
- * Import all modules from the specified directory and call the provided callback for each imported module.
- * @param {ImportedModulesPublicOptions} options - The options object.
- * @param {ImportModulesCallback} callback - The callback function to call for each imported module.
- * @returns {ImportedModules} An object containing all imported modules.
- */
-function directoryImport(options: ImportedModulesPublicOptions, callback: ImportModulesCallback): ImportedModules;
-
-/**
- * Import all modules from the specified directory with the given options and call the provided callback for each imported module.
- * @param {ImportModulesInputArguments} arguments_ - The arguments.
- * @returns {ImportedModules|Promise<ImportedModules>} An object containing all imported modules.
- */
-function directoryImport(...arguments_: ImportModulesInputArguments): ImportedModules | Promise<ImportedModules> {
- const options = preparePrivateOptions(...arguments_);
-
- try {
- return importModules(options);
- } catch (error) {
- Object.assign(error as Error, options);
-
- throw error;
- }
-}
-
-export { directoryImport };
diff --git a/lib/utils/directory-import/prepare-private-options.ts b/lib/utils/directory-import/prepare-private-options.ts
deleted file mode 100644
index cfa51a2458880c..00000000000000
--- a/lib/utils/directory-import/prepare-private-options.ts
+++ /dev/null
@@ -1,121 +0,0 @@
-import * as path from 'node:path';
-
-import {
- ImportedModulesPrivateOptions,
- ImportedModulesPublicOptions,
- ImportModulesInputArguments,
- ImportModulesMode,
-} from './types.d';
-
-const getDefaultOptions = (): ImportedModulesPrivateOptions => {
- const options = {
- includeSubdirectories: true,
- importMode: 'sync' as ImportModulesMode,
- importPattern: /.*/,
- limit: Number.POSITIVE_INFINITY,
- callerFilePath: '/',
- callerDirectoryPath: '/',
- targetDirectoryPath: '/',
- };
-
- options.callerFilePath = (new Error('functional-error').stack as string)
- .split('\n')[4]
- ?.match(/at file:\/\/(.+):\d+|at .+ \((.+):\d+:\d+\)/)?.slice(1).find(Boolean) as string;
-
- options.callerDirectoryPath = options.callerFilePath?.split('/').slice(0, -1).join('/');
- options.targetDirectoryPath = options.callerDirectoryPath;
-
- return options;
-};
-
-/**
- * Prepare the options object from the provided arguments.
- * @param {...any} arguments_ - The arguments.
- * @returns {ImportedModulesPrivateOptions} The options object.
- */
-export default function preparePrivateOptions(
- ...arguments_: ImportModulesInputArguments
-): ImportedModulesPrivateOptions {
- const options = { ...getDefaultOptions() };
-
- // * Check first argument
-
- // ** If user provided nothing as first argument,
- // ** it means that he wants to use the default options
- // ** return the default options
- if (arguments_[0] === undefined) {
- return options;
- }
-
- // ** If user provided an object as first argument,
- // ** it means that he wants to set custom options
- // ** use it to oweverwrite the default options
- else if (typeof arguments_[0] === 'object') {
- const result = {
- ...getDefaultOptions(),
- ...(arguments_[0] as ImportedModulesPublicOptions),
- };
-
- result.targetDirectoryPath = path.resolve(result.callerDirectoryPath, result.targetDirectoryPath);
- result.callback = typeof arguments_[1] === 'function' ? arguments_[1] : undefined;
-
- return result;
- }
-
- // ** If user provided a string
- // ** it means that he wants to set the target directory path as first argument
- // ** use it to oweverwrite the default options
- else if (typeof arguments_[0] === 'string') {
- options.targetDirectoryPath = path.resolve(options.callerDirectoryPath, arguments_[0]);
- }
-
- // ** If user provided a function
- // ** it means that he wants to set the callback as first argument
- // ** use it to oweverwrite the default options
- else if (typeof arguments_[0] === 'function') {
- options.callback = arguments_[0];
- }
-
- // ** If user provided something else
- // ** it means that he made a mistake
- // ** throw an error
- else {
- throw new TypeError(
- `Expected undefined, object, string or function as first argument, but got: ${typeof arguments_[0]}`,
- );
- }
-
- // * Check second argument
-
- // ** If user provided string as second argument
- // ** it means that he wants to set the import mode (sync or async) as second argument
- // ** use it to oweverwrite the default options
- if (typeof arguments_[1] === 'string') {
- // ** But if the import mode is not sync or async
- // ** throw an error
- if (arguments_[1] !== 'sync' && arguments_[1] !== 'async') {
- throw new TypeError(`Expected sync or async as second argument, but got: ${arguments_[1]}`);
- }
-
- options.importMode = arguments_[1];
- }
-
- // ** If user provided a function as second argument
- // ** it means that he wants to set the callback as second argument
- // ** use it to oweverwrite the default options
- else if (typeof arguments_[1] === 'function') {
- options.callback = arguments_[1];
- }
-
- // * Check third argument
-
- // ** If user provided a function as third argument
- // ** it means that he wants to set the callback as third argument
- // ** use it to oweverwrite the default options
- if (typeof arguments_[2] === 'function') {
- options.callback = arguments_[2];
- }
-
- // * Return the options object
- return options;
-}
diff --git a/lib/utils/directory-import/types.d.ts b/lib/utils/directory-import/types.d.ts
deleted file mode 100644
index 19f169bc23e7ff..00000000000000
--- a/lib/utils/directory-import/types.d.ts
+++ /dev/null
@@ -1,33 +0,0 @@
-export type ModuleName = string;
-export type ModulePath = string;
-export type ModuleData = unknown;
-export type ModuleIndex = number;
-
-export type ImportModulesMode = 'sync' | 'async';
-export type ImportModulesCallback = (name: ModuleName, path: ModulePath, data: ModuleData, index: ModuleIndex) => void;
-
-export type ImportModulesInputArguments = [
- targetDirectoryPathOrOptionsOrCallback?: string | ImportedModulesPublicOptions | ImportModulesCallback,
- modeOrCallback?: ImportModulesMode | ImportModulesCallback,
- callback?: ImportModulesCallback,
-];
-
-export interface ImportedModules {
- [key: ModulePath]: ModuleData;
-}
-
-export interface ImportedModulesPublicOptions {
- includeSubdirectories?: boolean;
- callerDirectoryPath?: string;
- targetDirectoryPath?: string;
- importPattern?: RegExp;
- importMode?: ImportModulesMode;
- limit?: number;
-}
-
-export interface ImportedModulesPrivateOptions extends Required<ImportedModulesPublicOptions> {
- callback?: ImportModulesCallback;
-
- callerFilePath: string;
- callerDirectoryPath: string;
-}
diff --git a/package.json b/package.json
index 2c316374ff23f0..51cf9566cd62e9 100644
--- a/package.json
+++ b/package.json
@@ -91,6 +91,7 @@
"crypto-js": "4.2.0",
"currency-symbol-map": "5.1.0",
"dayjs": "1.11.8",
+ "directory-import": "3.2.1",
"dotenv": "16.3.2",
"entities": "4.5.0",
"etag": "1.8.1",
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index ca3eeca4fda06f..bc79bcd6b49187 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -53,6 +53,9 @@ dependencies:
dayjs:
specifier: 1.11.8
version: 1.11.8
+ directory-import:
+ specifier: 3.2.1
+ version: 3.2.1
dotenv:
specifier: 16.3.2
version: 16.3.2
@@ -3421,6 +3424,11 @@ packages:
engines: {node: '>=0.3.1'}
dev: true
+ /[email protected]:
+ resolution: {integrity: sha512-hIMc9WJHs4HRZbBiNAvKGxkhjaJ2wOaFcFA0K+yj16GyBJDg28e6QgQ3hFuFB0ZRETNYZu3u85rmxIxoxWEwbA==}
+ engines: {node: '>=18.17.0'}
+ dev: false
+
/[email protected]:
resolution: {integrity: sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==}
engines: {node: '>=6.0.0'}
|
b970348a3cb404572e841be53b47806bcd43b280
|
2021-05-25 19:14:47
|
GitHub Action
|
style: auto format
| false
|
auto format
|
style
|
diff --git a/lib/routes/nytimes/morning_post.js b/lib/routes/nytimes/morning_post.js
index a9f477c7a82c88..f0ff3ea20535be 100644
--- a/lib/routes/nytimes/morning_post.js
+++ b/lib/routes/nytimes/morning_post.js
@@ -10,35 +10,36 @@ module.exports = async (ctx) => {
});
const data = response.data;
const $ = cheerio.load(data);
- const post = $('item').map((index, elem) => {
- const title = $(elem).find('title').text();
- const link = $(elem).find('link').next().text();
- return {
- link: link,
- title: title
- };
- }).get();
+ const post = $('item')
+ .map((index, elem) => {
+ const title = $(elem).find('title').text();
+ const link = $(elem).find('link').next().text();
+ return {
+ link: link,
+ title: title,
+ };
+ })
+ .get();
const browser = await require('@/utils/puppeteer')();
const items = await Promise.all(
- post.map(
- async (item) => {
- // use puppeter cause all the image is lazy-load
- const result = utils.ProcessFeed(await utils.PuppeterGetter(ctx, browser, item.link), true);
+ post.map(async (item) => {
+ // use puppeter cause all the image is lazy-load
+ const result = utils.ProcessFeed(await utils.PuppeterGetter(ctx, browser, item.link), true);
- item.pubDate = result.pubDate;
+ item.pubDate = result.pubDate;
- // Match 感谢|謝.*[email protected]。
- const ending = /感(谢|謝);.*?cn\.letters@nytimes\.com。/g;
+ // Match 感谢|謝.*[email protected]。
+ const ending = /感(谢|謝);.*?cn\.letters@nytimes\.com。/g;
- const matching = '<div class="article-paragraph">';
- const formatted = '<br>' + matching;
+ const matching = '<div class="article-paragraph">';
+ const formatted = '<br>' + matching;
- item.description = result.description.replace(ending, '').split(matching).join(formatted);
+ item.description = result.description.replace(ending, '').split(matching).join(formatted);
- return Promise.resolve(item);
- })
+ return Promise.resolve(item);
+ })
);
browser.close();
diff --git a/lib/routes/nytimes/utils.js b/lib/routes/nytimes/utils.js
index 584f3b19f73a61..72452c1d07e2ec 100644
--- a/lib/routes/nytimes/utils.js
+++ b/lib/routes/nytimes/utils.js
@@ -16,10 +16,7 @@ const PuppeterGetter = async (ctx, browser, link) => {
const result = await ctx.cache.tryGet(`nyt: ${link}`, async () => {
const page = await browser.newPage();
await page.goto(link);
- const response = await page.evaluate(
- () =>
- document.querySelector('body').innerHTML
- );
+ const response = await page.evaluate(() => document.querySelector('body').innerHTML);
return response;
});
return result;
|
d1bac263cc6732d2440a8b55a309ef64d1c32df3
|
2023-03-21 13:25:07
|
dependabot[bot]
|
chore(deps-dev): bump eslint-config-prettier from 8.7.0 to 8.8.0 (#12147)
| false
|
bump eslint-config-prettier from 8.7.0 to 8.8.0 (#12147)
|
chore
|
diff --git a/package.json b/package.json
index f2f1b951b0e344..bf8e6ec1c47b2c 100644
--- a/package.json
+++ b/package.json
@@ -58,7 +58,7 @@
"@vuepress/shared-utils": "1.9.9",
"cross-env": "7.0.3",
"eslint": "8.36.0",
- "eslint-config-prettier": "8.7.0",
+ "eslint-config-prettier": "8.8.0",
"eslint-plugin-prettier": "4.2.1",
"eslint-plugin-yml": "1.5.0",
"fs-extra": "11.1.1",
diff --git a/yarn.lock b/yarn.lock
index c5cedfd2d470fe..bb9ca098666049 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -5620,10 +5620,10 @@ escodegen@^2.0.0:
optionalDependencies:
source-map "~0.6.1"
[email protected]:
- version "8.7.0"
- resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-8.7.0.tgz#f1cc58a8afebc50980bd53475451df146c13182d"
- integrity sha512-HHVXLSlVUhMSmyW4ZzEuvjpwqamgmlfkutD53cYXLikh4pt/modINRcCIApJ84czDxM4GZInwUrromsDdTImTA==
[email protected]:
+ version "8.8.0"
+ resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-8.8.0.tgz#bfda738d412adc917fd7b038857110efe98c9348"
+ integrity sha512-wLbQiFre3tdGgpDv67NQKnJuTlcUVYHas3k+DZCc2U2BadthoEY4B7hLPvAxaqdyOGCzuLfii2fqGph10va7oA==
[email protected]:
version "4.2.1"
|
45818f4e7bb375f99d2d72d169ba3f192f812150
|
2024-08-02 20:00:27
|
Madray Haven
|
feat(route): javdb actors addon_tags (#16336)
| false
|
javdb actors addon_tags (#16336)
|
feat
|
diff --git a/lib/routes/javdb/actors.ts b/lib/routes/javdb/actors.ts
index a4bc97517e13d5..74e09f0f7146c7 100644
--- a/lib/routes/javdb/actors.ts
+++ b/lib/routes/javdb/actors.ts
@@ -34,14 +34,18 @@ export const route: Route = {
| ---- | ------ | -------- | ------ | ------ |
| | p | s | d | c |
- 所有演员编号参见 [演員庫](https://javdb.com/actors)`,
+ 所有演员编号参见 [演員庫](https://javdb.com/actors)
+
+ 可用 addon_tags 参数添加额外的过滤 tag,可从网页 url 中获取,例如 \`/javdb/actors/R2Vg?addon_tags=212,18\` 可筛选 \`VR\` 和 \`中出\`。`,
};
async function handler(ctx) {
const id = ctx.req.param('id');
const filter = ctx.req.param('filter') ?? '';
+ const addonTags = ctx.req.query('addon_tags') ?? '';
- const currentUrl = `/actors/${id}${filter ? `?t=${filter}` : ''}`;
+ const finalTags = addonTags && filter ? `${filter},${addonTags}` : `${filter}${addonTags}`;
+ const currentUrl = `/actors/${id}${finalTags ? `?t=${finalTags}` : ''}`;
const filters = {
'': '',
|
31c0aa715eb10f21fd6cfa962c2a5a010978c61a
|
2023-09-08 19:53:06
|
niyoh
|
fix(route): fix A姐分享 (#13196)
| false
|
fix A姐分享 (#13196)
|
fix
|
diff --git a/lib/v2/abskoop/index.js b/lib/v2/abskoop/index.js
index 8353bc1721c733..a6385aec1714a7 100644
--- a/lib/v2/abskoop/index.js
+++ b/lib/v2/abskoop/index.js
@@ -1,47 +1,37 @@
-const path = require('path');
const got = require('@/utils/got');
const cheerio = require('cheerio');
-const { art } = require('@/utils/render');
const { parseDate } = require('@/utils/parse-date');
module.exports = async (ctx) => {
const response = await got({
method: 'get',
- url: 'https://www.abskoop.com/page/1/',
+ url: 'https://www.ahhhhfs.com/wp-json/wp/v2/posts',
+ searchParams: {
+ per_page: ctx.query.limit ? parseInt(ctx.query.limit) : 10,
+ _embed: '',
+ },
});
-
- const $list = cheerio.load(response.data);
- const list = $list('.rizhuti_v2-widget-lastpost .scroll article')
- .map(function () {
- const link = $list(this).find('.entry-wrapper .entry-header a');
- return {
- title: link.attr('title'),
- link: link.attr('href'),
- };
- })
- .get();
+ const list = response.data.map((item) => ({
+ title: item.title.rendered,
+ link: item.link,
+ pubDate: parseDate(item.date_gmt),
+ updated: parseDate(item.modified_gmt),
+ author: item._embedded.author[0].name,
+ category: [...new Set(item._embedded['wp:term'].flatMap((i) => i.map((j) => j.name)))],
+ }));
const items = await Promise.all(
- list.reverse().map((item) =>
+ list.map((item) =>
ctx.cache.tryGet(item.link, async () => {
const detailResponse = await got({ method: 'get', url: item.link });
const $detail = cheerio.load(detailResponse.data);
- $detail('article .entry-content').find('#related_posts').remove();
- $detail('article .entry-content').find('#jp-relatedposts').remove();
- $detail('article .entry-content').find('.post-note').remove();
- $detail('article .entry-content').find('.entry-tags').remove();
- $detail('article .entry-content').find('.entry-share').remove();
- $detail('article .entry-content a').each(function () {
- if ($detail(this).find('img').length > 0) {
- $detail(this).replaceWith(`<img src=${$detail(this).attr('href')}>`);
- }
- });
- const desc = [];
- $detail('article .entry-content > *').each(function () {
- desc.push($detail(this).html());
+ $detail('article.post-content').find('.lwptoc').remove();
+ $detail('article.post-content').find('#related_posts').remove();
+ $detail('article.post-content').find('.entry-copyright').remove();
+ $detail('article.post-content img').each(function () {
+ $detail(this).replaceWith(`<img src=https:${$detail(this).attr('src')}>`);
});
- item.description = art(path.join(__dirname, 'templates/description.art'), { desc });
- item.pubDate = parseDate($detail('meta[property="article:published_time"]').attr('content'));
+ item.description = $detail('article.post-content').html();
return item;
})
)
@@ -49,7 +39,7 @@ module.exports = async (ctx) => {
ctx.state.data = {
title: 'ahhhhfs-A姐分享',
- link: 'https://www.abskoop.com',
+ link: 'https://www.ahhhhfs.com',
description:
'A姐分享,分享各种网络云盘资源、BT种子、高清电影电视剧和羊毛福利,收集各种有趣实用的软件和APP的下载、安装、使用方法,发现一些稀奇古怪的的网站,折腾一些有趣实用的教程,关注谷歌苹果等互联网最新的资讯动态,探索新领域,发现新美好,分享小快乐。',
item: items,
diff --git a/lib/v2/abskoop/nsfw.js b/lib/v2/abskoop/nsfw.js
index fa59f818652801..100695a0f9b6ca 100644
--- a/lib/v2/abskoop/nsfw.js
+++ b/lib/v2/abskoop/nsfw.js
@@ -1,52 +1,31 @@
-const path = require('path');
const got = require('@/utils/got');
-const cheerio = require('cheerio');
-const { art } = require('@/utils/render');
const { parseDate } = require('@/utils/parse-date');
module.exports = async (ctx) => {
const response = await got({
method: 'get',
- url: 'https://nsfw.ahhhhfs.com/articles-archive/',
+ url: 'https://nsfw.abskoop.com/wp-json/wp/v2/posts',
+ searchParams: {
+ per_page: ctx.query.limit ? parseInt(ctx.query.limit) : 10,
+ _embed: '',
+ },
});
- const $list = cheerio.load(response.data);
- const list = $list('article li')
- .slice(0, 20)
- .map(function () {
- return {
- link: $list(this).find('a').attr('href'),
- };
- })
- .get();
-
- const items = await Promise.all(
- list.map((item) =>
- ctx.cache.tryGet(item.link, async () => {
- const detailResponse = await got({ method: 'get', url: item.link });
- const $detail = cheerio.load(detailResponse.data);
- $detail('article .entry-content a').each(function () {
- if ($detail(this).find('img').length > 0) {
- $detail(this).replaceWith(`<img src=${$detail(this).attr('href')}>`);
- }
- });
- const desc = [];
- $detail('article .entry-content > p').each(function () {
- desc.push($detail(this).html());
- });
- item.title = $detail('article h1.entry-title').text();
- item.description = art(path.join(__dirname, 'templates/description.art'), { desc });
- item.pubDate = parseDate($detail('meta[property="article:published_time"]').attr('content'));
- return item;
- })
- )
- );
+ const list = response.data.map((item) => ({
+ title: item.title.rendered,
+ description: item.content.rendered,
+ link: item.link,
+ pubDate: parseDate(item.date_gmt),
+ updated: parseDate(item.modified_gmt),
+ author: item._embedded.author[0].name,
+ category: [...new Set(item._embedded['wp:term'].flatMap((i) => i.map((j) => j.name)))],
+ }));
ctx.state.data = {
title: 'ahhhhfs-A姐分享NSFW',
- link: 'https://nsfw.ahhhhfs.com',
+ link: 'https://nsfw.ahhhhfs.com/articles-archive',
description:
'A姐分享NSFW,分享各种网络云盘资源、BT种子、磁力链接、高清电影电视剧和羊毛福利,收集各种有趣实用的软件和APP的下载、安装、使用方法,发现一些稀奇古怪的的网站,折腾一些有趣实用的教程,关注谷歌苹果等互联网最新的资讯动态,探索新领域,发现新美好,分享小快乐。',
- item: items,
+ item: list,
};
};
diff --git a/lib/v2/abskoop/radar.js b/lib/v2/abskoop/radar.js
index 8cd53cd15b1afc..60544a7a3761f6 100644
--- a/lib/v2/abskoop/radar.js
+++ b/lib/v2/abskoop/radar.js
@@ -1,11 +1,22 @@
module.exports = {
'abskoop.com': {
+ _name: 'A姐分享',
+ nsfw: [
+ {
+ title: 'NSFW 存档列表',
+ docs: 'https://docs.rsshub.app/routes/multimedia#a-jie-fen-xiang',
+ source: ['/articles-archive', '/'],
+ target: '/abskoop',
+ },
+ ],
+ },
+ 'ahhhhfs.com': {
_name: 'A姐分享',
'.': [
{
title: '存档列表',
- docs: 'https://docs.rsshub.app/routes/multimedia#abskoop',
- source: ['/archives'],
+ docs: 'https://docs.rsshub.app/routes/multimedia#a-jie-fen-xiang',
+ source: ['/'],
target: '/abskoop',
},
],
diff --git a/lib/v2/abskoop/templates/description.art b/lib/v2/abskoop/templates/description.art
deleted file mode 100644
index 4594e979931118..00000000000000
--- a/lib/v2/abskoop/templates/description.art
+++ /dev/null
@@ -1,3 +0,0 @@
-{{each desc}}
-<p>{{@ $value}}</p>
-{{/each}}
diff --git a/website/docs/routes/multimedia.md b/website/docs/routes/multimedia.md
index cbe58390c5cdde..e66f0660012056 100644
--- a/website/docs/routes/multimedia.md
+++ b/website/docs/routes/multimedia.md
@@ -275,7 +275,9 @@ When `uncensored_makersr` as **Uncensored** is chosen as **Category**, the avail
## A 姐分享 {#a-jie-fen-xiang}
-<Route author="zhenhappy" example="/abskoop/nsfw" path="/abskoop/:type?" paramsDesc={['为空, 订阅主站点, `nsfw`订阅nsfw子站点']}>
+### 存档列表 {#a-jie-fen-xiang-cun-dang-lie-biao}
+
+<Route author="zhenhappy" example="/abskoop/nsfw" path="/abskoop/:type?" paramsDesc={['为空, 订阅主站点, `nsfw`订阅nsfw子站点']} radar="1"/>
## AV01(av01.tv) {#av01%EF%BC%88av01.tv%EF%BC%89}
@@ -981,7 +983,7 @@ See [Directory](https://www.javlibrary.com/en/star_list.php) to view all stars.
### 影视分类 {#mp4ba-ying-shi-fen-lei}
-<Route author="SettingDust wolfyu1991" example="/mp4ba/6" path="/mp4ba/:param" paramsDesc={['类型']} supportBT="1"/>
+<Route author="SettingDust wolfyu1991" example="/mp4ba/6" path="/mp4ba/:param" paramsDesc={['类型']} supportBT="1">
**类型参考这里**
|
db967716a5d42ded244026dde33f66185c817b4c
|
2024-12-16 18:37:43
|
dependabot[bot]
|
chore(deps): bump @scalar/hono-api-reference from 0.5.163 to 0.5.164 (#17906)
| false
|
bump @scalar/hono-api-reference from 0.5.163 to 0.5.164 (#17906)
|
chore
|
diff --git a/package.json b/package.json
index 95207be5aef9b9..701fe3ce2c809d 100644
--- a/package.json
+++ b/package.json
@@ -64,7 +64,7 @@
"@opentelemetry/semantic-conventions": "1.28.0",
"@postlight/parser": "2.2.3",
"@rss3/sdk": "0.0.23",
- "@scalar/hono-api-reference": "0.5.163",
+ "@scalar/hono-api-reference": "0.5.164",
"@sentry/node": "7.119.1",
"@tonyrl/rand-user-agent": "2.0.81",
"aes-js": "3.1.2",
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 0f9f56facc3cd9..f1a75a535ad0de 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -58,8 +58,8 @@ importers:
specifier: 0.0.23
version: 0.0.23
'@scalar/hono-api-reference':
- specifier: 0.5.163
- version: 0.5.163([email protected])
+ specifier: 0.5.164
+ version: 0.5.164([email protected])
'@sentry/node':
specifier: 7.119.1
version: 7.119.1
@@ -1779,8 +1779,8 @@ packages:
'@rss3/[email protected]':
resolution: {integrity: sha512-1cF1AqLU0k6dMwqQ5Fch3rOAbh4UXJ4UZLtOwzp/RWyGoCvu3lUOUIdJF41omunuH/JJSP2z6rJTPj4S6a60eg==}
- '@scalar/[email protected]':
- resolution: {integrity: sha512-kIZRMSIBT1Ac0PjWLuoIERZYTk0ZTp+B/zfK13lOjTQ8cgPnau34hsAT8Bydr9hOWENbmEPOumMBFJ1F81+PKw==}
+ '@scalar/[email protected]':
+ resolution: {integrity: sha512-6m8IscA2+5nqnN8sR5Iib2lboXIawJrScZ0cwVUvQ/uUCrFCyuZGRWXpecuCxelXifDlQxfi0iCfmxgvTiswNg==}
engines: {node: '>=18'}
peerDependencies:
hono: ^4.0.0
@@ -1789,8 +1789,8 @@ packages:
resolution: {integrity: sha512-6geH9ehvQ/sG/xUyy3e0lyOw3BaY5s6nn22wHjEJhcobdmWyFER0O6m7AU0ZN4QTjle/gYvFJOjj552l/rsNSw==}
engines: {node: '>=18'}
- '@scalar/[email protected]':
- resolution: {integrity: sha512-dOvQig4hyeVw1kXIo9MQAnM9tUt9vCOZs3zOe6oSqOUG8xY7+WXioirlRCsc+wcQegMbuNYOlNBXCDugOP1YJA==}
+ '@scalar/[email protected]':
+ resolution: {integrity: sha512-ahMb4WYFx9OP32r7j8KhyMzg5zU78gnKxhDNapuC8WMzlSyyOsX5LQLx8sUQJfw3ZvUHp+F2zv5GJSHD+hdIiA==}
engines: {node: '>=18'}
'@sec-ant/[email protected]':
@@ -7118,14 +7118,14 @@ snapshots:
'@rss3/api-core': 0.0.23
'@rss3/api-utils': 0.0.23
- '@scalar/[email protected]([email protected])':
+ '@scalar/[email protected]([email protected])':
dependencies:
- '@scalar/types': 0.0.23
+ '@scalar/types': 0.0.24
hono: 4.6.14
'@scalar/[email protected]': {}
- '@scalar/[email protected]':
+ '@scalar/[email protected]':
dependencies:
'@scalar/openapi-types': 0.1.5
'@unhead/schema': 1.11.11
|
d6c106ea7cf37a35015780ac31cf4568c041f9d2
|
2024-10-29 22:10:42
|
Jacky_Chen
|
feat(route/dedao): add new dedao route (#17252)
| false
|
add new dedao route (#17252)
|
feat
|
diff --git a/lib/routes/dedao/articles.ts b/lib/routes/dedao/articles.ts
new file mode 100644
index 00000000000000..58e4a9b0f92575
--- /dev/null
+++ b/lib/routes/dedao/articles.ts
@@ -0,0 +1,149 @@
+import { Route } from '@/types';
+import cache from '@/utils/cache';
+import got from '@/utils/got';
+import { load } from 'cheerio';
+
+export const route: Route = {
+ path: '/articles/:id?',
+ categories: ['new-media'],
+ example: '/articles/9', // 示例路径更新
+ parameters: { id: '文章类型 ID,8 为得到头条,9 为得到精选,默认为 8' },
+ features: {
+ requireConfig: false,
+ requirePuppeteer: false,
+ antiCrawler: false,
+ supportBT: false,
+ supportPodcast: false,
+ supportScihub: false,
+ },
+ radar: [
+ {
+ source: ['igetget.com'],
+ target: '/articles/:id',
+ },
+ ],
+ name: '得到文章',
+ maintainers: ['Jacky-Chen-Pro'],
+ handler,
+ url: 'www.igetget.com',
+};
+
+function handleParagraph(data) {
+ let html = '<p>';
+ if (data.contents && Array.isArray(data.contents)) {
+ html += data.contents.map((data) => extractArticleContent(data)).join('');
+ }
+ html += '</p>';
+ return html;
+}
+
+function handleText(data) {
+ let content = data.text?.content || '';
+ if (data.text?.bold || data.text?.highlight) {
+ content = `<strong>${content}</strong>`;
+ }
+ return content;
+}
+
+function handleImage(data) {
+ return data.image?.src ? `<img src="${data.image.src}" alt="${data.image.alt || ''}" />` : '';
+}
+
+function handleHr() {
+ return '<hr />';
+}
+
+function extractArticleContent(data) {
+ if (!data || typeof data !== 'object') {
+ return '';
+ }
+
+ switch (data.type) {
+ case 'paragraph':
+ return handleParagraph(data);
+ case 'text':
+ return handleText(data);
+ case 'image':
+ return handleImage(data);
+ case 'hr':
+ return handleHr();
+ default:
+ return '';
+ }
+}
+
+async function handler(ctx) {
+ const { id = '8' } = ctx.req.param();
+ const rootUrl = 'https://www.igetget.com';
+ const headers = {
+ Accept: 'application/json, text/plain, */*',
+ 'Content-Type': 'application/json;charset=UTF-8',
+ Referer: `https://m.igetget.com/share/course/free/detail?id=nb9L2q1e3OxKBPNsdoJrgN8P0Rwo6B`,
+ Origin: 'https://m.igetget.com',
+ };
+ const max_id = 0;
+
+ const response = await got.post('https://m.igetget.com/share/api/course/free/pageTurning', {
+ json: {
+ chapter_id: 0,
+ count: 5,
+ max_id,
+ max_order_num: 0,
+ pid: Number(id),
+ ptype: 24,
+ reverse: true,
+ since_id: 0,
+ since_order_num: 0,
+ },
+ headers,
+ });
+
+ const data = JSON.parse(response.body);
+ if (!data || !data.article_list) {
+ throw new Error('文章列表不存在或为空');
+ }
+
+ const articles = data.article_list;
+
+ const items = await Promise.all(
+ articles.map((article) => {
+ const postUrl = `https://m.igetget.com/share/course/article/article_id/${article.id}`;
+ const postTitle = article.title;
+ const postTime = new Date(article.publish_time * 1000).toUTCString();
+
+ return cache.tryGet(postUrl, async () => {
+ const detailResponse = await got.get(postUrl, { headers });
+ const $ = load(detailResponse.body);
+
+ const scriptTag = $('script')
+ .filter((_, el) => $(el).text()?.includes('window.__INITIAL_STATE__'))
+ .text();
+
+ if (scriptTag) {
+ const jsonStr = scriptTag.match(/window\.__INITIAL_STATE__\s*=\s*(\{.*\});/)?.[1];
+ if (jsonStr) {
+ const articleData = JSON.parse(jsonStr);
+
+ const description = JSON.parse(articleData.articleContent.content)
+ .map((data) => extractArticleContent(data))
+ .join('');
+
+ return {
+ title: postTitle,
+ link: postUrl,
+ description,
+ pubDate: postTime,
+ };
+ }
+ }
+ return null;
+ });
+ })
+ );
+
+ return {
+ title: `得到文章 - ${id === '8' ? '头条' : '精选'}`,
+ link: rootUrl,
+ item: items.filter(Boolean),
+ };
+}
|
02501d50bcc1e0d9d565692a7e4ac7dd2906013e
|
2024-11-21 14:29:20
|
dependabot[bot]
|
chore(deps): bump tldts from 6.1.61 to 6.1.62 (#17659)
| false
|
bump tldts from 6.1.61 to 6.1.62 (#17659)
|
chore
|
diff --git a/package.json b/package.json
index 6387320104838a..8757fd314ad9e4 100644
--- a/package.json
+++ b/package.json
@@ -124,7 +124,7 @@
"telegram": "2.26.8",
"tiny-async-pool": "2.1.0",
"title": "4.0.0",
- "tldts": "6.1.61",
+ "tldts": "6.1.62",
"tosource": "2.0.0-alpha.3",
"tough-cookie": "5.0.0",
"tsx": "4.19.2",
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index a3bc7e24f494a4..723ca1f34185cd 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -234,8 +234,8 @@ importers:
specifier: 4.0.0
version: 4.0.0
tldts:
- specifier: 6.1.61
- version: 6.1.61
+ specifier: 6.1.62
+ version: 6.1.62
tosource:
specifier: 2.0.0-alpha.3
version: 2.0.0-alpha.3
@@ -5302,11 +5302,11 @@ packages:
resolution: {integrity: sha512-tcwMRIioTcF/FcxLev8MJWxCp+GUALRhFEqbDoZrnowmKSGqPrl5pqS+Sut2m8BgJ6S4FExCSSpGffZ0Tks6Aw==}
hasBin: true
- [email protected]:
- resolution: {integrity: sha512-In7VffkDWUPgwa+c9picLUxvb0RltVwTkSgMNFgvlGSWveCzGBemBqTsgJCL4EDFWZ6WH0fKTsot6yNhzy3ZzQ==}
+ [email protected]:
+ resolution: {integrity: sha512-ohONqbfobpuaylhqFbtCzc0dFFeNz85FVKSesgT8DS9OV3a25Yj730pTj7/dDtCqmgoCgEj6gDiU9XxgHKQlBw==}
- [email protected]:
- resolution: {integrity: sha512-rv8LUyez4Ygkopqn+M6OLItAOT9FF3REpPQDkdMx5ix8w4qkuE7Vo2o/vw1nxKQYmJDV8JpAMJQr1b+lTKf0FA==}
+ [email protected]:
+ resolution: {integrity: sha512-TF+wo3MgTLbf37keEwQD0IxvOZO8UZxnpPJDg5iFGAASGxYzbX/Q0y944ATEjrfxG/pF1TWRHCPbFp49Mz1Y1w==}
hasBin: true
[email protected]:
@@ -11276,11 +11276,11 @@ snapshots:
[email protected]: {}
- [email protected]: {}
+ [email protected]: {}
- [email protected]:
+ [email protected]:
dependencies:
- tldts-core: 6.1.61
+ tldts-core: 6.1.62
[email protected]:
dependencies:
@@ -11316,7 +11316,7 @@ snapshots:
[email protected]:
dependencies:
- tldts: 6.1.61
+ tldts: 6.1.62
[email protected]: {}
|
b6ab23d4716d8972fbd7ffb95ae0f464a4a13ac3
|
2019-09-10 14:01:02
|
DIYgod
|
docs: set sidebarDepth to 1
| false
|
set sidebarDepth to 1
|
docs
|
diff --git a/docs/.vuepress/config.js b/docs/.vuepress/config.js
index bfc321acf16560..6f8cc415edae70 100644
--- a/docs/.vuepress/config.js
+++ b/docs/.vuepress/config.js
@@ -82,7 +82,7 @@ module.exports = {
{
title: '路由',
collapsable: false,
- sidebarDepth: 3,
+ sidebarDepth: 1,
children: [
'social-media',
'new-media',
@@ -143,7 +143,7 @@ module.exports = {
{
title: 'Routes',
collapsable: false,
- sidebarDepth: 3,
+ sidebarDepth: 1,
children: [
'social-media',
'new-media',
diff --git a/docs/.vuepress/styles/index.styl b/docs/.vuepress/styles/index.styl
index e0df7deab04282..a041013ca289b2 100644
--- a/docs/.vuepress/styles/index.styl
+++ b/docs/.vuepress/styles/index.styl
@@ -35,6 +35,6 @@ a {
border: 1px solid #F5712C;
}
-.routes .sidebar-group-items > li > .sidebar-sub-headers > .sidebar-sub-header > a {
+h3 {
color: $accentColor;
}
|
b98ea3ed1a8d92986dbaf9144ec29e1dd4735186
|
2024-07-16 17:23:47
|
dependabot[bot]
|
chore(deps-dev): bump @typescript-eslint/parser from 7.16.0 to 7.16.1 (#16179)
| false
|
bump @typescript-eslint/parser from 7.16.0 to 7.16.1 (#16179)
|
chore
|
diff --git a/package.json b/package.json
index 9352fa963ad9dc..aa5ab171b8d973 100644
--- a/package.json
+++ b/package.json
@@ -164,7 +164,7 @@
"@types/tough-cookie": "4.0.5",
"@types/uuid": "10.0.0",
"@typescript-eslint/eslint-plugin": "7.16.0",
- "@typescript-eslint/parser": "7.16.0",
+ "@typescript-eslint/parser": "7.16.1",
"@vercel/nft": "0.27.3",
"@vitest/coverage-v8": "2.0.2",
"eslint": "9.7.0",
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 6639ca2c948636..1d76e6c958236f 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -344,10 +344,10 @@ importers:
version: 10.0.0
'@typescript-eslint/eslint-plugin':
specifier: 7.16.0
- version: 7.16.0(@typescript-eslint/[email protected]([email protected])([email protected]))([email protected])([email protected])
+ version: 7.16.0(@typescript-eslint/[email protected]([email protected])([email protected]))([email protected])([email protected])
'@typescript-eslint/parser':
- specifier: 7.16.0
- version: 7.16.0([email protected])([email protected])
+ specifier: 7.16.1
+ version: 7.16.1([email protected])([email protected])
'@vercel/nft':
specifier: 0.27.3
version: 0.27.3
@@ -416,7 +416,7 @@ importers:
version: 11.0.5
vite-tsconfig-paths:
specifier: 4.3.2
- version: 4.3.2([email protected])([email protected](@types/[email protected]))
+ version: 4.3.2([email protected])([email protected](@types/[email protected]))
vitest:
specifier: 2.0.2
version: 2.0.2(@types/[email protected])([email protected]([email protected])([email protected]))
@@ -457,8 +457,8 @@ packages:
resolution: {integrity: sha512-5e3FI4Q3M3Pbr21+5xJwCv6ZT6KmGkI0vw3Tozy5ODAQFTIWe37iT8Cr7Ice2Ntb+M3iSKCEWMB1MBgKrW3whg==}
engines: {node: '>=6.9.0'}
- '@babel/[email protected]':
- resolution: {integrity: sha512-G8v3jRg+z8IwY1jHFxvCNhOPYPterE4XljNgdGTYfSTtzzwjIswIzIaSPSLs3R7yFuqnqNeay5rjICfqVr+/6A==}
+ '@babel/[email protected]':
+ resolution: {integrity: sha512-o9HBZL1G2129luEUlG1hB4N/nlYNWHnpwlND9eOMclRqqu1YDy2sSYVCFUZwl8I1Gxh+QSRrP2vD7EpUmFVXxg==}
engines: {node: '>=6.9.0'}
'@babel/[email protected]':
@@ -2172,8 +2172,8 @@ packages:
typescript:
optional: true
- '@typescript-eslint/[email protected]':
- resolution: {integrity: sha512-ar9E+k7CU8rWi2e5ErzQiC93KKEFAXA2Kky0scAlPcxYblLt8+XZuHUZwlyfXILyQa95P6lQg+eZgh/dDs3+Vw==}
+ '@typescript-eslint/[email protected]':
+ resolution: {integrity: sha512-u+1Qx86jfGQ5i4JjK33/FnawZRpsLxRnKzGE6EABZ40KxVT/vWsiZFEBBHjFOljmmV3MBYOHEKi0Jm9hbAOClA==}
engines: {node: ^18.18.0 || >=20.0.0}
peerDependencies:
eslint: ^8.56.0
@@ -6846,8 +6846,8 @@ packages:
[email protected]:
resolution: {integrity: sha512-jRDZ1IMLttGj41KcZvlrYAaI3CfqpLpfpf+Mfig13viT6NKvRzWZ+lXz0Y5D60w6uJIBAOGq9mSHf0gktF0duw==}
- [email protected]:
- resolution: {integrity: sha512-1bYqc7pt6NIADBJ98UiG0Bn/CHIVOoZ/IyEkqIruLg0mE1BKzkOXY2D6CSqQIcKqgadppE5lrxgWXJmXd7zZJw==}
+ [email protected]:
+ resolution: {integrity: sha512-zND7NlS8rJYb/sPqkb13ZvbbUoExdbi4w3SfRrMq6R3FvnLQmmfpajJNITuuYm6AZ5uao9vy4BAos3EXBPf2rg==}
[email protected]:
resolution: {integrity: sha512-w4vkSz1Wo+NIQg8pjlEn0jQbcM/0D+xVaYjhw3cvarTanLLBh54oNiRbsT8PNK5GfuST0IlVXjsNRoNlqvY/fw==}
@@ -6862,8 +6862,8 @@ packages:
vite:
optional: true
- [email protected]:
- resolution: {integrity: sha512-NPQdeCU0Dv2z5fu+ULotpuq5yfCS1BzKUIPhNbP3YBfAMGJXbt2nS+sbTFu+qchaqWTD+H3JK++nRwr6XIcp6A==}
+ [email protected]:
+ resolution: {integrity: sha512-Cw+7zL3ZG9/NZBB8C+8QbQZmR54GwqIz+WMI4b3JgdYJvX+ny9AjJXqkGQlDXSXRP9rP0B4tbciRMOVEKulVOA==}
engines: {node: ^18.0.0 || >=20.0.0}
hasBin: true
peerDependencies:
@@ -7193,7 +7193,7 @@ snapshots:
dependencies:
'@ampproject/remapping': 2.3.0
'@babel/code-frame': 7.24.7
- '@babel/generator': 7.24.9
+ '@babel/generator': 7.24.10
'@babel/helper-compilation-targets': 7.24.8
'@babel/helper-module-transforms': 7.24.9(@babel/[email protected])
'@babel/helpers': 7.24.8
@@ -7209,7 +7209,7 @@ snapshots:
transitivePeerDependencies:
- supports-color
- '@babel/[email protected]':
+ '@babel/[email protected]':
dependencies:
'@babel/types': 7.24.9
'@jridgewell/gen-mapping': 0.3.5
@@ -7995,7 +7995,7 @@ snapshots:
'@babel/[email protected]':
dependencies:
'@babel/code-frame': 7.24.7
- '@babel/generator': 7.24.9
+ '@babel/generator': 7.24.10
'@babel/helper-environment-visitor': 7.24.7
'@babel/helper-function-name': 7.24.7
'@babel/helper-hoist-variables': 7.24.7
@@ -9404,10 +9404,10 @@ snapshots:
'@types/node': 20.14.10
optional: true
- '@typescript-eslint/[email protected](@typescript-eslint/[email protected]([email protected])([email protected]))([email protected])([email protected])':
+ '@typescript-eslint/[email protected](@typescript-eslint/[email protected]([email protected])([email protected]))([email protected])([email protected])':
dependencies:
'@eslint-community/regexpp': 4.11.0
- '@typescript-eslint/parser': 7.16.0([email protected])([email protected])
+ '@typescript-eslint/parser': 7.16.1([email protected])([email protected])
'@typescript-eslint/scope-manager': 7.16.0
'@typescript-eslint/type-utils': 7.16.0([email protected])([email protected])
'@typescript-eslint/utils': 7.16.0([email protected])([email protected])
@@ -9422,12 +9422,12 @@ snapshots:
transitivePeerDependencies:
- supports-color
- '@typescript-eslint/[email protected]([email protected])([email protected])':
+ '@typescript-eslint/[email protected]([email protected])([email protected])':
dependencies:
- '@typescript-eslint/scope-manager': 7.16.0
- '@typescript-eslint/types': 7.16.0
- '@typescript-eslint/typescript-estree': 7.16.0([email protected])
- '@typescript-eslint/visitor-keys': 7.16.0
+ '@typescript-eslint/scope-manager': 7.16.1
+ '@typescript-eslint/types': 7.16.1
+ '@typescript-eslint/typescript-estree': 7.16.1([email protected])
+ '@typescript-eslint/visitor-keys': 7.16.1
debug: 4.3.5
eslint: 9.7.0
optionalDependencies:
@@ -11662,7 +11662,7 @@ snapshots:
devlop: 1.1.0
hast-util-from-parse5: 8.0.1
parse5: 7.1.2
- vfile: 6.0.1
+ vfile: 6.0.2
vfile-message: 4.0.2
[email protected]:
@@ -11672,7 +11672,7 @@ snapshots:
devlop: 1.1.0
hastscript: 8.0.0
property-information: 6.5.0
- vfile: 6.0.1
+ vfile: 6.0.2
vfile-location: 5.0.3
web-namespaces: 2.0.1
@@ -11712,7 +11712,7 @@ snapshots:
parse5: 7.1.2
unist-util-position: 5.0.0
unist-util-visit: 5.0.0
- vfile: 6.0.1
+ vfile: 6.0.2
web-namespaces: 2.0.1
zwitch: 2.0.4
@@ -12672,7 +12672,7 @@ snapshots:
trim-lines: 3.0.1
unist-util-position: 5.0.0
unist-util-visit: 5.0.0
- vfile: 6.0.1
+ vfile: 6.0.2
[email protected]:
dependencies:
@@ -13815,7 +13815,7 @@ snapshots:
dependencies:
'@types/hast': 3.0.4
hast-util-raw: 9.0.4
- vfile: 6.0.1
+ vfile: 6.0.2
[email protected]:
dependencies:
@@ -13856,7 +13856,7 @@ snapshots:
'@types/mdast': 4.0.4
mdast-util-to-hast: 13.2.0
unified: 11.0.5
- vfile: 6.0.1
+ vfile: 6.0.2
[email protected]:
dependencies:
@@ -14722,7 +14722,7 @@ snapshots:
extend: 3.0.2
is-plain-obj: 4.1.0
trough: 2.2.0
- vfile: 6.0.1
+ vfile: 6.0.2
[email protected]:
dependencies:
@@ -14834,14 +14834,14 @@ snapshots:
[email protected]:
dependencies:
'@types/unist': 3.0.2
- vfile: 6.0.1
+ vfile: 6.0.2
[email protected]:
dependencies:
'@types/unist': 3.0.2
unist-util-stringify-position: 4.0.0
- [email protected]:
+ [email protected]:
dependencies:
'@types/unist': 3.0.2
unist-util-stringify-position: 4.0.0
@@ -14853,7 +14853,7 @@ snapshots:
debug: 4.3.5
pathe: 1.1.2
tinyrainbow: 1.2.0
- vite: 5.3.3(@types/[email protected])
+ vite: 5.3.4(@types/[email protected])
transitivePeerDependencies:
- '@types/node'
- less
@@ -14864,18 +14864,18 @@ snapshots:
- supports-color
- terser
- [email protected]([email protected])([email protected](@types/[email protected])):
+ [email protected]([email protected])([email protected](@types/[email protected])):
dependencies:
debug: 4.3.5
globrex: 0.1.2
tsconfck: 3.1.1([email protected])
optionalDependencies:
- vite: 5.3.3(@types/[email protected])
+ vite: 5.3.4(@types/[email protected])
transitivePeerDependencies:
- supports-color
- typescript
- [email protected](@types/[email protected]):
+ [email protected](@types/[email protected]):
dependencies:
esbuild: 0.21.5
postcss: 8.4.39
@@ -14902,7 +14902,7 @@ snapshots:
tinybench: 2.8.0
tinypool: 1.0.0
tinyrainbow: 1.2.0
- vite: 5.3.3(@types/[email protected])
+ vite: 5.3.4(@types/[email protected])
vite-node: 2.0.2(@types/[email protected])
why-is-node-running: 2.3.0
optionalDependencies:
|
c06353f5805c59a5418695118a45fde64ee96ec0
|
2023-12-03 21:24:49
|
Tony
|
fix(route): fix twitter error condition (#13943)
| false
|
fix twitter error condition (#13943)
|
fix
|
diff --git a/lib/config.js b/lib/config.js
index ca99d6f6124a0a..b234865fdd45a5 100644
--- a/lib/config.js
+++ b/lib/config.js
@@ -292,8 +292,8 @@ const calculateValue = () => {
cookie: envs.TOPHUB_COOKIE,
},
twitter: {
- oauthTokens: envs.TWITTER_OAUTH_TOKEN && envs.TWITTER_OAUTH_TOKEN.split(','),
- oauthTokenSecrets: envs.TWITTER_OAUTH_TOKEN_SECRET && envs.TWITTER_OAUTH_TOKEN_SECRET.split(','),
+ oauthTokens: envs.TWITTER_OAUTH_TOKEN?.split(','),
+ oauthTokenSecrets: envs.TWITTER_OAUTH_TOKEN_SECRET?.split(','),
},
weibo: {
app_key: envs.WEIBO_APP_KEY,
diff --git a/lib/v2/twitter/web-api/twitter-api.js b/lib/v2/twitter/web-api/twitter-api.js
index e86396b67a904e..9d7e75fd157bc7 100644
--- a/lib/v2/twitter/web-api/twitter-api.js
+++ b/lib/v2/twitter/web-api/twitter-api.js
@@ -9,7 +9,7 @@ const queryString = require('query-string');
let tokenIndex = 0;
const twitterGot = async (url, params) => {
- if (!config.twitter.oauthTokens.length || !config.twitter.oauthTokenSecrets.length || config.twitter.oauthTokens.length !== config.twitter.oauthTokenSecrets.length) {
+ if (!config.twitter.oauthTokens?.length || !config.twitter.oauthTokenSecrets?.length || config.twitter.oauthTokens.length !== config.twitter.oauthTokenSecrets.length) {
throw Error('Invalid twitter oauth tokens');
}
|
57a8d6e3b88d620b8a8093ef4eb43f010f8239d2
|
2025-01-30 13:41:20
|
dependabot[bot]
|
chore(deps-dev): bump @stylistic/eslint-plugin from 3.0.0 to 3.0.1 (#18245)
| false
|
bump @stylistic/eslint-plugin from 3.0.0 to 3.0.1 (#18245)
|
chore
|
diff --git a/package.json b/package.json
index fdf99d856b5df8..be2f997b3e8bef 100644
--- a/package.json
+++ b/package.json
@@ -144,7 +144,7 @@
"@eslint/eslintrc": "3.2.0",
"@eslint/js": "9.19.0",
"@microsoft/eslint-formatter-sarif": "3.1.0",
- "@stylistic/eslint-plugin": "3.0.0",
+ "@stylistic/eslint-plugin": "3.0.1",
"@types/aes-js": "3.1.4",
"@types/babel__preset-env": "7.10.0",
"@types/crypto-js": "4.2.2",
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 7ad1977153a9c7..fdca6fd43680ab 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -293,8 +293,8 @@ importers:
specifier: 3.1.0
version: 3.1.0
'@stylistic/eslint-plugin':
- specifier: 3.0.0
- version: 3.0.0([email protected])([email protected])
+ specifier: 3.0.1
+ version: 3.0.1([email protected])([email protected])
'@types/aes-js':
specifier: 3.1.4
version: 3.1.4
@@ -1895,8 +1895,8 @@ packages:
resolution: {integrity: sha512-QWLl2P+rsCJeofkDNIT3WFmb6NrRud1SUYW8dIhXK/46XFV8Q/g7Bsvib0Askb0reRLe+WYPeeE+l5cH7SlkuQ==}
engines: {node: '>=18'}
- '@stylistic/[email protected]':
- resolution: {integrity: sha512-9GJI6iBtGjOqSsyCKUvE6Vn7qDT52hbQaoq/SwxH6A1bciymZfvBfHIIrD3E7Koi2sjzOa/MNQ2XOguHtVJOyw==}
+ '@stylistic/[email protected]':
+ resolution: {integrity: sha512-rQ3tcT5N2cynofJfbjUsnL4seoewTaOVBLyUEwtNldo7iNMPo3h/GUQk+Cl3iHEWwRxjq2wuH6q0FufQrbVL1A==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
peerDependencies:
eslint: '>=8.40.0'
@@ -2074,10 +2074,6 @@ packages:
eslint: ^8.57.0 || ^9.0.0
typescript: '>=4.8.4 <5.8.0'
- '@typescript-eslint/[email protected]':
- resolution: {integrity: sha512-XsGWww0odcUT0gJoBZ1DeulY1+jkaHUciUq4jKNv4cpInbvvrtDoyBH9rE/n2V29wQJPk8iCH1wipra9BhmiMA==}
- engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
-
'@typescript-eslint/[email protected]':
resolution: {integrity: sha512-/lwVV0UYgkj7wPSw0o8URy6YI64QmcOdwHuGuxWIYznO6d45ER0wXUbksr9pYdViAofpUCNJx/tAzNukgvaaiQ==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
@@ -2089,35 +2085,16 @@ packages:
eslint: ^8.57.0 || ^9.0.0
typescript: '>=4.8.4 <5.8.0'
- '@typescript-eslint/[email protected]':
- resolution: {integrity: sha512-4cyFErJetFLckcThRUFdReWJjVsPCqyBlJTi6IDEpc1GWCIIZRFxVppjWLIMcQhNGhdWJJRYFHpHoDWvMlDzng==}
- engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
-
'@typescript-eslint/[email protected]':
resolution: {integrity: sha512-0S4M4baNzp612zwpD4YOieP3VowOARgK2EkN/GBn95hpyF8E2fbMT55sRHWBq+Huaqk3b3XK+rxxlM8sPgGM6A==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
- '@typescript-eslint/[email protected]':
- resolution: {integrity: sha512-v7SCIGmVsRK2Cy/LTLGN22uea6SaUIlpBcO/gnMGT/7zPtxp90bphcGf4fyrCQl3ZtiBKqVTG32hb668oIYy1g==}
- engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
- peerDependencies:
- typescript: '*'
- peerDependenciesMeta:
- typescript:
- optional: true
-
'@typescript-eslint/[email protected]':
resolution: {integrity: sha512-SJX99NAS2ugGOzpyhMza/tX+zDwjvwAtQFLsBo3GQxiGcvaKlqGBkmZ+Y1IdiSi9h4Q0Lr5ey+Cp9CGWNY/F/w==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
peerDependencies:
typescript: '>=4.8.4 <5.8.0'
- '@typescript-eslint/[email protected]':
- resolution: {integrity: sha512-A1EeYOND6Uv250nybnLZapeXpYMl8tkzYUxqmoKAWnI4sei3ihf2XdZVd+vVOmHGcp3t+P7yRrNsyyiXTvShFQ==}
- engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
- peerDependencies:
- eslint: ^8.57.0 || ^9.0.0
-
'@typescript-eslint/[email protected]':
resolution: {integrity: sha512-T8oc1MbF8L+Bk2msAvCUzjxVB2Z2f+vXYfcucE2wOmYs7ZUwco5Ep0fYZw8quNwOiw9K8GYVL+Kgc2pETNTLOg==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
@@ -2125,10 +2102,6 @@ packages:
eslint: ^8.57.0 || ^9.0.0
typescript: '>=4.8.4 <5.8.0'
- '@typescript-eslint/[email protected]':
- resolution: {integrity: sha512-7N/+lztJqH4Mrf0lb10R/CbI1EaAMMGyF5y0oJvFoAhafwgiRA7TXyd8TFn8FC8k5y2dTsYogg238qavRGNnlw==}
- engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
-
'@typescript-eslint/[email protected]':
resolution: {integrity: sha512-AWpYAXnUgvLNabGTy3uBylkgZoosva/miNd1I8Bz3SjotmQPbVqhO4Cczo8AsZ44XVErEBPr/CRSgaj8sG7g0w==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
@@ -5348,12 +5321,6 @@ packages:
[email protected]:
resolution: {integrity: sha512-tmMpK00BjZiUyVyvrBK7knerNgmgvcV/KLVyuma/SC+TQN167GrMRciANTz09+k3zW8L8t60jWO1GpfkZdjTaw==}
- [email protected]:
- resolution: {integrity: sha512-i3eMG77UTMD0hZhgRS562pv83RC6ukSAC2GMNWc+9dieh/+jDM5u5YG+NHX6VNDRHQcHwmsTHctP9LhbC3WxVw==}
- engines: {node: '>=16'}
- peerDependencies:
- typescript: '>=4.2.0'
-
[email protected]:
resolution: {integrity: sha512-xCt/TOAc+EOHS1XPnijD3/yzpH6qg2xppZO1YDqGoVsNXfQfzHpOdNuXwrwOU8u4ITXJyDCTyt8w5g1sZv9ynQ==}
engines: {node: '>=18.12'}
@@ -7383,9 +7350,9 @@ snapshots:
'@sindresorhus/[email protected]': {}
- '@stylistic/[email protected]([email protected])([email protected])':
+ '@stylistic/[email protected]([email protected])([email protected])':
dependencies:
- '@typescript-eslint/utils': 8.13.0([email protected])([email protected])
+ '@typescript-eslint/utils': 8.22.0([email protected])([email protected])
eslint: 9.19.0
eslint-visitor-keys: 4.2.0
espree: 10.3.0
@@ -7584,11 +7551,6 @@ snapshots:
transitivePeerDependencies:
- supports-color
- '@typescript-eslint/[email protected]':
- dependencies:
- '@typescript-eslint/types': 8.13.0
- '@typescript-eslint/visitor-keys': 8.13.0
-
'@typescript-eslint/[email protected]':
dependencies:
'@typescript-eslint/types': 8.22.0
@@ -7605,25 +7567,8 @@ snapshots:
transitivePeerDependencies:
- supports-color
- '@typescript-eslint/[email protected]': {}
-
'@typescript-eslint/[email protected]': {}
- '@typescript-eslint/[email protected]([email protected])':
- dependencies:
- '@typescript-eslint/types': 8.13.0
- '@typescript-eslint/visitor-keys': 8.13.0
- debug: 4.4.0
- fast-glob: 3.3.3
- is-glob: 4.0.3
- minimatch: 9.0.5
- semver: 7.6.3
- ts-api-utils: 1.4.3([email protected])
- optionalDependencies:
- typescript: 5.7.3
- transitivePeerDependencies:
- - supports-color
-
'@typescript-eslint/[email protected]([email protected])':
dependencies:
'@typescript-eslint/types': 8.22.0
@@ -7638,17 +7583,6 @@ snapshots:
transitivePeerDependencies:
- supports-color
- '@typescript-eslint/[email protected]([email protected])([email protected])':
- dependencies:
- '@eslint-community/eslint-utils': 4.4.1([email protected])
- '@typescript-eslint/scope-manager': 8.13.0
- '@typescript-eslint/types': 8.13.0
- '@typescript-eslint/typescript-estree': 8.13.0([email protected])
- eslint: 9.19.0
- transitivePeerDependencies:
- - supports-color
- - typescript
-
'@typescript-eslint/[email protected]([email protected])([email protected])':
dependencies:
'@eslint-community/eslint-utils': 4.4.1([email protected])
@@ -7660,11 +7594,6 @@ snapshots:
transitivePeerDependencies:
- supports-color
- '@typescript-eslint/[email protected]':
- dependencies:
- '@typescript-eslint/types': 8.13.0
- eslint-visitor-keys: 3.4.3
-
'@typescript-eslint/[email protected]':
dependencies:
'@typescript-eslint/types': 8.22.0
@@ -11294,10 +11223,6 @@ snapshots:
[email protected]: {}
- [email protected]([email protected]):
- dependencies:
- typescript: 5.7.3
-
[email protected]([email protected]):
dependencies:
typescript: 5.7.3
|
7b9c0f3ea1287a4e665385446ac8659368940e47
|
2022-04-15 19:51:17
|
TonyRL
|
chore(deps): bump async from 2.6.3 to 2.6.4
| false
|
bump async from 2.6.3 to 2.6.4
|
chore
|
diff --git a/yarn.lock b/yarn.lock
index 7b6ce5e58fe4aa..70eebb35207001 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -1577,9 +1577,9 @@
"@babel/types" "^7.0.0"
"@types/babel__traverse@*", "@types/babel__traverse@^7.0.4", "@types/babel__traverse@^7.0.6":
- version "7.14.2"
- resolved "https://registry.yarnpkg.com/@types/babel__traverse/-/babel__traverse-7.14.2.tgz#ffcd470bbb3f8bf30481678fb5502278ca833a43"
- integrity sha512-K2waXdXBi2302XUdcHcR1jCeU0LL4TD9HRs/gk0N2Xvrht+G/BfJa4QObBQZfhMdxiCpV3COl5Nfq4uKTeTnJA==
+ version "7.17.0"
+ resolved "https://registry.yarnpkg.com/@types/babel__traverse/-/babel__traverse-7.17.0.tgz#7a9b80f712fe2052bc20da153ff1e552404d8e4b"
+ integrity sha512-r8aveDbd+rzGP+ykSdF3oPuTVRWRfbBiHl0rVDM2yNEmSMXfkObQLV46b4RnCv3Lra51OlfnZhkkFaDl2MIRaA==
dependencies:
"@babel/types" "^7.3.0"
@@ -1807,9 +1807,9 @@
integrity sha512-Klz949h02Gz2uZCMGwDUSDS1YBlTdDDgbWHi+81l29tQALUtvz4rAYi5uoVhE5Lagoq6DeqAUlbrHvW/mXDgdQ==
"@types/node@*":
- version "17.0.23"
- resolved "https://registry.yarnpkg.com/@types/node/-/node-17.0.23.tgz#3b41a6e643589ac6442bdbd7a4a3ded62f33f7da"
- integrity sha512-UxDxWn7dl97rKVeVS61vErvw086aCYhDLyvRQZ5Rk65rZKepaFdm53GeqXaKBuOhED4e9uWq34IC3TdSdJJ2Gw==
+ version "17.0.24"
+ resolved "https://registry.yarnpkg.com/@types/node/-/node-17.0.24.tgz#20ba1bf69c1b4ab405c7a01e950c4f446b05029f"
+ integrity sha512-aveCYRQbgTH9Pssp1voEP7HiuWlD2jW2BO56w+bVrJn04i61yh6mRfoKO6hEYQD9vF+W8Chkwc6j1M36uPkx4g==
"@types/prettier@^2.1.5":
version "2.6.0"
@@ -1880,9 +1880,9 @@
integrity sha512-ipixuVrh2OdNmauvtT51o3d8z12p6LtFW9in7U79der/kwejjdNchQC5UMn5u/KxNoM7VHHOs/l8KS8uHxhODQ==
"@types/tough-cookie@*":
- version "4.0.1"
- resolved "https://registry.yarnpkg.com/@types/tough-cookie/-/tough-cookie-4.0.1.tgz#8f80dd965ad81f3e1bc26d6f5c727e132721ff40"
- integrity sha512-Y0K95ThC3esLEYD6ZuqNek29lNX2EM1qxV8y2FTLUB0ff5wWrk7az+mLrnNFUnaXcgKye22+sFBRXOgpPILZNg==
+ version "4.0.2"
+ resolved "https://registry.yarnpkg.com/@types/tough-cookie/-/tough-cookie-4.0.2.tgz#6286b4c7228d58ab7866d19716f3696e03a09397"
+ integrity sha512-Q5vtl1W5ue16D+nIaW8JWebSSraJVlK+EthKn7e7UcD4KWsaSJ8BqGPXNaPghgtcn/fhvrN17Tv8ksUsQpiplw==
"@types/uglify-js@*":
version "3.13.2"
@@ -2825,9 +2825,9 @@ async-limiter@~1.0.0:
integrity sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ==
async@^2.6.2:
- version "2.6.3"
- resolved "https://registry.yarnpkg.com/async/-/async-2.6.3.tgz#d72625e2344a3656e3a3ad4fa749fa83299d82ff"
- integrity sha512-zflvls11DCy+dQWzTW2dzuilv8Z5X/pjfmZOWba6TNIVDm+2UDaJmXSOXlasHKfNBs8oo3M0aT50fDEWfKZjXg==
+ version "2.6.4"
+ resolved "https://registry.yarnpkg.com/async/-/async-2.6.4.tgz#706b7ff6084664cd7eae713f6f965433b5504221"
+ integrity sha512-mzo5dfJYwAn29PeiJ0zvwTo04zj8HDJj0Mn8TD7sno7q12prdbnasKJHhkm2c1LgrhlJ0teaea8860oxi51mGA==
dependencies:
lodash "^4.17.14"
@@ -3315,7 +3315,7 @@ browserify-zlib@^0.2.0:
dependencies:
pako "~1.0.5"
-browserslist@^4.0.0, browserslist@^4.12.0, browserslist@^4.17.5, browserslist@^4.19.1:
+browserslist@^4.0.0, browserslist@^4.12.0, browserslist@^4.17.5, browserslist@^4.20.2:
version "4.20.2"
resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.20.2.tgz#567b41508757ecd904dab4d1c646c612cd3d4f88"
integrity sha512-CQOBCqp/9pDvDbx3xfMi+86pr4KXIf2FDkTTdeuYw8OxS9t898LA1Khq57gtufFILXpfgsSx5woNgsBgvGjpsA==
@@ -3566,9 +3566,9 @@ caniuse-api@^3.0.0:
lodash.uniq "^4.5.0"
caniuse-lite@^1.0.0, caniuse-lite@^1.0.30001109, caniuse-lite@^1.0.30001317:
- version "1.0.30001328"
- resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001328.tgz#0ed7a2ca65ec45872c613630201644237ba1e329"
- integrity sha512-Ue55jHkR/s4r00FLNiX+hGMMuwml/QGqqzVeMQ5thUewznU2EdULFvI3JR7JJid6OrjJNfFvHY2G2dIjmRaDDQ==
+ version "1.0.30001332"
+ resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001332.tgz#39476d3aa8d83ea76359c70302eafdd4a1d727dd"
+ integrity sha512-10T30NYOEQtN6C11YGg411yebhvpnC6Z102+B95eAsN0oB6KUs01ivE8u+G6FMIRtIrVlYXhL+LUwQ3/hXwDWw==
caseless@~0.12.0:
version "0.12.0"
@@ -3955,9 +3955,9 @@ commander@^2.19.0, commander@^2.20.0:
integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==
commander@^9.0.0:
- version "9.1.0"
- resolved "https://registry.yarnpkg.com/commander/-/commander-9.1.0.tgz#a6b263b2327f2e188c6402c42623327909f2dbec"
- integrity sha512-i0/MaqBtdbnJ4XQs4Pmyb+oFQl+q0lsAmokVUH92SlSw4fkeAcG3bVon+Qt7hmtF+u3Het6o4VgrcY3qAoEB6w==
+ version "9.2.0"
+ resolved "https://registry.yarnpkg.com/commander/-/commander-9.2.0.tgz#6e21014b2ed90d8b7c9647230d8b7a94a4a419a9"
+ integrity sha512-e2i4wANQiSXgnrBlIatyHtP1odfUp0BbV5Y5nEGbxtIrStkEOAAzCUirvLBNXHLr7kwLvJl6V+4V3XV9x7Wd9w==
commander@~2.19.0:
version "2.19.0"
@@ -4144,11 +4144,11 @@ copy-webpack-plugin@^5.0.2:
webpack-log "^2.0.0"
core-js-compat@^3.20.2, core-js-compat@^3.21.0, core-js-compat@^3.6.5:
- version "3.21.1"
- resolved "https://registry.yarnpkg.com/core-js-compat/-/core-js-compat-3.21.1.tgz#cac369f67c8d134ff8f9bd1623e3bc2c42068c82"
- integrity sha512-gbgX5AUvMb8gwxC7FLVWYT7Kkgu/y7+h/h1X43yJkNqhlK2fuYyQimqvKGNZFAY6CKii/GFKJ2cp/1/42TN36g==
+ version "3.22.0"
+ resolved "https://registry.yarnpkg.com/core-js-compat/-/core-js-compat-3.22.0.tgz#7ce17ab57c378be2c717c7c8ed8f82a50a25b3e4"
+ integrity sha512-WwA7xbfRGrk8BGaaHlakauVXrlYmAIkk8PNGb1FDQS+Rbrewc3pgFfwJFRw6psmJVAll7Px9UHRYE16oRQnwAQ==
dependencies:
- browserslist "^4.19.1"
+ browserslist "^4.20.2"
semver "7.0.0"
core-js@^2.4.0, core-js@^2.6.5:
@@ -4157,9 +4157,9 @@ core-js@^2.4.0, core-js@^2.6.5:
integrity sha512-Kb2wC0fvsWfQrgk8HU5lW6U/Lcs8+9aaYcy4ZFc6DDlo4nZ7n70dEgE5rtR0oG6ufKDUnrwfWL1mXR5ljDatrQ==
core-js@^3.6.4, core-js@^3.6.5:
- version "3.21.1"
- resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.21.1.tgz#f2e0ddc1fc43da6f904706e8e955bc19d06a0d94"
- integrity sha512-FRq5b/VMrWlrmCzwRrpDYNxyHP9BcAZC+xHJaqTgIE5091ZV1NTmyh0sGOg5XqpnHvR0svdy0sv1gWA1zmhxig==
+ version "3.22.0"
+ resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.22.0.tgz#b52007870c5e091517352e833b77f0b2d2b259f3"
+ integrity sha512-8h9jBweRjMiY+ORO7bdWSeWfHhLPO7whobj7Z2Bl0IDo00C228EdGgH7FE4jGumbEjzcFfkfW8bXgdkEDhnwHQ==
[email protected]:
version "1.0.2"
@@ -4554,11 +4554,16 @@ data-urls@^3.0.1:
whatwg-mimetype "^3.0.0"
whatwg-url "^10.0.0"
[email protected], dayjs@^1.10.0:
[email protected]:
version "1.11.0"
resolved "https://registry.yarnpkg.com/dayjs/-/dayjs-1.11.0.tgz#009bf7ef2e2ea2d5db2e6583d2d39a4b5061e805"
integrity sha512-JLC809s6Y948/FuCZPm5IX8rRhQwOiyMb2TfVVQEixG7P8Lm/gt5S7yoQZmC8x1UehI9Pb7sksEt4xx14m+7Ug==
+dayjs@^1.10.0:
+ version "1.11.1"
+ resolved "https://registry.yarnpkg.com/dayjs/-/dayjs-1.11.1.tgz#90b33a3dda3417258d48ad2771b415def6545eb0"
+ integrity sha512-ER7EjqVAMkRRsxNCC5YqJ9d9VQYuWdGt7aiH2qA5R5wt8ZmWaP2dLUSIK6y/kVzLMlmh1Tvu5xUf4M/wdGJ5KA==
+
de-indent@^1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/de-indent/-/de-indent-1.0.2.tgz#b2038e846dc33baa5796128d0804b455b8c1e21d"
@@ -4689,11 +4694,12 @@ defer-to-connect@^2.0.0:
integrity sha512-4tvttepXG1VaYGrRibk5EwJd1t4udunSOVMdLSAL6mId1ix438oPwPZMALY41FCijukO1L0twNcGsdzS7dHgDg==
define-properties@^1.1.2, define-properties@^1.1.3:
- version "1.1.3"
- resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.1.3.tgz#cf88da6cbee26fe6db7094f61d870cbd84cee9f1"
- integrity sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==
+ version "1.1.4"
+ resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.1.4.tgz#0b14d7bd7fbeb2f3572c3a7eda80ea5d57fb05b1"
+ integrity sha512-uckOqKcfaVvtBdsVkdPv3XjveQJsNQqmhXgRi8uhvWWuPYZCNlzT8qAyblUgNoXdHdjMTzAqeGjAoli8f+bzPA==
dependencies:
- object-keys "^1.0.12"
+ has-property-descriptors "^1.0.0"
+ object-keys "^1.1.1"
define-property@^0.2.5:
version "0.2.5"
@@ -5057,9 +5063,9 @@ [email protected]:
integrity sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=
electron-to-chromium@^1.4.84:
- version "1.4.107"
- resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.107.tgz#564257014ab14033b4403a309c813123c58a3fb9"
- integrity sha512-Huen6taaVrUrSy8o7mGStByba8PfOWWluHNxSHGBrCgEdFVLtvdQDBr9LBCF9Uci8SYxh28QNNMO0oC17wbGAg==
+ version "1.4.110"
+ resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.110.tgz#269208d7cf7e32123b1d87bf4e6e1fd9ac7ff51d"
+ integrity sha512-TvHZrkj9anfWkxgblHlNr4IMQdm2N6D0o8Wu1BDpSL/RKT4DHyUt/tvDFtApgZ+LGFL3U9EO4LRZ1eSlQ8xMYA==
[email protected]:
version "0.1.0"
@@ -5255,9 +5261,9 @@ error-inject@^1.0.0:
integrity sha1-4rPZG1Su1nLzCdlQ0VSFD6EdTzc=
es-abstract@^1.17.2, es-abstract@^1.19.1:
- version "1.19.3"
- resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.19.3.tgz#4dd9da55868192756c83c5c30c7878d04e77125d"
- integrity sha512-4axXLNovnMYf0+csS5rVnS5hLmV1ek+ecx9MuCjByL1E5Nn54avf6CHQxIjgQIHBnfX9AMxTRIy0q+Yu5J/fXA==
+ version "1.19.5"
+ resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.19.5.tgz#a2cb01eb87f724e815b278b0dd0d00f36ca9a7f1"
+ integrity sha512-Aa2G2+Rd3b6kxEUKTF4TaW67czBLyAv3z7VOhYRU50YBx+bbsYZ9xQP4lMNazePuFlybXI0V4MruPos7qUo5fA==
dependencies:
call-bind "^1.0.2"
es-to-primitive "^1.2.1"
@@ -6258,6 +6264,11 @@ functional-red-black-tree@^1.0.1:
resolved "https://registry.yarnpkg.com/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz#1b0ab3bd553b2a0d6399d29c0e3ea0b252078327"
integrity sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=
+functions-have-names@^1.2.2:
+ version "1.2.2"
+ resolved "https://registry.yarnpkg.com/functions-have-names/-/functions-have-names-1.2.2.tgz#98d93991c39da9361f8e50b337c4f6e41f120e21"
+ integrity sha512-bLgc3asbWdwPbx2mNk2S49kmJCuQeu0nfmaOgbs8WIyzzkw3r4htszdIi9Q9EMezDPTYuJx2wvjZ/EwgAthpnA==
+
gauge@^3.0.0:
version "3.0.2"
resolved "https://registry.yarnpkg.com/gauge/-/gauge-3.0.2.tgz#03bf4441c044383908bcfa0656ad91803259b395"
@@ -6681,6 +6692,13 @@ has-flag@^4.0.0:
resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b"
integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==
+has-property-descriptors@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/has-property-descriptors/-/has-property-descriptors-1.0.0.tgz#610708600606d36961ed04c196193b6a607fa861"
+ integrity sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ==
+ dependencies:
+ get-intrinsic "^1.1.1"
+
has-symbols@^1.0.1, has-symbols@^1.0.2, has-symbols@^1.0.3:
version "1.0.3"
resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.3.tgz#bb7b2c4349251dce87b125f7bdf874aa7c8b39f8"
@@ -9021,7 +9039,7 @@ lowercase-keys@^2.0.0:
resolved "https://registry.yarnpkg.com/lowercase-keys/-/lowercase-keys-2.0.0.tgz#2603e78b7b4b0006cbca2fbcc8a3202558ac9479"
integrity sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==
[email protected], lru-cache@^7.4.0:
[email protected]:
version "7.8.1"
resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-7.8.1.tgz#68ee3f4807a57d2ba185b7fd90827d5c21ce82bb"
integrity sha512-E1v547OCgJvbvevfjgK9sNKIVXO96NnsTsFPBlg4ZxjhsJSODoH9lk8Bm0OxvHNm6Vm5Yqkl/1fErDxhYL8Skg==
@@ -10087,7 +10105,7 @@ object-is@^1.0.1:
call-bind "^1.0.2"
define-properties "^1.1.3"
-object-keys@^1.0.11, object-keys@^1.0.12, object-keys@^1.1.0, object-keys@^1.1.1:
+object-keys@^1.0.11, object-keys@^1.1.0, object-keys@^1.1.1:
version "1.1.1"
resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.1.1.tgz#1c47f272df277f3b1daf061677d9c82e2322c60e"
integrity sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==
@@ -11546,12 +11564,13 @@ regex-not@^1.0.0, regex-not@^1.0.2:
safe-regex "^1.1.0"
regexp.prototype.flags@^1.2.0:
- version "1.4.1"
- resolved "https://registry.yarnpkg.com/regexp.prototype.flags/-/regexp.prototype.flags-1.4.1.tgz#b3f4c0059af9e47eca9f3f660e51d81307e72307"
- integrity sha512-pMR7hBVUUGI7PMA37m2ofIdQCsomVnas+Jn5UPGAHQ+/LlwKm/aTLJHdasmHRzlfeZwHiAOaRSo2rbBDm3nNUQ==
+ version "1.4.3"
+ resolved "https://registry.yarnpkg.com/regexp.prototype.flags/-/regexp.prototype.flags-1.4.3.tgz#87cab30f80f66660181a3bb7bf5981a872b367ac"
+ integrity sha512-fjggEOO3slI6Wvgjwflkc4NFRCTZAu5CnNfBd5qOMYhWdn67nJBBu34/TkD++eeFmd8C9r9jfXJ27+nSiRkSUA==
dependencies:
call-bind "^1.0.2"
define-properties "^1.1.3"
+ functions-have-names "^1.2.2"
regexpp@^3.2.0:
version "3.2.0"
@@ -12007,11 +12026,11 @@ semver@^6.0.0, semver@^6.1.0, semver@^6.1.1, semver@^6.1.2, semver@^6.2.0, semve
integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==
semver@^7.3.2, semver@^7.3.4, semver@^7.3.5:
- version "7.3.6"
- resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.6.tgz#5d73886fb9c0c6602e79440b97165c29581cbb2b"
- integrity sha512-HZWqcgwLsjaX1HBD31msI/rXktuIhS+lWvdE4kN9z+8IVT4Itc7vqU2WvYsyD6/sjYCt4dEKH/m1M3dwI9CC5w==
+ version "7.3.7"
+ resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.7.tgz#12c5b649afdbf9049707796e22a4028814ce523f"
+ integrity sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==
dependencies:
- lru-cache "^7.4.0"
+ lru-cache "^6.0.0"
[email protected]:
version "0.17.2"
|
6c2b3a076ca7e9b15b3edce83c392367edbb8f80
|
2023-05-24 23:51:24
|
TheLittle_Yang
|
feat(route): add DevolverDigital Blog (#12548)
| false
|
add DevolverDigital Blog (#12548)
|
feat
|
diff --git a/docs/blog.md b/docs/blog.md
index acf7827ac62249..cbc4d2d1eaaf99 100644
--- a/docs/blog.md
+++ b/docs/blog.md
@@ -38,6 +38,12 @@ pageClass: routes
<Route author="Jkker" example="/csdn/blog/csdngeeknews" path="/csdn/blog/:user" radar="1" :paramsDesc="['`user` 为 CSDN 用户名,可以在主页 url 中找到']" />
+## DevolverDigital
+
+### 官方博客
+
+<Route author="XXY233" example="/devolverdigital/blog" path="/devolverdigital/blog" radar="1" />
+
## FreeBuf
### 文章
diff --git a/docs/en/blog.md b/docs/en/blog.md
index 04ac9fa28ec761..61e3a59f128ef6 100644
--- a/docs/en/blog.md
+++ b/docs/en/blog.md
@@ -28,6 +28,12 @@ pageClass: routes
<RouteEn author="Jkker" example="/csdn/blog/csdngeeknews" path="/csdn/blog/:user" radar="1" :paramsDesc="['`user` is the username of a CSDN blog which can be found in the url of the home page']" />
+## DevolverDigital
+
+### Official Blogs
+
+<RouteEn author="XXY233" example="/devolverdigital/blog" path="/devolverdigital/blog" radar="1" />
+
## Geocaching
### Official Blogs
diff --git a/lib/v2/devolverdigital/blog.js b/lib/v2/devolverdigital/blog.js
new file mode 100644
index 00000000000000..bdd42f5e9ed92e
--- /dev/null
+++ b/lib/v2/devolverdigital/blog.js
@@ -0,0 +1,42 @@
+const got = require('@/utils/got');
+const cheerio = require('cheerio');
+
+module.exports = async (ctx) => {
+ const baseUrl = 'https://www.devolverdigital.com/blog';
+
+ const { data: response } = await got(baseUrl);
+ const $ = cheerio.load(response);
+ $('noscript').remove();
+
+ const nextData = JSON.parse($('#__NEXT_DATA__').text());
+ const allBlogContents = $('div.flex > div > div > div > div:not([class])');
+
+ const items = nextData.props.pageProps.posts.map((post, postIndex) => {
+ // img resource redirection and
+ // clean up absolute layouts for img and span
+
+ const imageUrls = post.body.filter((item) => item.type === 'upload' && item.value.cloudinary.resource_type === 'image').map((item) => item.value.cloudinary.secure_url);
+
+ const allImageSpans = $(allBlogContents[postIndex]).find('span > img').parent();
+
+ allImageSpans.each((spanIndex, span) => {
+ $(span).attr('style', $(span).attr('style').replace('position:absolute', ''));
+ const img = $(span).find('img');
+ img.attr('src', imageUrls[spanIndex]);
+ img.attr('style', img.attr('style').replace('position:absolute', '').replace('width:0', '').replace('height:0', ''));
+ });
+
+ return {
+ title: post.title,
+ author: post.author,
+ pubDate: Date.parse(post.createdAt),
+ description: $(allBlogContents[postIndex]).html(),
+ };
+ });
+
+ ctx.state.data = {
+ title: 'DevolverDigital Blog',
+ link: 'https://www.devolverdigital.com/blog',
+ item: items,
+ };
+};
diff --git a/lib/v2/devolverdigital/maintainer.js b/lib/v2/devolverdigital/maintainer.js
new file mode 100644
index 00000000000000..b10eaffbbadf6c
--- /dev/null
+++ b/lib/v2/devolverdigital/maintainer.js
@@ -0,0 +1,3 @@
+module.exports = {
+ '/blog': ['XXY233'],
+};
diff --git a/lib/v2/devolverdigital/radar.js b/lib/v2/devolverdigital/radar.js
new file mode 100644
index 00000000000000..3f7edd7d655cb7
--- /dev/null
+++ b/lib/v2/devolverdigital/radar.js
@@ -0,0 +1,13 @@
+module.exports = {
+ 'devolverdigital.com': {
+ _name: 'DevolverDigital',
+ '.': [
+ {
+ title: '官方博客',
+ docs: 'https://docs.rsshub.app/blog.html#devolverdigital',
+ source: '/blog',
+ target: '/devolverdigital/blog',
+ },
+ ],
+ },
+};
diff --git a/lib/v2/devolverdigital/router.js b/lib/v2/devolverdigital/router.js
new file mode 100644
index 00000000000000..eadc2200534474
--- /dev/null
+++ b/lib/v2/devolverdigital/router.js
@@ -0,0 +1,3 @@
+module.exports = (router) => {
+ router.get('/blog', require('./blog'));
+};
|
cba113f703dad973afe498d393b74423148dd753
|
2019-08-05 08:58:16
|
Ving
|
fix: conditional cache in wenxuemi router (#2770)
| false
|
conditional cache in wenxuemi router (#2770)
|
fix
|
diff --git a/lib/routes/novel/wenxuemi.js b/lib/routes/novel/wenxuemi.js
index 1c637c7706422e..7d33e65357aa89 100644
--- a/lib/routes/novel/wenxuemi.js
+++ b/lib/routes/novel/wenxuemi.js
@@ -39,14 +39,19 @@ module.exports = async (ctx) => {
const articleHtml = await got_ins.get(link);
const article = iconv.decode(articleHtml.data, 'GBK');
const $1 = cheerio.load(article);
- const res = $1('div#content').html();
+ const res = $1('div#content');
resultItem = {
title: $item.text(),
- description: res,
+ description: res.html(),
link: link,
};
- if (res.slice(0, 10).includes('正在手打中') === false) {
+ if (
+ res
+ .text()
+ .slice(0, 10)
+ .includes('正在手打中') === false
+ ) {
ctx.cache.set(link, JSON.stringify(resultItem));
}
}
|
4100653a4b68686b3de959ac0216457bfd6b4289
|
2019-06-15 08:01:36
|
Cloud
|
feat: 添加 AI研习社 (#2407)
| false
|
添加 AI研习社 (#2407)
|
feat
|
diff --git a/docs/programming.md b/docs/programming.md
index f7c2244b17f56f..c7694cd4f7f6de 100644
--- a/docs/programming.md
+++ b/docs/programming.md
@@ -4,6 +4,12 @@ pageClass: routes
# 编程
+## AI 研习社
+
+### 最新
+
+<Route author="kt286" example="/aiyanxishe" path="/aiyanxishe">
+
## AlgoCasts
### 视频更新
diff --git a/lib/router.js b/lib/router.js
index e5c820975b6157..88f6788e03865d 100644
--- a/lib/router.js
+++ b/lib/router.js
@@ -1418,4 +1418,7 @@ router.get('/outagereport/:name/:count?', require('./routes/outagereport/service
// sixthtone
router.get('/sixthtone/news', require('./routes/sixthtone/news'));
+// AI研习社
+router.get('/aiyanxishe/', require('./routes/aiyanxishe/home'));
+
module.exports = router;
diff --git a/lib/routes/aiyanxishe/home.js b/lib/routes/aiyanxishe/home.js
new file mode 100644
index 00000000000000..91a261c2f936c7
--- /dev/null
+++ b/lib/routes/aiyanxishe/home.js
@@ -0,0 +1,101 @@
+const got = require('@/utils/got');
+
+module.exports = async (ctx) => {
+ const response = await got({
+ method: 'GET',
+ url: 'https://www.leiphone.com/club/api?page=1&size=30&is_hot=0&is_recommend=0&tag=&parent_tag=',
+ headers: {
+ Referer: `https://www.leiphone.com/club/api?page=1&size=30&is_hot=0&is_recommend=0&tag=&parent_tag='`,
+ },
+ });
+
+ const ProcessFeed = (type, data) => {
+ let description = '';
+ let author = '';
+ switch (type) {
+ case 'blog': // 博客
+ description = data.content;
+ author = data.user.nickname;
+ break;
+ case 'question': // 问答
+ description = data.content;
+ author = data.user.nickname;
+ break;
+ case 'article': // 翻译
+ description = `<table><tr><td width="50%"> ${data.title} </td><td> ${data.zh_title} </td></tr>`;
+ data.paragraphs.forEach((element) => {
+ description += `<tr><td> ${element.content} </td><td> ${element.zh_content.content} </td></tr>`;
+ });
+ description +=
+ '</table>\
+ <style>\
+ table, \
+ table tr th, \
+ table tr td {\
+ border: 1px solid #000000; \
+ padding: 10px; \
+ } \
+ table {\
+ border-collapse: collapse; \
+ } \
+ </style>';
+ author = data.user.nickname;
+ break;
+ case 'paper': // 论文
+ description = `<h3>标题</h3><p> ${data.paper.title} </p>`;
+ description += `<h3>作者</h3><p> ${data.paper.author.toString()} </p>`;
+ description += `<h3>下载地址</h3><p><a href=" ${data.paper.url} ">${data.paper.url}</a></p>`;
+ description += `<h3>发布时间</h3><p> ${data.paper.publish_time} </p>`;
+ description += `<h3>摘要</h3><p> ${data.paper.description} </p>`;
+ description += `<h3>推荐理由</h3><p><b> ${data.paper.userInfo.nickname} </b>: ${data.paper.recommend_reason} </p>`;
+ author = data.paper.userInfo.nickname;
+ break;
+ default:
+ description = '暂不支持此类型,请到 https://github.com/DIYgod/RSSHub/issues 反馈';
+ break;
+ }
+
+ // 提取内容
+ return { author, description };
+ };
+
+ const items = await Promise.all(
+ response.data.data.all.map(async (item) => {
+ let itemUrl = item.url;
+
+ // 修复论文链接
+ if (item.type === 'paper') {
+ itemUrl = 'https://www.leiphone.com/club/api/spaper/detail?id=' + item.id;
+ }
+
+ const cache = await ctx.cache.get(itemUrl);
+ if (cache) {
+ return Promise.resolve(JSON.parse(cache));
+ }
+
+ const response = await got({
+ method: 'get',
+ url: itemUrl,
+ });
+
+ const result = ProcessFeed(item.type, response.data.data);
+
+ const single = {
+ title: item.zh_title,
+ description: result.description,
+ pubDate: new Date(parseFloat(item.published_time + '000')).toUTCString(),
+ link: itemUrl,
+ author: result.author,
+ };
+ ctx.cache.set(itemUrl, JSON.stringify(single));
+ return Promise.resolve(single);
+ })
+ );
+
+ ctx.state.data = {
+ title: `AI研习社`,
+ link: `https://ai.yanxishe.com/`,
+ description: '专注AI技术发展与AI工程师成长的求知平台',
+ item: items,
+ };
+};
|
945025a3813ae6f81e572cbf70c8b5159b021695
|
2024-06-04 17:49:59
|
dependabot[bot]
|
chore(deps): bump twitter-api-v2 from 1.17.0 to 1.17.1 (#15817)
| false
|
bump twitter-api-v2 from 1.17.0 to 1.17.1 (#15817)
|
chore
|
diff --git a/package.json b/package.json
index a11e6c3c2bff71..c146c32f042744 100644
--- a/package.json
+++ b/package.json
@@ -118,7 +118,7 @@
"tosource": "2.0.0-alpha.3",
"tough-cookie": "4.1.4",
"tsx": "4.11.2",
- "twitter-api-v2": "1.17.0",
+ "twitter-api-v2": "1.17.1",
"undici": "6.18.2",
"uuid": "9.0.1",
"winston": "3.13.0",
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 443a694f2878a6..e2fbfe002c9b5c 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -213,8 +213,8 @@ importers:
specifier: 4.11.2
version: 4.11.2
twitter-api-v2:
- specifier: 1.17.0
- version: 1.17.0
+ specifier: 1.17.1
+ version: 1.17.1
undici:
specifier: 6.18.2
version: 6.18.2
@@ -5389,8 +5389,8 @@ packages:
[email protected]:
resolution: {integrity: sha512-KXXFFdAbFXY4geFIwoyNK+f5Z1b7swfXABfL7HXCmoIWMKU3dmS26672A4EeQtDzLKy7SXmfBu51JolvEKwtGA==}
- [email protected]:
- resolution: {integrity: sha512-znu5Lvu+2KGmjWfOgwtnzNBq8CtaCft5+1+MootxOOEQ2vhmgHa3eAo0tFAJ7M8M0eXDKldY0DNcndn8gGdAIw==}
+ [email protected]:
+ resolution: {integrity: sha512-eLVetUOGiKalx/7NlF8+heMmtEXBhObP0mS9RFgcgjh5KTVq7SOWaIMIe1IrsAAV9DFCjd6O7fL+FMp6sibQYg==}
[email protected]:
resolution: {integrity: sha512-ZCmOJdvOWDBYJlzAoFkC+Q0+bUyEOS1ltgp1MGU03fqHG+dbi9tBFU2Rd9QKiDZFAYrhPh2JUf7rZRIuHRKtOg==}
@@ -11461,7 +11461,7 @@ snapshots:
[email protected]: {}
- [email protected]: {}
+ [email protected]: {}
[email protected]:
dependencies:
|
b2f0aaccfe1473bab4ee49d5575ce5ddbc6a3a74
|
2023-08-23 23:07:54
|
TonyRL
|
refactor(route): move tophub to v2
| false
|
move tophub to v2
|
refactor
|
diff --git a/lib/router.js b/lib/router.js
index 1c199d0925b264..87bf2f261c5534 100644
--- a/lib/router.js
+++ b/lib/router.js
@@ -770,8 +770,8 @@ router.get('/blogs/wordpress/:domain/:https?', lazyloadRouteHandler('./routes/bl
// 西祠胡同
router.get('/xici/:id?', lazyloadRouteHandler('./routes/xici'));
-// 今日热榜
-router.get('/tophub/:id', lazyloadRouteHandler('./routes/tophub'));
+// 今日热榜 migrated to v2
+// router.get('/tophub/:id', lazyloadRouteHandler('./routes/tophub'));
// 游戏时光
router.get('/vgtime/news', lazyloadRouteHandler('./routes/vgtime/news.js'));
diff --git a/lib/routes/tophub/index.js b/lib/v2/tophub/index.js
similarity index 80%
rename from lib/routes/tophub/index.js
rename to lib/v2/tophub/index.js
index 68d61d8e701e82..c00a3e7fce6eb3 100644
--- a/lib/routes/tophub/index.js
+++ b/lib/v2/tophub/index.js
@@ -17,14 +17,14 @@ module.exports = async (ctx) => {
const title = $('div.Xc-ec-L.b-L').text().trim();
const out = $('div.Zd-p-Sc > div:nth-child(1) tr')
- .map(function () {
+ .toArray()
+ .map((e) => {
const info = {
- title: $(this).find('td.al a').text(),
- link: $(this).find('td.al a').attr('href'),
+ title: $(e).find('td.al a').text(),
+ link: $(e).find('td.al a').attr('href'),
};
return info;
- })
- .get();
+ });
ctx.state.data = {
title,
diff --git a/lib/v2/tophub/maintainer.js b/lib/v2/tophub/maintainer.js
new file mode 100644
index 00000000000000..fdeacdedf4ddd9
--- /dev/null
+++ b/lib/v2/tophub/maintainer.js
@@ -0,0 +1,3 @@
+module.exports = {
+ '/:id': ['LogicJake'],
+};
diff --git a/lib/v2/tophub/radar.js b/lib/v2/tophub/radar.js
new file mode 100644
index 00000000000000..0b03042245bb19
--- /dev/null
+++ b/lib/v2/tophub/radar.js
@@ -0,0 +1,13 @@
+module.exports = {
+ 'tophub.today': {
+ _name: '今日热榜',
+ '.': [
+ {
+ title: '榜单',
+ docs: 'https://docs.rsshub.app/routes/new-media#jin-ri-re-bang-bang-dan',
+ source: ['/n/:id'],
+ target: '/tophub/:id',
+ },
+ ],
+ },
+};
diff --git a/lib/v2/tophub/router.js b/lib/v2/tophub/router.js
new file mode 100644
index 00000000000000..b0440f0cdbf7c9
--- /dev/null
+++ b/lib/v2/tophub/router.js
@@ -0,0 +1,3 @@
+module.exports = (router) => {
+ router.get('/:id', require('./'));
+};
diff --git a/website/i18n/zh/docusaurus-plugin-content-docs/current/install/README.md b/website/i18n/zh/docusaurus-plugin-content-docs/current/install/README.md
index be71f2aa5a1e7d..6244cdb0af95f6 100644
--- a/website/i18n/zh/docusaurus-plugin-content-docs/current/install/README.md
+++ b/website/i18n/zh/docusaurus-plugin-content-docs/current/install/README.md
@@ -781,11 +781,17 @@ RSSHub 支持使用访问密钥 / 码,白名单和黑名单三种方式进行
- Civitai
- `CIVITAI_COOKIE`: Civitai 登录后的 cookie 值
-- discuz cookies 设定
+- Discourse
+
+ - `DISCOURSE_CONFIG_{id}`: 一个 Discourse 驱动的论坛的配置信息, `id` 可自由设定为任意数字或字符串。值应形如`{"link":link,"key":key}`。其中:
+ - `link`:论坛的链接。
+ - `key`访问论坛API的密钥,可参考[此处代码](https://pastebin.com/YbLCgdWW)以获取。需要确保有足够权限访问对应资源。
+
+- Discuz cookies 设定
- `DISCUZ_COOKIE_{cid}`: 某 Discuz 驱动的论坛,用户注册后的 Cookie 值,cid 可自由设定,取值范围 \[00, 99], 使用 discuz 通用路由时,通过指定 cid 来调用该 cookie
-- disqus 全部路由:[申请地址](https://disqus.com/api/applications/)
+- Disqus 全部路由:[申请地址](https://disqus.com/api/applications/)
- `DISQUS_API_KEY`: Disqus API
|
50dc97a2d74788c1091a8edfeea8ee8f228c32df
|
2020-05-15 16:48:22
|
dependabot-preview[bot]
|
chore(deps-dev): bump @types/got from 9.6.10 to 9.6.11
| false
|
bump @types/got from 9.6.10 to 9.6.11
|
chore
|
diff --git a/package.json b/package.json
index 242e1f10ac0b36..10e1696f2457f5 100644
--- a/package.json
+++ b/package.json
@@ -35,7 +35,7 @@
"homepage": "https://github.com/DIYgod/RSSHub#readme",
"devDependencies": {
"@types/cheerio": "0.22.18",
- "@types/got": "9.6.10",
+ "@types/got": "9.6.11",
"@types/koa": "2.11.3",
"@vuepress/plugin-back-to-top": "1.5.0",
"@vuepress/plugin-google-analytics": "1.5.0",
diff --git a/yarn.lock b/yarn.lock
index 58b20fa7e2f2f7..618a348125caa0 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -1544,10 +1544,10 @@
"@types/minimatch" "*"
"@types/node" "*"
-"@types/[email protected]":
- version "9.6.10"
- resolved "https://registry.yarnpkg.com/@types/got/-/got-9.6.10.tgz#5f34e9f249a13e06cfe0015b08f55b4b114bb645"
- integrity sha512-owBY1cgHUIXjObzY+vs+J9Cpw0czvfksJX+qEkgxRojFutFq7n1tKoj6Ekg57DhvXMk0vGQ7FbinvS9I/1wxcg==
+"@types/[email protected]":
+ version "9.6.11"
+ resolved "https://registry.yarnpkg.com/@types/got/-/got-9.6.11.tgz#482b402cc5ee459481aeeadb08142ebb1a9afb26"
+ integrity sha512-dr3IiDNg5TDesGyuwTrN77E1Cd7DCdmCFtEfSGqr83jMMtcwhf/SGPbN2goY4JUWQfvxwY56+e5tjfi+oXeSdA==
dependencies:
"@types/node" "*"
"@types/tough-cookie" "*"
|
692c9d376ea88dedcf0206861f56c3f31f5296c5
|
2019-10-18 09:42:09
|
Gimo
|
feat: add はてな匿名ダイアリー (#3278)
| false
|
add はてな匿名ダイアリー (#3278)
|
feat
|
diff --git a/docs/other.md b/docs/other.md
index 0d6bb4704fdcb7..81be2a622fa8e0 100644
--- a/docs/other.md
+++ b/docs/other.md
@@ -396,3 +396,9 @@ type 为 all 时,category 参数不支持 cost 和 free
### 房源
<Route author="DIYgod" example="/ziroom/room/sh/1/2/五角场" path="/ziroom/room/:city/:iswhole/:room/:keyword" :paramsDesc="['城市, 北京 bj; 上海 sh; 深圳 sz; 杭州 hz; 南京 nj; 广州 gz; 成都 cd; 武汉 wh; 天津 tj', '是否整租', '房间数', '关键词']"/>
+
+## はてな
+
+### はてな匿名ダイアリー - 人気記事アーカイブ
+
+<Route author="masakichi" example="/hatena/anonymous_diary/archive" path="/hatena/anonymous_diary/archive"/>
diff --git a/lib/router.js b/lib/router.js
index 4bb13bc3af38e5..8dc7cd7ba6ea2e 100644
--- a/lib/router.js
+++ b/lib/router.js
@@ -1848,6 +1848,9 @@ router.get('/4gamers/tag/:tag', require('./routes/4gamers/tag'));
// 大麦网
router.get('/damai/activity/:city/:category/:subcategory/:keyword?', require('./routes/damai/activity'));
+// はてな匿名ダイアリー
+router.get('/hatena/anonymous_diary/archive', require('./routes/hatena/anonymous_diary/archive'));
+
// kaggle
router.get('/kaggle/discussion/:forumId/:sort?', require('./routes/kaggle/discussion'));
diff --git a/lib/routes/hatena/anonymous_diary/archive.js b/lib/routes/hatena/anonymous_diary/archive.js
new file mode 100644
index 00000000000000..2644af574aea42
--- /dev/null
+++ b/lib/routes/hatena/anonymous_diary/archive.js
@@ -0,0 +1,61 @@
+const got = require('@/utils/got');
+const cheerio = require('cheerio');
+const url = require('url');
+
+function getPubDate(yyyyMMddhhmmss) {
+ const yyyy = yyyyMMddhhmmss.slice(0, 4);
+ const MM = yyyyMMddhhmmss.slice(4, 6);
+ const dd = yyyyMMddhhmmss.slice(6, 8);
+ const hh = yyyyMMddhhmmss.slice(8, 10);
+ const mm = yyyyMMddhhmmss.slice(10, 12);
+ const ss = yyyyMMddhhmmss.slice(12, 14);
+ return new Date(`${yyyy}-${MM}-${dd}T${hh}:${mm}:${ss}+0900`);
+}
+
+module.exports = async (ctx) => {
+ const baseURL = 'https://anond.hatelabo.jp';
+
+ const archiveIndex = await got({
+ method: 'get',
+ url: url.resolve(baseURL, '/archive'),
+ });
+
+ const latestURL = url.resolve(
+ baseURL,
+ cheerio
+ .load(archiveIndex.data)('.archives a')
+ .first()
+ .attr('href')
+ );
+ const response = await got({
+ method: 'get',
+ url: latestURL,
+ });
+
+ const $ = cheerio.load(response.data);
+ const list = $('.archives li');
+
+ ctx.state.data = {
+ title: $('title').text(),
+ link: latestURL,
+ language: 'ja',
+ item:
+ list &&
+ list
+ .map((idx, item) => {
+ item = $(item);
+ const a = item.find('a').first();
+ const yyyyMMddhhmmss = a.attr('href').replace('/', '');
+ return {
+ title: a.text(),
+ description: item
+ .find('blockquote p')
+ .first()
+ .text(),
+ link: url.resolve(baseURL, a.attr('href')),
+ pubDate: getPubDate(yyyyMMddhhmmss).toUTCString(),
+ };
+ })
+ .get(),
+ };
+};
|
6cbfac4b658b2036d9f8593e431192d37a24deb1
|
2019-01-13 21:49:25
|
凉凉
|
hotfix: github search (#1385)
| false
|
github search (#1385)
|
hotfix
|
diff --git a/lib/routes/github/search.js b/lib/routes/github/search.js
index 9fcb85cddb0f46..c8ca5803ecd25e 100644
--- a/lib/routes/github/search.js
+++ b/lib/routes/github/search.js
@@ -13,7 +13,7 @@ module.exports = async (ctx) => {
sort = '';
}
- const suffix = 'search?o='.concat(order, '&q=', query, '&s=', sort, '&type=Repositories');
+ const suffix = 'search?o='.concat(order, '&q=', encodeURIComponent(query), '&s=', sort, '&type=Repositories');
const link = url.resolve(host, suffix);
const response = await axios.get(link);
const $ = cheerio.load(response.data);
|
af9568d2489d0a2e78f0e6b85ef6873491738f56
|
2024-02-27 03:50:37
|
dependabot[bot]
|
chore(deps): bump @tonyrl/rand-user-agent from 2.0.51 to 2.0.52 (#14568)
| false
|
bump @tonyrl/rand-user-agent from 2.0.51 to 2.0.52 (#14568)
|
chore
|
diff --git a/package.json b/package.json
index 05ce406e6629e4..9308162d001fc4 100644
--- a/package.json
+++ b/package.json
@@ -87,7 +87,7 @@
"@notionhq/client": "2.2.14",
"@postlight/parser": "2.2.3",
"@sentry/node": "7.102.1",
- "@tonyrl/rand-user-agent": "2.0.51",
+ "@tonyrl/rand-user-agent": "2.0.52",
"aes-js": "3.1.2",
"art-template": "4.13.2",
"bbcodejs": "0.0.4",
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 4a89c15a62b3cc..fcd7f7da123322 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -18,8 +18,8 @@ dependencies:
specifier: 7.102.1
version: 7.102.1
'@tonyrl/rand-user-agent':
- specifier: 2.0.51
- version: 2.0.51
+ specifier: 2.0.52
+ version: 2.0.52
aes-js:
specifier: 3.1.2
version: 3.1.2
@@ -1409,8 +1409,8 @@ packages:
defer-to-connect: 2.0.1
dev: false
- /@tonyrl/[email protected]:
- resolution: {integrity: sha512-5kcqEftfRcajowAXKL7zswf94ahcqKUNL7KUa6qech4lr06edEZqvyBR4Z4gcvI3AkdI6n71muOzebmwtvOLhg==}
+ /@tonyrl/[email protected]:
+ resolution: {integrity: sha512-zM6iCeDB9Iu/2ImbAiihtrErFc7R1vBdWvd015HApU43HwCBZMab5+iUP3OaowdioCYNv2w7pDjOpHcagyY3Bw==}
engines: {node: '>=14.16'}
dev: false
|
90a65cace5535f80db9b5a029dd74b34855548a7
|
2023-09-12 04:28:26
|
dependabot[bot]
|
chore(deps-dev): bump eslint-plugin-n from 16.0.2 to 16.1.0 (#13258)
| false
|
bump eslint-plugin-n from 16.0.2 to 16.1.0 (#13258)
|
chore
|
diff --git a/package.json b/package.json
index 38cd782b62a6ef..c688cee68d3860 100644
--- a/package.json
+++ b/package.json
@@ -154,7 +154,7 @@
"cross-env": "7.0.3",
"eslint": "8.49.0",
"eslint-config-prettier": "9.0.0",
- "eslint-plugin-n": "16.0.2",
+ "eslint-plugin-n": "16.1.0",
"eslint-plugin-prettier": "5.0.0",
"eslint-plugin-yml": "1.8.0",
"fs-extra": "11.1.1",
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 012773eabc3473..45105fd9da63f8 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -215,8 +215,8 @@ devDependencies:
specifier: 9.0.0
version: 9.0.0([email protected])
eslint-plugin-n:
- specifier: 16.0.2
- version: 16.0.2([email protected])
+ specifier: 16.1.0
+ version: 16.1.0([email protected])
eslint-plugin-prettier:
specifier: 5.0.0
version: 5.0.0([email protected])([email protected])([email protected])
@@ -2910,8 +2910,8 @@ packages:
eslint: 8.49.0
dev: true
- /[email protected]([email protected]):
- resolution: {integrity: sha512-Y66uDfUNbBzypsr0kELWrIz+5skicECrLUqlWuXawNSLUq3ltGlCwu6phboYYOTSnoTdHgTLrc+5Ydo6KjzZog==}
+ /[email protected]([email protected]):
+ resolution: {integrity: sha512-3wv/TooBst0N4ND+pnvffHuz9gNPmk/NkLwAxOt2JykTl/hcuECe6yhTtLJcZjIxtZwN+GX92ACp/QTLpHA3Hg==}
engines: {node: '>=16.0.0'}
peerDependencies:
eslint: '>=7.0.0'
@@ -2920,6 +2920,7 @@ packages:
builtins: 5.0.1
eslint: 8.49.0
eslint-plugin-es-x: 7.2.0([email protected])
+ get-tsconfig: 4.7.0
ignore: 5.2.4
is-core-module: 2.13.0
minimatch: 3.1.2
@@ -3465,6 +3466,12 @@ packages:
engines: {node: '>=10'}
dev: true
+ /[email protected]:
+ resolution: {integrity: sha512-pmjiZ7xtB8URYm74PlGJozDNyhvsVLUcpBa8DZBG3bWHwaHa9bPiRpiSfovw+fjhwONSCWKRyk+JQHEGZmMrzw==}
+ dependencies:
+ resolve-pkg-maps: 1.0.0
+ dev: true
+
/[email protected]:
resolution: {integrity: sha512-7ZqONUVqaabogsYNWlYj0t3YZaL6dhuEueZXGF+/YVmf6dHmaFg8/6psJKqhx9QykIDKzpGcy2cn4oV4YC7V/Q==}
engines: {node: '>= 14'}
@@ -6573,6 +6580,10 @@ packages:
path-is-absolute: 1.0.1
dev: false
+ /[email protected]:
+ resolution: {integrity: sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==}
+ dev: true
+
/[email protected]:
resolution: {integrity: sha512-X2UW6Nw3n/aMgDVy+0rSqgHlv39WZAlZrXCdnbyEiKm17DSqHX4MmQMaST3FbeWR5FTuRcUwYAziZajji0Y7mg==}
engines: {node: '>=10'}
|
7c087297fc61f5f104ee893d3eecedf214b75e25
|
2018-05-18 14:37:31
|
DIYgod
|
rss: fix zhihu zhuanlan image links
| false
|
fix zhihu zhuanlan image links
|
rss
|
diff --git a/routes/zhihu/zhuanlan.js b/routes/zhihu/zhuanlan.js
index a4fddcaa11ce12..4e0027efae415f 100644
--- a/routes/zhihu/zhuanlan.js
+++ b/routes/zhihu/zhuanlan.js
@@ -30,7 +30,7 @@ module.exports = async (ctx) => {
description: info.description,
item: list.map((item) => ({
title: item.title,
- description: item.content.replace(/<img src="/g, '<img referrerpolicy="no-referrer" src="https://pic4.zhimg.com/'),
+ description: item.content.replace(/ src="/g, ' referrerpolicy="no-referrer" src="https://pic4.zhimg.com/'),
pubDate: new Date(item.publishedTime).toUTCString(),
link: `https://zhuanlan.zhihu.com${item.url}`,
})),
|
95592da00ff33767667a6b5b62d4a599f42d1b3b
|
2020-02-20 12:51:28
|
Henry Wang
|
fix: switch to Dcard post api (#4041)
| false
|
switch to Dcard post api (#4041)
|
fix
|
diff --git a/lib/routes/dcard/section.js b/lib/routes/dcard/section.js
index 982a85615500ba..194c6ece6a5aac 100644
--- a/lib/routes/dcard/section.js
+++ b/lib/routes/dcard/section.js
@@ -36,9 +36,7 @@ module.exports = async (ctx) => {
},
});
- const data = response.data;
-
- const items = await utils.ProcessFeed(data, ctx.cache);
+ const items = await utils.ProcessFeed(response.data, ctx.cache);
ctx.state.data = {
title,
diff --git a/lib/routes/dcard/utils.js b/lib/routes/dcard/utils.js
index e081acda387da4..33270536da1bc4 100644
--- a/lib/routes/dcard/utils.js
+++ b/lib/routes/dcard/utils.js
@@ -1,10 +1,9 @@
const got = require('@/utils/got');
-const cheerio = require('cheerio');
const ProcessFeed = async (list, cache) => {
const result = await Promise.all(
list.map(async (item) => {
- const link = `https://www.dcard.tw/f/${item.forumAlias}/p/${item.id}`;
+ const url = `https://www.dcard.tw/_api/posts/${item.id}`;
const content = await cache.tryGet(`dcard${item.id}`, async () => {
let response;
@@ -14,15 +13,21 @@ const ProcessFeed = async (list, cache) => {
try {
response = await got({
method: 'get',
- url: link,
+ url,
headers: {
Referer: 'https://www.dcard.tw/f',
},
});
- const $ = cheerio.load(response.data);
+ let body = response.data.content;
- return $('.Post_content_NKEl9d > div:nth-child(1)').html();
+ body = body.replace(/(?=https?:\/\/).*?(?<=\.(jpe?g|gif|png))/gi, (m) => `<img src="${m}">`);
+
+ body = body.replace(/(?=https?:\/\/).*(?<!jpe?g"?>?)$/gim, (m) => `<a href="${m}">${m}</a>`);
+
+ body = body.replace(/\n/g, '<br>');
+
+ return body;
} catch (error) {
return '';
}
@@ -30,7 +35,7 @@ const ProcessFeed = async (list, cache) => {
const single = {
title: `「${item.forumName}」${item.title}`,
- link,
+ link: `https://www.dcard.tw/f/${item.forumAlias}/p/${item.id}`,
description: content,
author: item.school || '匿名',
pubDate: item.createdAt,
|
bd9c3afcc5136eb9177e2e6b80fb75180f2997b6
|
2023-09-02 23:29:33
|
Andvari
|
feat(route): Add multi-language support for RFI. (#13147)
| false
|
Add multi-language support for RFI. (#13147)
|
feat
|
diff --git a/lib/v2/rfi/maintainer.js b/lib/v2/rfi/maintainer.js
index 169cca9bcb43f9..ee48f58b836289 100644
--- a/lib/v2/rfi/maintainer.js
+++ b/lib/v2/rfi/maintainer.js
@@ -1,3 +1,3 @@
module.exports = {
- '/news': ['nczitzk'],
+ '/news/:lang?': ['nczitzk'],
};
diff --git a/lib/v2/rfi/news.js b/lib/v2/rfi/news.js
index d25a46fb800c9e..886579ab5ec2c3 100644
--- a/lib/v2/rfi/news.js
+++ b/lib/v2/rfi/news.js
@@ -3,8 +3,14 @@ const cheerio = require('cheerio');
const { parseDate } = require('@/utils/parse-date');
module.exports = async (ctx) => {
+ const LANGUAGE = new Map([
+ ['en', '/en/live-news/'],
+ ['fr', '/fr/en-bref/'],
+ ['cn', '/cn/滚动新闻'],
+ ]);
+
const rootUrl = 'https://www.rfi.fr';
- const currentUrl = `${rootUrl}/cn/滚动新闻`;
+ const currentUrl = `${rootUrl}${LANGUAGE.get(ctx.params.lang ?? 'cn')}`;
const response = await got({
method: 'get',
url: currentUrl,
@@ -42,8 +48,9 @@ module.exports = async (ctx) => {
);
ctx.state.data = {
- title: '滚动新闻 - 法国国际广播电台',
+ title: $('title').text(),
link: currentUrl,
item: items,
+ language: $("meta[property='og:locale']").attr('content'),
};
};
diff --git a/lib/v2/rfi/router.js b/lib/v2/rfi/router.js
index 69a5972f6a8112..84ffb5b5374278 100644
--- a/lib/v2/rfi/router.js
+++ b/lib/v2/rfi/router.js
@@ -1,3 +1,3 @@
module.exports = function (router) {
- router.get('/news', require('./news'));
+ router.get('/news/:lang?', require('./news'));
};
diff --git a/website/docs/routes/multimedia.md b/website/docs/routes/multimedia.md
index 9e1a89f3293d09..cbe58390c5cdde 100644
--- a/website/docs/routes/multimedia.md
+++ b/website/docs/routes/multimedia.md
@@ -1551,7 +1551,15 @@ When `mediaType` is `movie`, `sheet` should be:
### 滚动新闻 {#fa-guo-guo-ji-guang-bo-dian-tai-gun-dong-xin-wen}
-<Route author="nczitzk" example="/rfi/news" path="/rfi/news"/>
+<Route author="nczitzk" example="/rfi/news" path="/rfi/news/:lang?" paramsDesc={['语言,默认为cn']}>
+
+**lang**
+
+| en | cn | fr |
+| --- | --- | --- |
+| 英文 | 中文 | 法文 |
+
+</Route>
## 高清电台 {#gao-qing-dian-tai}
|
6bb097227df4dc1a4be55611bdc7213607a83428
|
2022-06-30 03:59:50
|
dependabot[bot]
|
chore(deps-dev): bump jest from 28.1.1 to 28.1.2 (#10071)
| false
|
bump jest from 28.1.1 to 28.1.2 (#10071)
|
chore
|
diff --git a/package.json b/package.json
index 2337ab332c3f43..e063526dda5005 100644
--- a/package.json
+++ b/package.json
@@ -54,7 +54,7 @@
"eslint-plugin-prettier": "4.1.0",
"eslint-plugin-yml": "1.0.0",
"fs-extra": "10.1.0",
- "jest": "28.1.1",
+ "jest": "28.1.2",
"mockdate": "3.0.5",
"nock": "13.2.7",
"nodemon": "2.0.18",
diff --git a/yarn.lock b/yarn.lock
index b344ca69f8a5bd..76138a371733a5 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -1073,15 +1073,15 @@
jest-util "^28.1.1"
slash "^3.0.0"
-"@jest/core@^28.1.1":
- version "28.1.1"
- resolved "https://registry.yarnpkg.com/@jest/core/-/core-28.1.1.tgz#086830bec6267accf9af5ca76f794858e9f9f092"
- integrity sha512-3pYsBoZZ42tXMdlcFeCc/0j9kOlK7MYuXs2B1QbvDgMoW1K9NJ4G/VYvIbMb26iqlkTfPHo7SC2JgjDOk/mxXw==
+"@jest/core@^28.1.2":
+ version "28.1.2"
+ resolved "https://registry.yarnpkg.com/@jest/core/-/core-28.1.2.tgz#eac519b9acbd154313854b8823a47b5c645f785a"
+ integrity sha512-Xo4E+Sb/nZODMGOPt2G3cMmCBqL4/W2Ijwr7/mrXlq4jdJwcFQ/9KrrJZT2adQRk2otVBXXOz1GRQ4Z5iOgvRQ==
dependencies:
"@jest/console" "^28.1.1"
- "@jest/reporters" "^28.1.1"
+ "@jest/reporters" "^28.1.2"
"@jest/test-result" "^28.1.1"
- "@jest/transform" "^28.1.1"
+ "@jest/transform" "^28.1.2"
"@jest/types" "^28.1.1"
"@types/node" "*"
ansi-escapes "^4.2.1"
@@ -1090,15 +1090,15 @@
exit "^0.1.2"
graceful-fs "^4.2.9"
jest-changed-files "^28.0.2"
- jest-config "^28.1.1"
+ jest-config "^28.1.2"
jest-haste-map "^28.1.1"
jest-message-util "^28.1.1"
jest-regex-util "^28.0.2"
jest-resolve "^28.1.1"
- jest-resolve-dependencies "^28.1.1"
- jest-runner "^28.1.1"
- jest-runtime "^28.1.1"
- jest-snapshot "^28.1.1"
+ jest-resolve-dependencies "^28.1.2"
+ jest-runner "^28.1.2"
+ jest-runtime "^28.1.2"
+ jest-snapshot "^28.1.2"
jest-util "^28.1.1"
jest-validate "^28.1.1"
jest-watcher "^28.1.1"
@@ -1108,12 +1108,12 @@
slash "^3.0.0"
strip-ansi "^6.0.0"
-"@jest/environment@^28.1.1":
- version "28.1.1"
- resolved "https://registry.yarnpkg.com/@jest/environment/-/environment-28.1.1.tgz#c4cbf85283278d768f816ebd1a258ea6f9e39d4f"
- integrity sha512-9auVQ2GzQ7nrU+lAr8KyY838YahElTX9HVjbQPPS2XjlxQ+na18G113OoBhyBGBtD6ZnO/SrUy5WR8EzOj1/Uw==
+"@jest/environment@^28.1.2":
+ version "28.1.2"
+ resolved "https://registry.yarnpkg.com/@jest/environment/-/environment-28.1.2.tgz#94a052c0c5f9f8c8e6d13ea6da78dbc5d7d9b85b"
+ integrity sha512-I0CR1RUMmOzd0tRpz10oUfaChBWs+/Hrvn5xYhMEF/ZqrDaaeHwS8yDBqEWCrEnkH2g+WE/6g90oBv3nKpcm8Q==
dependencies:
- "@jest/fake-timers" "^28.1.1"
+ "@jest/fake-timers" "^28.1.2"
"@jest/types" "^28.1.1"
"@types/node" "*"
jest-mock "^28.1.1"
@@ -1125,46 +1125,46 @@
dependencies:
jest-get-type "^28.0.2"
-"@jest/expect@^28.1.1":
- version "28.1.1"
- resolved "https://registry.yarnpkg.com/@jest/expect/-/expect-28.1.1.tgz#ea4fcc8504b45835029221c0dc357c622a761326"
- integrity sha512-/+tQprrFoT6lfkMj4mW/mUIfAmmk/+iQPmg7mLDIFOf2lyf7EBHaS+x3RbeR0VZVMe55IvX7QRoT/2aK3AuUXg==
+"@jest/expect@^28.1.2":
+ version "28.1.2"
+ resolved "https://registry.yarnpkg.com/@jest/expect/-/expect-28.1.2.tgz#0b25acedff46e1e1e5606285306c8a399c12534f"
+ integrity sha512-HBzyZBeFBiOelNbBKN0pilWbbrGvwDUwAqMC46NVJmWm8AVkuE58NbG1s7DR4cxFt4U5cVLxofAoHxgvC5MyOw==
dependencies:
expect "^28.1.1"
- jest-snapshot "^28.1.1"
+ jest-snapshot "^28.1.2"
-"@jest/fake-timers@^28.1.1":
- version "28.1.1"
- resolved "https://registry.yarnpkg.com/@jest/fake-timers/-/fake-timers-28.1.1.tgz#47ce33296ab9d680c76076d51ddbe65ceb3337f1"
- integrity sha512-BY/3+TyLs5+q87rGWrGUY5f8e8uC3LsVHS9Diz8+FV3ARXL4sNnkLlIB8dvDvRrp+LUCGM+DLqlsYubizGUjIA==
+"@jest/fake-timers@^28.1.2":
+ version "28.1.2"
+ resolved "https://registry.yarnpkg.com/@jest/fake-timers/-/fake-timers-28.1.2.tgz#d49e8ee4e02ba85a6e844a52a5e7c59c23e3b76f"
+ integrity sha512-xSYEI7Y0D5FbZN2LsCUj/EKRR1zfQYmGuAUVh6xTqhx7V5JhjgMcK5Pa0iR6WIk0GXiHDe0Ke4A+yERKE9saqg==
dependencies:
"@jest/types" "^28.1.1"
- "@sinonjs/fake-timers" "^9.1.1"
+ "@sinonjs/fake-timers" "^9.1.2"
"@types/node" "*"
jest-message-util "^28.1.1"
jest-mock "^28.1.1"
jest-util "^28.1.1"
-"@jest/globals@^28.1.1":
- version "28.1.1"
- resolved "https://registry.yarnpkg.com/@jest/globals/-/globals-28.1.1.tgz#c0a7977f85e26279cc090d9adcdf82b8a34c4061"
- integrity sha512-dEgl/6v7ToB4vXItdvcltJBgny0xBE6xy6IYQrPJAJggdEinGxCDMivNv7sFzPcTITGquXD6UJwYxfJ/5ZwDSg==
+"@jest/globals@^28.1.2":
+ version "28.1.2"
+ resolved "https://registry.yarnpkg.com/@jest/globals/-/globals-28.1.2.tgz#92fab296e337c7309c25e4202fb724f62249d83f"
+ integrity sha512-cz0lkJVDOtDaYhvT3Fv2U1B6FtBnV+OpEyJCzTHM1fdoTsU4QNLAt/H4RkiwEUU+dL4g/MFsoTuHeT2pvbo4Hg==
dependencies:
- "@jest/environment" "^28.1.1"
- "@jest/expect" "^28.1.1"
+ "@jest/environment" "^28.1.2"
+ "@jest/expect" "^28.1.2"
"@jest/types" "^28.1.1"
-"@jest/reporters@^28.1.1":
- version "28.1.1"
- resolved "https://registry.yarnpkg.com/@jest/reporters/-/reporters-28.1.1.tgz#9389f4bb3cce4d9b586f6195f83c79cd2a1c8662"
- integrity sha512-597Zj4D4d88sZrzM4atEGLuO7SdA/YrOv9SRXHXRNC+/FwPCWxZhBAEzhXoiJzfRwn8zes/EjS8Lo6DouGN5Gg==
+"@jest/reporters@^28.1.2":
+ version "28.1.2"
+ resolved "https://registry.yarnpkg.com/@jest/reporters/-/reporters-28.1.2.tgz#0327be4ce4d0d9ae49e7908656f89669d0c2a260"
+ integrity sha512-/whGLhiwAqeCTmQEouSigUZJPVl7sW8V26EiboImL+UyXznnr1a03/YZ2BX8OlFw0n+Zlwu+EZAITZtaeRTxyA==
dependencies:
"@bcoe/v8-coverage" "^0.2.3"
"@jest/console" "^28.1.1"
"@jest/test-result" "^28.1.1"
- "@jest/transform" "^28.1.1"
+ "@jest/transform" "^28.1.2"
"@jest/types" "^28.1.1"
- "@jridgewell/trace-mapping" "^0.3.7"
+ "@jridgewell/trace-mapping" "^0.3.13"
"@types/node" "*"
chalk "^4.0.0"
collect-v8-coverage "^1.0.0"
@@ -1183,7 +1183,7 @@
string-length "^4.0.1"
strip-ansi "^6.0.0"
terminal-link "^2.0.0"
- v8-to-istanbul "^9.0.0"
+ v8-to-istanbul "^9.0.1"
"@jest/schemas@^28.0.2":
version "28.0.2"
@@ -1192,12 +1192,12 @@
dependencies:
"@sinclair/typebox" "^0.23.3"
-"@jest/source-map@^28.0.2":
- version "28.0.2"
- resolved "https://registry.yarnpkg.com/@jest/source-map/-/source-map-28.0.2.tgz#914546f4410b67b1d42c262a1da7e0406b52dc90"
- integrity sha512-Y9dxC8ZpN3kImkk0LkK5XCEneYMAXlZ8m5bflmSL5vrwyeUpJfentacCUg6fOb8NOpOO7hz2+l37MV77T6BFPw==
+"@jest/source-map@^28.1.2":
+ version "28.1.2"
+ resolved "https://registry.yarnpkg.com/@jest/source-map/-/source-map-28.1.2.tgz#7fe832b172b497d6663cdff6c13b0a920e139e24"
+ integrity sha512-cV8Lx3BeStJb8ipPHnqVw/IM2VCMWO3crWZzYodSIkxXnRcXJipCdx1JCK0K5MsJJouZQTH73mzf4vgxRaH9ww==
dependencies:
- "@jridgewell/trace-mapping" "^0.3.7"
+ "@jridgewell/trace-mapping" "^0.3.13"
callsites "^3.0.0"
graceful-fs "^4.2.9"
@@ -1221,14 +1221,14 @@
jest-haste-map "^28.1.1"
slash "^3.0.0"
-"@jest/transform@^28.1.1":
- version "28.1.1"
- resolved "https://registry.yarnpkg.com/@jest/transform/-/transform-28.1.1.tgz#83541f2a3f612077c8501f49cc4e205d4e4a6b27"
- integrity sha512-PkfaTUuvjUarl1EDr5ZQcCA++oXkFCP9QFUkG0yVKVmNObjhrqDy0kbMpMebfHWm3CCDHjYNem9eUSH8suVNHQ==
+"@jest/transform@^28.1.2":
+ version "28.1.2"
+ resolved "https://registry.yarnpkg.com/@jest/transform/-/transform-28.1.2.tgz#b367962c53fd53821269bde050ce373e111327c1"
+ integrity sha512-3o+lKF6iweLeJFHBlMJysdaPbpoMmtbHEFsjzSv37HIq/wWt5ijTeO2Yf7MO5yyczCopD507cNwNLeX8Y/CuIg==
dependencies:
"@babel/core" "^7.11.6"
"@jest/types" "^28.1.1"
- "@jridgewell/trace-mapping" "^0.3.7"
+ "@jridgewell/trace-mapping" "^0.3.13"
babel-plugin-istanbul "^6.1.1"
chalk "^4.0.0"
convert-source-map "^1.4.0"
@@ -1277,7 +1277,15 @@
resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.13.tgz#b6461fb0c2964356c469e115f504c95ad97ab88c"
integrity sha512-GryiOJmNcWbovBxTfZSF71V/mXbgcV3MewDe3kIMCLyIh5e7SKAeUZs+rMnJ8jkMolZ/4/VsdBmMrw3l+VdZ3w==
-"@jridgewell/trace-mapping@^0.3.7", "@jridgewell/trace-mapping@^0.3.9":
+"@jridgewell/trace-mapping@^0.3.12", "@jridgewell/trace-mapping@^0.3.13":
+ version "0.3.14"
+ resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.14.tgz#b231a081d8f66796e475ad588a1ef473112701ed"
+ integrity sha512-bJWEfQ9lPTvm3SneWwRFVLzrh6nhjwqw7TUFFBEMzwvg7t7PCDenf2lDwqo4NQXzdpgBXyFgDWnQA+2vkruksQ==
+ dependencies:
+ "@jridgewell/resolve-uri" "^3.0.3"
+ "@jridgewell/sourcemap-codec" "^1.4.10"
+
+"@jridgewell/trace-mapping@^0.3.9":
version "0.3.13"
resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.13.tgz#dcfe3e95f224c8fe97a87a5235defec999aa92ea"
integrity sha512-o1xbKhp9qnIAoHJSWd6KlCZfqslL4valSF81H8ImioOAxluWYWOpWkpyktY2vnt4tbrX9XYaxovq6cgowaJp2w==
@@ -1566,7 +1574,7 @@
dependencies:
type-detect "4.0.8"
-"@sinonjs/fake-timers@^9.1.1":
+"@sinonjs/fake-timers@^9.1.2":
version "9.1.2"
resolved "https://registry.yarnpkg.com/@sinonjs/fake-timers/-/fake-timers-9.1.2.tgz#4eaab737fab77332ab132d396a3c0d364bd0ea8c"
integrity sha512-BPS4ynJW/o92PUR4wgriz2Ud5gpST5vz6GQfMixEDK0Z8ZCUv2M7SkBLykH56T++Xs+8ln9zTGbOvNGIe02/jw==
@@ -2981,12 +2989,12 @@ babel-extract-comments@^1.0.0:
dependencies:
babylon "^6.18.0"
-babel-jest@^28.1.1:
- version "28.1.1"
- resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-28.1.1.tgz#2a3a4ae50964695b2d694ccffe4bec537c5a3586"
- integrity sha512-MEt0263viUdAkTq5D7upHPNxvt4n9uLUGa6pPz3WviNBMtOmStb1lIXS3QobnoqM+qnH+vr4EKlvhe8QcmxIYw==
+babel-jest@^28.1.2:
+ version "28.1.2"
+ resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-28.1.2.tgz#2b37fb81439f14d34d8b2cc4a4bd7efabf9acbfe"
+ integrity sha512-pfmoo6sh4L/+5/G2OOfQrGJgvH7fTa1oChnuYH2G/6gA+JwDvO8PELwvwnofKBMNrQsam0Wy/Rw+QSrBNewq2Q==
dependencies:
- "@jest/transform" "^28.1.1"
+ "@jest/transform" "^28.1.2"
"@types/babel__core" "^7.1.14"
babel-plugin-istanbul "^6.1.1"
babel-preset-jest "^28.1.1"
@@ -8204,13 +8212,13 @@ jest-changed-files@^28.0.2:
execa "^5.0.0"
throat "^6.0.1"
-jest-circus@^28.1.1:
- version "28.1.1"
- resolved "https://registry.yarnpkg.com/jest-circus/-/jest-circus-28.1.1.tgz#3d27da6a974d85a466dc0cdc6ddeb58daaa57bb4"
- integrity sha512-75+BBVTsL4+p2w198DQpCeyh1RdaS2lhEG87HkaFX/UG0gJExVq2skG2pT7XZEGBubNj2CytcWSPan4QEPNosw==
+jest-circus@^28.1.2:
+ version "28.1.2"
+ resolved "https://registry.yarnpkg.com/jest-circus/-/jest-circus-28.1.2.tgz#0d5a5623eccb244efe87d1edc365696e4fcf80ce"
+ integrity sha512-E2vdPIJG5/69EMpslFhaA46WkcrN74LI5V/cSJ59L7uS8UNoXbzTxmwhpi9XrIL3zqvMt5T0pl5k2l2u2GwBNQ==
dependencies:
- "@jest/environment" "^28.1.1"
- "@jest/expect" "^28.1.1"
+ "@jest/environment" "^28.1.2"
+ "@jest/expect" "^28.1.2"
"@jest/test-result" "^28.1.1"
"@jest/types" "^28.1.1"
"@types/node" "*"
@@ -8221,52 +8229,52 @@ jest-circus@^28.1.1:
jest-each "^28.1.1"
jest-matcher-utils "^28.1.1"
jest-message-util "^28.1.1"
- jest-runtime "^28.1.1"
- jest-snapshot "^28.1.1"
+ jest-runtime "^28.1.2"
+ jest-snapshot "^28.1.2"
jest-util "^28.1.1"
pretty-format "^28.1.1"
slash "^3.0.0"
stack-utils "^2.0.3"
throat "^6.0.1"
-jest-cli@^28.1.1:
- version "28.1.1"
- resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-28.1.1.tgz#23ddfde8940e1818585ae4a568877b33b0e51cfe"
- integrity sha512-+sUfVbJqb1OjBZ0OdBbI6OWfYM1i7bSfzYy6gze1F1w3OKWq8ZTEKkZ8a7ZQPq6G/G1qMh/uKqpdWhgl11NFQQ==
+jest-cli@^28.1.2:
+ version "28.1.2"
+ resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-28.1.2.tgz#b89012e5bad14135e71b1628b85475d3773a1bbc"
+ integrity sha512-l6eoi5Do/IJUXAFL9qRmDiFpBeEJAnjJb1dcd9i/VWfVWbp3mJhuH50dNtX67Ali4Ecvt4eBkWb4hXhPHkAZTw==
dependencies:
- "@jest/core" "^28.1.1"
+ "@jest/core" "^28.1.2"
"@jest/test-result" "^28.1.1"
"@jest/types" "^28.1.1"
chalk "^4.0.0"
exit "^0.1.2"
graceful-fs "^4.2.9"
import-local "^3.0.2"
- jest-config "^28.1.1"
+ jest-config "^28.1.2"
jest-util "^28.1.1"
jest-validate "^28.1.1"
prompts "^2.0.1"
yargs "^17.3.1"
-jest-config@^28.1.1:
- version "28.1.1"
- resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-28.1.1.tgz#e90b97b984f14a6c24a221859e81b258990fce2f"
- integrity sha512-tASynMhS+jVV85zKvjfbJ8nUyJS/jUSYZ5KQxLUN2ZCvcQc/OmhQl2j6VEL3ezQkNofxn5pQ3SPYWPHb0unTZA==
+jest-config@^28.1.2:
+ version "28.1.2"
+ resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-28.1.2.tgz#ba00ad30caf62286c86e7c1099e915218a0ac8c6"
+ integrity sha512-g6EfeRqddVbjPVBVY4JWpUY4IvQoFRIZcv4V36QkqzE0IGhEC/VkugFeBMAeUE7PRgC8KJF0yvJNDeQRbamEVA==
dependencies:
"@babel/core" "^7.11.6"
"@jest/test-sequencer" "^28.1.1"
"@jest/types" "^28.1.1"
- babel-jest "^28.1.1"
+ babel-jest "^28.1.2"
chalk "^4.0.0"
ci-info "^3.2.0"
deepmerge "^4.2.2"
glob "^7.1.3"
graceful-fs "^4.2.9"
- jest-circus "^28.1.1"
- jest-environment-node "^28.1.1"
+ jest-circus "^28.1.2"
+ jest-environment-node "^28.1.2"
jest-get-type "^28.0.2"
jest-regex-util "^28.0.2"
jest-resolve "^28.1.1"
- jest-runner "^28.1.1"
+ jest-runner "^28.1.2"
jest-util "^28.1.1"
jest-validate "^28.1.1"
micromatch "^4.0.4"
@@ -8303,13 +8311,13 @@ jest-each@^28.1.1:
jest-util "^28.1.1"
pretty-format "^28.1.1"
-jest-environment-node@^28.1.1:
- version "28.1.1"
- resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-28.1.1.tgz#1c86c59003a7d319fa06ea3b1bbda6c193715c67"
- integrity sha512-2aV/eeY/WNgUUJrrkDJ3cFEigjC5fqT1+fCclrY6paqJ5zVPoM//sHmfgUUp7WLYxIdbPwMiVIzejpN56MxnNA==
+jest-environment-node@^28.1.2:
+ version "28.1.2"
+ resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-28.1.2.tgz#3e2eb47f6d173b0648d5f7c717cb1c26651d5c8a"
+ integrity sha512-oYsZz9Qw27XKmOgTtnl0jW7VplJkN2oeof+SwAwKFQacq3CLlG9u4kTGuuLWfvu3J7bVutWlrbEQMOCL/jughw==
dependencies:
- "@jest/environment" "^28.1.1"
- "@jest/fake-timers" "^28.1.1"
+ "@jest/environment" "^28.1.2"
+ "@jest/fake-timers" "^28.1.2"
"@jest/types" "^28.1.1"
"@types/node" "*"
jest-mock "^28.1.1"
@@ -8390,13 +8398,13 @@ jest-regex-util@^28.0.2:
resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-28.0.2.tgz#afdc377a3b25fb6e80825adcf76c854e5bf47ead"
integrity sha512-4s0IgyNIy0y9FK+cjoVYoxamT7Zeo7MhzqRGx7YDYmaQn1wucY9rotiGkBzzcMXTtjrCAP/f7f+E0F7+fxPNdw==
-jest-resolve-dependencies@^28.1.1:
- version "28.1.1"
- resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-28.1.1.tgz#3dffaaa56f4b41bc6b61053899d1756401763a27"
- integrity sha512-p8Y150xYJth4EXhOuB8FzmS9r8IGLEioiaetgdNGb9VHka4fl0zqWlVe4v7mSkYOuEUg2uB61iE+zySDgrOmgQ==
+jest-resolve-dependencies@^28.1.2:
+ version "28.1.2"
+ resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-28.1.2.tgz#ca528858e0c6642d5a1dda8fc7cda10230c275bc"
+ integrity sha512-OXw4vbOZuyRTBi3tapWBqdyodU+T33ww5cPZORuTWkg+Y8lmsxQlVu3MWtJh6NMlKRTHQetF96yGPv01Ye7Mbg==
dependencies:
jest-regex-util "^28.0.2"
- jest-snapshot "^28.1.1"
+ jest-snapshot "^28.1.2"
jest-resolve@^28.1.1:
version "28.1.1"
@@ -8413,44 +8421,44 @@ jest-resolve@^28.1.1:
resolve.exports "^1.1.0"
slash "^3.0.0"
-jest-runner@^28.1.1:
- version "28.1.1"
- resolved "https://registry.yarnpkg.com/jest-runner/-/jest-runner-28.1.1.tgz#9ecdb3f27a00059986797aa6b012ba8306aa436c"
- integrity sha512-W5oFUiDBgTsCloTAj6q95wEvYDB0pxIhY6bc5F26OucnwBN+K58xGTGbliSMI4ChQal5eANDF+xvELaYkJxTmA==
+jest-runner@^28.1.2:
+ version "28.1.2"
+ resolved "https://registry.yarnpkg.com/jest-runner/-/jest-runner-28.1.2.tgz#f293409592a62234285a71237e38499a3554e350"
+ integrity sha512-6/k3DlAsAEr5VcptCMdhtRhOoYClZQmxnVMZvZ/quvPGRpN7OBQYPIC32tWSgOnbgqLXNs5RAniC+nkdFZpD4A==
dependencies:
"@jest/console" "^28.1.1"
- "@jest/environment" "^28.1.1"
+ "@jest/environment" "^28.1.2"
"@jest/test-result" "^28.1.1"
- "@jest/transform" "^28.1.1"
+ "@jest/transform" "^28.1.2"
"@jest/types" "^28.1.1"
"@types/node" "*"
chalk "^4.0.0"
emittery "^0.10.2"
graceful-fs "^4.2.9"
jest-docblock "^28.1.1"
- jest-environment-node "^28.1.1"
+ jest-environment-node "^28.1.2"
jest-haste-map "^28.1.1"
jest-leak-detector "^28.1.1"
jest-message-util "^28.1.1"
jest-resolve "^28.1.1"
- jest-runtime "^28.1.1"
+ jest-runtime "^28.1.2"
jest-util "^28.1.1"
jest-watcher "^28.1.1"
jest-worker "^28.1.1"
source-map-support "0.5.13"
throat "^6.0.1"
-jest-runtime@^28.1.1:
- version "28.1.1"
- resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-28.1.1.tgz#569e1dc3c36c6c4c0b29516c1c49b6ad580abdaf"
- integrity sha512-J89qEJWW0leOsqyi0D9zHpFEYHwwafFdS9xgvhFHtIdRghbadodI0eA+DrthK/1PebBv3Px8mFSMGKrtaVnleg==
+jest-runtime@^28.1.2:
+ version "28.1.2"
+ resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-28.1.2.tgz#d68f34f814a848555a345ceda23289f14d59a688"
+ integrity sha512-i4w93OsWzLOeMXSi9epmakb2+3z0AchZtUQVF1hesBmcQQy4vtaql5YdVe9KexdJaVRyPDw8DoBR0j3lYsZVYw==
dependencies:
- "@jest/environment" "^28.1.1"
- "@jest/fake-timers" "^28.1.1"
- "@jest/globals" "^28.1.1"
- "@jest/source-map" "^28.0.2"
+ "@jest/environment" "^28.1.2"
+ "@jest/fake-timers" "^28.1.2"
+ "@jest/globals" "^28.1.2"
+ "@jest/source-map" "^28.1.2"
"@jest/test-result" "^28.1.1"
- "@jest/transform" "^28.1.1"
+ "@jest/transform" "^28.1.2"
"@jest/types" "^28.1.1"
chalk "^4.0.0"
cjs-module-lexer "^1.0.0"
@@ -8463,15 +8471,15 @@ jest-runtime@^28.1.1:
jest-mock "^28.1.1"
jest-regex-util "^28.0.2"
jest-resolve "^28.1.1"
- jest-snapshot "^28.1.1"
+ jest-snapshot "^28.1.2"
jest-util "^28.1.1"
slash "^3.0.0"
strip-bom "^4.0.0"
-jest-snapshot@^28.1.1:
- version "28.1.1"
- resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-28.1.1.tgz#ab825c16c8d8b5e883bd57eee6ca8748c42ab848"
- integrity sha512-1KjqHJ98adRcbIdMizjF5DipwZFbvxym/kFO4g4fVZCZRxH/dqV8TiBFCa6rqic3p0karsy8RWS1y4E07b7P0A==
+jest-snapshot@^28.1.2:
+ version "28.1.2"
+ resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-28.1.2.tgz#93d31b87b11b384f5946fe0767541496135f8d52"
+ integrity sha512-wzrieFttZYfLvrCVRJxX+jwML2YTArOUqFpCoSVy1QUapx+LlV9uLbV/mMEhYj4t7aMeE9aSQFHSvV/oNoDAMA==
dependencies:
"@babel/core" "^7.11.6"
"@babel/generator" "^7.7.2"
@@ -8479,7 +8487,7 @@ jest-snapshot@^28.1.1:
"@babel/traverse" "^7.7.2"
"@babel/types" "^7.3.3"
"@jest/expect-utils" "^28.1.1"
- "@jest/transform" "^28.1.1"
+ "@jest/transform" "^28.1.2"
"@jest/types" "^28.1.1"
"@types/babel__traverse" "^7.0.6"
"@types/prettier" "^2.1.5"
@@ -8544,15 +8552,15 @@ jest-worker@^28.1.1:
merge-stream "^2.0.0"
supports-color "^8.0.0"
[email protected]:
- version "28.1.1"
- resolved "https://registry.yarnpkg.com/jest/-/jest-28.1.1.tgz#3c39a3a09791e16e9ef283597d24ab19a0df701e"
- integrity sha512-qw9YHBnjt6TCbIDMPMpJZqf9E12rh6869iZaN08/vpOGgHJSAaLLUn6H8W3IAEuy34Ls3rct064mZLETkxJ2XA==
[email protected]:
+ version "28.1.2"
+ resolved "https://registry.yarnpkg.com/jest/-/jest-28.1.2.tgz#451ff24081ce31ca00b07b60c61add13aa96f8eb"
+ integrity sha512-Tuf05DwLeCh2cfWCQbcz9UxldoDyiR1E9Igaei5khjonKncYdc6LDfynKCEWozK0oLE3GD+xKAo2u8x/0s6GOg==
dependencies:
- "@jest/core" "^28.1.1"
+ "@jest/core" "^28.1.2"
"@jest/types" "^28.1.1"
import-local "^3.0.2"
- jest-cli "^28.1.1"
+ jest-cli "^28.1.2"
jquery@^3.4.1:
version "3.6.0"
@@ -14073,12 +14081,12 @@ v8-compile-cache@^2.0.3:
resolved "https://registry.yarnpkg.com/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz#2de19618c66dc247dcfb6f99338035d8245a2cee"
integrity sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA==
-v8-to-istanbul@^9.0.0:
- version "9.0.0"
- resolved "https://registry.yarnpkg.com/v8-to-istanbul/-/v8-to-istanbul-9.0.0.tgz#be0dae58719fc53cb97e5c7ac1d7e6d4f5b19511"
- integrity sha512-HcvgY/xaRm7isYmyx+lFKA4uQmfUbN0J4M0nNItvzTvH/iQ9kW5j/t4YSR+Ge323/lrgDAWJoF46tzGQHwBHFw==
+v8-to-istanbul@^9.0.1:
+ version "9.0.1"
+ resolved "https://registry.yarnpkg.com/v8-to-istanbul/-/v8-to-istanbul-9.0.1.tgz#b6f994b0b5d4ef255e17a0d17dc444a9f5132fa4"
+ integrity sha512-74Y4LqY74kLE6IFyIjPtkSTWzUZmj8tdHT9Ii/26dvQ6K9Dl2NbEfj0XgU2sHCtKgt5VupqhlO/5aWuqS+IY1w==
dependencies:
- "@jridgewell/trace-mapping" "^0.3.7"
+ "@jridgewell/trace-mapping" "^0.3.12"
"@types/istanbul-lib-coverage" "^2.0.1"
convert-source-map "^1.6.0"
|
2b10b7b3f7e9978dc4779a739aedc258fcf22420
|
2024-05-01 20:06:19
|
Tony
|
chore: fix tarball typo
| false
|
fix tarball typo
|
chore
|
diff --git a/.github/workflows/docker-test-cont.yml b/.github/workflows/docker-test-cont.yml
index 26203bda453557..e41c66274d25fd 100644
--- a/.github/workflows/docker-test-cont.yml
+++ b/.github/workflows/docker-test-cont.yml
@@ -58,7 +58,7 @@ jobs:
if: (env.TEST_CONTINUE)
run: |
set -ex
- zstd -d --stdout rssshub.tar.zst | docker load
+ zstd -d --stdout rsshub.tar.zst | docker load
docker run -d \
--name rsshub \
-e NODE_ENV=dev \
|
cc7062d69706f9bbf55d88679fd43c0d7f0378ee
|
2024-11-27 23:01:58
|
github-actions[bot]
|
style: auto format
| false
|
auto format
|
style
|
diff --git a/lib/routes/shu/global.ts b/lib/routes/shu/global.ts
index b4e91d37b1857e..df8325799d1066 100644
--- a/lib/routes/shu/global.ts
+++ b/lib/routes/shu/global.ts
@@ -74,11 +74,11 @@ async function handler(ctx) {
cache.tryGet(item.link, async () => {
const detailResponse = await got({
method: 'get',
- url: item.link
+ url: item.link,
}); // 获取详情页内容
const content = load(detailResponse.data); // 使用cheerio解析内容
- item.description = content('#vsb_content_2 .v_news_content').html() || '内容无法提取';// 提取内容区详情
+ item.description = content('#vsb_content_2 .v_news_content').html() || '内容无法提取'; // 提取内容区详情
return item; // 返回完整的item
})
diff --git a/lib/routes/shu/gs.ts b/lib/routes/shu/gs.ts
index adf7a97eae76d8..0d999d47549746 100644
--- a/lib/routes/shu/gs.ts
+++ b/lib/routes/shu/gs.ts
@@ -77,7 +77,8 @@ async function handler(ctx) {
cache.tryGet(item.link, async () => {
const url = new URL(item.link); // 创建 URL 对象以验证链接
// 确保链接是以正确的域名开头,并且不为空
- if (url.hostname === 'gs1.shu.edu.cn') { // 需校内访问
+ if (url.hostname === 'gs1.shu.edu.cn') {
+ // 需校内访问
// Skip or handle differently for URLs with gs1.shu.edu.cn domain
item.description = 'gs1.shu.edu.cn, 无法直接获取';
return item;
@@ -85,13 +86,12 @@ async function handler(ctx) {
const detailResponse = await got({
method: 'get',
- url: item.link
+ url: item.link,
}); // 获取详情页内容
const content = load(detailResponse.data); // 使用cheerio解析内容
item.description = content('#vsb_content .v_news_content').html() || item.description;
-
return item; // 返回完整的item
})
)
diff --git a/lib/routes/shu/index.ts b/lib/routes/shu/index.ts
index 2a07078226a06d..b14b3697338e13 100644
--- a/lib/routes/shu/index.ts
+++ b/lib/routes/shu/index.ts
@@ -74,7 +74,7 @@ async function handler(ctx) {
cache.tryGet(item.link, async () => {
const detailResponse = await got({
method: 'get',
- url: item.link
+ url: item.link,
});
const content = load(detailResponse.data);
diff --git a/lib/routes/shu/xykd.ts b/lib/routes/shu/xykd.ts
index 8dd2aca955108d..be6b7966bcd499 100644
--- a/lib/routes/shu/xykd.ts
+++ b/lib/routes/shu/xykd.ts
@@ -78,7 +78,7 @@ async function handler(ctx) {
cache.tryGet(item.link, async () => {
const detailResponse = await got({
method: 'get',
- url: item.link
+ url: item.link,
}); // 获取详情页内容
const content = load(detailResponse.data); // 使用cheerio解析内容
|
40620a639acd2d650a56edaa604bfb25c0877351
|
2025-03-24 14:59:49
|
dependabot[bot]
|
chore(deps-dev): bump @eslint/js from 9.22.0 to 9.23.0 (#18681)
| false
|
bump @eslint/js from 9.22.0 to 9.23.0 (#18681)
|
chore
|
diff --git a/package.json b/package.json
index 5ea6a0c03e8dc8..7bb3535f6ff0be 100644
--- a/package.json
+++ b/package.json
@@ -143,7 +143,7 @@
"@babel/preset-typescript": "7.26.0",
"@bbob/types": "4.2.0",
"@eslint/eslintrc": "3.3.1",
- "@eslint/js": "9.22.0",
+ "@eslint/js": "9.23.0",
"@microsoft/eslint-formatter-sarif": "3.1.0",
"@stylistic/eslint-plugin": "4.2.0",
"@types/aes-js": "3.1.4",
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 7458f2862882e4..834acf6a064bdd 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -291,8 +291,8 @@ importers:
specifier: 3.3.1
version: 3.3.1
'@eslint/js':
- specifier: 9.22.0
- version: 9.22.0
+ specifier: 9.23.0
+ version: 9.23.0
'@microsoft/eslint-formatter-sarif':
specifier: 3.1.0
version: 3.1.0
@@ -1407,6 +1407,10 @@ packages:
resolution: {integrity: sha512-vLFajx9o8d1/oL2ZkpMYbkLv8nDB6yaIwFNt7nI4+I80U/z03SxmfOMsLbvWr3p7C+Wnoh//aOu2pQW8cS0HCQ==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
+ '@eslint/[email protected]':
+ resolution: {integrity: sha512-35MJ8vCPU0ZMxo7zfev2pypqTwWTofFZO6m4KAtdoFhRpLJUpHTZZ+KB3C7Hb1d7bULYwO4lJXGCi5Se+8OMbw==}
+ engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
+
'@eslint/[email protected]':
resolution: {integrity: sha512-RBMg5FRL0I0gs51M/guSAj5/e14VQ4tpZnQNWwuDT66P14I43ItmPfIZRhO9fUVIPOAQXU47atlywZ/czoqFPA==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
@@ -7131,6 +7135,8 @@ snapshots:
'@eslint/[email protected]': {}
+ '@eslint/[email protected]': {}
+
'@eslint/[email protected]': {}
'@eslint/[email protected]':
|
c0c0d11c5ab24f71287daa7835035e9caf66d9f7
|
2024-11-25 22:57:51
|
Keo
|
feat(route/pixiv): add more precise datetime and author name for NSFW… (#17698)
| false
|
add more precise datetime and author name for NSFW… (#17698)
|
feat
|
diff --git a/lib/routes/pixiv/novel-api/content/common.ts b/lib/routes/pixiv/novel-api/content/common.ts
deleted file mode 100644
index af536fed34af58..00000000000000
--- a/lib/routes/pixiv/novel-api/content/common.ts
+++ /dev/null
@@ -1,12 +0,0 @@
-import cache from '@/utils/cache';
-import got from '@/utils/got';
-import { load } from 'cheerio';
-
-export async function getNovelLanguage(novelId: string): Promise<string> {
- return (await cache.tryGet(`https://www.pixiv.net/novel/show.php?id=${novelId}`, async () => {
- const rsp = await got(`https://www.pixiv.net/novel/show.php?id=${novelId}`);
- const $ = load(rsp.data);
- const data = JSON.parse($('#meta-preload-data').attr('content'));
- return data?.novel[novelId].language;
- })) as string;
-}
diff --git a/lib/routes/pixiv/novel-api/content/nsfw.ts b/lib/routes/pixiv/novel-api/content/nsfw.ts
index 68a85c5558f9ae..86eab24e670f0f 100644
--- a/lib/routes/pixiv/novel-api/content/nsfw.ts
+++ b/lib/routes/pixiv/novel-api/content/nsfw.ts
@@ -6,7 +6,6 @@ import queryString from 'query-string';
import { parseNovelContent } from './utils';
import type { NovelContent, NSFWNovelDetail } from './types';
import { parseDate } from '@/utils/parse-date';
-import { getNovelLanguage } from './common';
export async function getNSFWNovelContent(novelId: string, token: string): Promise<NovelContent> {
return (await cache.tryGet(`https://app-api.pixiv.net/webview/v2/novel:${novelId}`, async () => {
@@ -44,8 +43,6 @@ export async function getNSFWNovelContent(novelId: string, token: string): Promi
const parsedContent = await parseNovelContent(novelDetail.text, images, token);
- const language = await getNovelLanguage(novelId);
-
return {
id: novelDetail.id,
title: novelDetail.title,
@@ -71,8 +68,6 @@ export async function getNSFWNovelContent(novelId: string, token: string): Promi
seriesId: novelDetail.seriesId || null,
seriesTitle: novelDetail.seriesTitle || null,
-
- language,
};
})) as NovelContent;
}
diff --git a/lib/routes/pixiv/novel-api/content/sfw.ts b/lib/routes/pixiv/novel-api/content/sfw.ts
index 704ae746b221a0..c58d2489d9a4e7 100644
--- a/lib/routes/pixiv/novel-api/content/sfw.ts
+++ b/lib/routes/pixiv/novel-api/content/sfw.ts
@@ -4,7 +4,6 @@ import pixivUtils from '../../utils';
import { parseNovelContent } from './utils';
import { NovelContent, SFWNovelDetail } from './types';
import { parseDate } from '@/utils/parse-date';
-import { getNovelLanguage } from './common';
const baseUrl = 'https://www.pixiv.net';
@@ -34,8 +33,6 @@ export async function getSFWNovelContent(novelId: string): Promise<NovelContent>
const parsedContent = await parseNovelContent(novelDetail.body.content, images);
- const language = await getNovelLanguage(novelId);
-
return {
id: body.id,
title: body.title,
@@ -61,8 +58,6 @@ export async function getSFWNovelContent(novelId: string): Promise<NovelContent>
seriesId: body.seriesNavData?.seriesId?.toString() || null,
seriesTitle: body.seriesNavData?.title || null,
-
- language,
};
})) as NovelContent;
}
diff --git a/lib/routes/pixiv/novel-api/content/types.ts b/lib/routes/pixiv/novel-api/content/types.ts
index 735522f91106d9..752878c73a40a3 100644
--- a/lib/routes/pixiv/novel-api/content/types.ts
+++ b/lib/routes/pixiv/novel-api/content/types.ts
@@ -21,8 +21,6 @@ export interface NovelContent {
seriesId: string | null;
seriesTitle: string | null;
-
- language: string | null;
}
export interface SFWNovelDetail {
diff --git a/lib/routes/pixiv/novel-api/series/nsfw.ts b/lib/routes/pixiv/novel-api/series/nsfw.ts
index 5ed3c69c731300..bb230fe19c6516 100644
--- a/lib/routes/pixiv/novel-api/series/nsfw.ts
+++ b/lib/routes/pixiv/novel-api/series/nsfw.ts
@@ -2,15 +2,34 @@ import got from '../../pixiv-got';
import { maskHeader } from '../../constants';
import { getNSFWNovelContent } from '../content/nsfw';
import pixivUtils from '../../utils';
-import { SeriesContentResponse, SeriesDetail, SeriesFeed } from './types';
+import { AppNovelSeries, SeriesDetail, SeriesFeed } from './types';
import ConfigNotFoundError from '@/errors/types/config-not-found';
import { getToken } from '../../token';
import { config } from '@/config';
import cache from '@/utils/cache';
+import queryString from 'query-string';
const baseUrl = 'https://www.pixiv.net';
+async function getNovelSeries(seriesId: string, offset: number, token: string): Promise<AppNovelSeries> {
+ const rsp = await got('https://app-api.pixiv.net/v2/novel/series', {
+ headers: {
+ ...maskHeader,
+ Authorization: 'Bearer ' + token,
+ },
+ searchParams: queryString.stringify({
+ series_id: seriesId,
+ last_order: offset,
+ }),
+ });
+ return rsp.data as AppNovelSeries;
+}
+
export async function getNSFWSeriesNovels(seriesId: string, limit: number = 10): Promise<SeriesFeed> {
+ if (limit > 30) {
+ limit = 30;
+ }
+
if (!config.pixiv || !config.pixiv.refreshToken) {
throw new ConfigNotFoundError('This user is an R18 creator, PIXIV_REFRESHTOKEN is required.\npixiv RSS is disabled due to the lack of relevant config.\n該用戶爲 R18 創作者,需要 PIXIV_REFRESHTOKEN。');
}
@@ -26,54 +45,38 @@ export async function getNSFWSeriesNovels(seriesId: string, limit: number = 10):
Authorization: 'Bearer ' + token,
},
});
-
const seriesData = seriesResponse.data as SeriesDetail;
- if (seriesData.error) {
- throw new Error(seriesData.message || 'Failed to get series detail');
+ let offset = seriesData.body.total - limit;
+ if (offset < 0) {
+ offset = 0;
}
-
- // Get chapters
- const chaptersResponse = await got(`${baseUrl}/ajax/novel/series/${seriesId}/content_titles`, {
- headers: {
- ...maskHeader,
- Authorization: 'Bearer ' + token,
- },
- });
-
- const data = chaptersResponse.data as SeriesContentResponse;
-
- if (data.error) {
- throw new Error(data.message || 'Failed to get series data');
- }
-
- const chapters = data.body.slice(-Math.abs(limit));
- const chapterStartNum = Math.max(data.body.length - limit + 1, 1);
+ const appSeriesData = await getNovelSeries(seriesId, offset, token);
const items = await Promise.all(
- chapters.map(async (chapter, index) => {
- const novelContent = await getNSFWNovelContent(chapter.id, token);
+ appSeriesData.novels.map(async (novel) => {
+ const novelContent = await getNSFWNovelContent(novel.id, token);
return {
- title: `#${chapterStartNum + index} ${novelContent.title}`,
+ title: novel.title,
description: `
<img src="${pixivUtils.getProxiedImageUrl(novelContent.coverUrl)}" />
- <div lang="${novelContent.language}">
+ <div>
<p>${novelContent.description}</p>
<hr>
${novelContent.content}
</div>
`,
- link: `${baseUrl}/novel/show.php?id=${novelContent.id}`,
- pubDate: novelContent.createDate,
- author: novelContent.userName || `User ID: ${novelContent.userId}`,
+ link: `${baseUrl}/novel/show.php?id=${novel.id}`,
+ pubDate: novel.create_date,
+ author: novel.user.name,
category: novelContent.tags,
};
})
);
return {
- title: seriesData.body.title,
- description: seriesData.body.caption,
+ title: appSeriesData.novel_series_detail.title,
+ description: appSeriesData.novel_series_detail.caption,
link: `${baseUrl}/novel/series/${seriesId}`,
image: pixivUtils.getProxiedImageUrl(seriesData.body.cover.urls.original),
item: items,
diff --git a/lib/routes/pixiv/novel-api/series/sfw.ts b/lib/routes/pixiv/novel-api/series/sfw.ts
index 5cc4c10a31078c..d9db33df495b42 100644
--- a/lib/routes/pixiv/novel-api/series/sfw.ts
+++ b/lib/routes/pixiv/novel-api/series/sfw.ts
@@ -45,7 +45,7 @@ export async function getSFWSeriesNovels(seriesId: string, limit: number = 10):
title: `#${chapterStartNum + index} ${novelContent.title}`,
description: `
<img src="${pixivUtils.getProxiedImageUrl(novelContent.coverUrl)}" />
- <div lang="${novelContent.language}">
+ <div>
<p>${novelContent.description}</p>
<hr>
${novelContent.content}
diff --git a/lib/routes/pixiv/novel-api/series/types.ts b/lib/routes/pixiv/novel-api/series/types.ts
index 13f9c189b851b9..de946d0556e065 100644
--- a/lib/routes/pixiv/novel-api/series/types.ts
+++ b/lib/routes/pixiv/novel-api/series/types.ts
@@ -28,6 +28,7 @@ export interface SeriesDetail {
latestNovelId: string;
xRestrict: number;
isOriginal: boolean;
+ total: number;
cover: {
urls: {
original: string;
@@ -66,3 +67,28 @@ export interface SeriesFeed {
category?: string[];
}>;
}
+
+export interface AppUser {
+ id: number;
+ name: string;
+}
+
+export interface AppNovelSeriesDetail {
+ id: string;
+ title: string;
+ caption: string;
+ content_count: number;
+ is_concluded: boolean;
+ is_original: boolean;
+ user: AppUser;
+}
+
+export interface AppNovelSeries {
+ novel_series_detail: AppNovelSeriesDetail;
+ novels: {
+ id: string;
+ title: string;
+ create_date: Date;
+ user: AppUser;
+ }[];
+}
diff --git a/lib/routes/pixiv/novel-api/user-novels/nsfw.ts b/lib/routes/pixiv/novel-api/user-novels/nsfw.ts
index 8047a8494efdb6..b55f188e004e75 100644
--- a/lib/routes/pixiv/novel-api/user-novels/nsfw.ts
+++ b/lib/routes/pixiv/novel-api/user-novels/nsfw.ts
@@ -11,7 +11,6 @@ import ConfigNotFoundError from '@/errors/types/config-not-found';
import cache from '@/utils/cache';
import { getToken } from '../../token';
import InvalidParameterError from '@/errors/types/invalid-parameter';
-import { getNovelLanguage } from '../content/common';
function getNovels(user_id: string, token: string): Promise<NSFWNovelsResponse> {
return got('https://app-api.pixiv.net/v1/user/novels', {
@@ -47,12 +46,11 @@ export async function getNSFWUserNovels(id: string, fullContent: boolean = false
const items = await Promise.all(
novels.map(async (novel) => {
- const language = await getNovelLanguage(novel.id);
const baseItem = {
title: novel.series?.title ? `${novel.series.title} - ${novel.title}` : novel.title,
description: `
<img src="${pixivUtils.getProxiedImageUrl(novel.image_urls.large)}" />
- <div lang="${language}">
+ <div>
<p>${convertPixivProtocolExtended(novel.caption)}</p>
</div>`,
author: novel.user.name,
diff --git a/lib/routes/pixiv/novel-api/user-novels/sfw.ts b/lib/routes/pixiv/novel-api/user-novels/sfw.ts
index 86c2e5d2768074..8b60cac8e92b68 100644
--- a/lib/routes/pixiv/novel-api/user-novels/sfw.ts
+++ b/lib/routes/pixiv/novel-api/user-novels/sfw.ts
@@ -3,7 +3,6 @@ import { parseDate } from '@/utils/parse-date';
import pixivUtils from '../../utils';
import { getSFWNovelContent } from '../content/sfw';
import type { SFWNovelsResponse, NovelList } from './types';
-import { getNovelLanguage } from '../content/common';
const baseUrl = 'https://www.pixiv.net';
@@ -37,12 +36,11 @@ export async function getSFWUserNovels(id: string, fullContent: boolean = false,
const items = await Promise.all(
Object.values(data.body.works).map(async (item) => {
- const language = await getNovelLanguage(item.id);
const baseItem = {
title: item.title,
description: `
<img src=${pixivUtils.getProxiedImageUrl(item.url)} />
- <div lang="${language}">
+ <div>
<p>${item.description}</p>
</div>
`,
diff --git a/lib/routes/pixiv/novel-series.ts b/lib/routes/pixiv/novel-series.ts
index 7f41c8586167ce..6db9b3928689ad 100644
--- a/lib/routes/pixiv/novel-series.ts
+++ b/lib/routes/pixiv/novel-series.ts
@@ -28,7 +28,7 @@ Pixiv 登錄後的 refresh_token,用於獲取 R18 小說
supportScihub: false,
},
name: 'Novel Series',
- maintainers: ['SnowAgar25'],
+ maintainers: ['SnowAgar25', 'keocheung'],
handler,
radar: [
{
|
ae38a61fe0d161dc725aeea8eb669732d6fbf6b3
|
2019-05-14 12:52:35
|
renovate[bot]
|
fix(deps): update dependency puppeteer to v1.16.0 (#2126)
| false
|
update dependency puppeteer to v1.16.0 (#2126)
|
fix
|
diff --git a/package.json b/package.json
index a5ec5609c76293..3b2c5edfd2a534 100644
--- a/package.json
+++ b/package.json
@@ -79,7 +79,7 @@
"path-to-regexp": "3.0.0",
"pidusage": "2.0.17",
"plist": "3.0.1",
- "puppeteer": "1.15.0",
+ "puppeteer": "1.16.0",
"redis": "2.8.0",
"rss-parser": "3.7.0",
"sanitize-html": "1.20.1",
diff --git a/yarn.lock b/yarn.lock
index 4758532d07b843..7a957af4355737 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -8560,10 +8560,10 @@ punycode@^1.2.4, punycode@^1.4.1:
resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e"
integrity sha1-wNWmOycYgArY4esPpSachN1BhF4=
[email protected]:
- version "1.15.0"
- resolved "https://registry.yarnpkg.com/puppeteer/-/puppeteer-1.15.0.tgz#1680fac13e51f609143149a5b7fa99eec392b34f"
- integrity sha512-D2y5kwA9SsYkNUmcBzu9WZ4V1SGHiQTmgvDZSx6sRYFsgV25IebL4V6FaHjF6MbwLK9C6f3G3pmck9qmwM8H3w==
[email protected]:
+ version "1.16.0"
+ resolved "https://registry.yarnpkg.com/puppeteer/-/puppeteer-1.16.0.tgz#4b763d9ff4e69a4bb7a031c3393534214d54f27e"
+ integrity sha512-7hcmbUw+6INffSPBdnO8KSjJRg2bLRoI7EeZMf5MHdV5kpyYMeoMR5w8AIiZbKIhYGwrXlbgvO7gFTsXNHShuQ==
dependencies:
debug "^4.1.0"
extract-zip "^1.6.6"
|
2c680041bf2e89ab91b0beaee622551c4b96a1e1
|
2021-03-21 20:15:10
|
DIYgod
|
docs: fix douban group example
| false
|
fix douban group example
|
docs
|
diff --git a/docs/social-media.md b/docs/social-media.md
index a7c911ac6a9852..50c6b0fb280b2f 100644
--- a/docs/social-media.md
+++ b/docs/social-media.md
@@ -770,7 +770,7 @@ YouTube 官方亦有提供频道 RSS,形如 <https://www.youtube.com/feeds/vid
### 豆瓣小组
-<Route author="DIYgod" example="/douban/group/camera" path="/douban/group/:groupid/:type?" :paramsDesc="['豆瓣小组的 id', '缺省 最新,essence 最热,elite 精华']"/>
+<Route author="DIYgod" example="/douban/group/648102" path="/douban/group/:groupid/:type?" :paramsDesc="['豆瓣小组的 id', '缺省 最新,essence 最热,elite 精华']"/>
### 浏览发现
|
495cff5001540cf5c24bade197517c515e2d12a7
|
2024-03-08 10:11:12
|
Silent Wang
|
feat(route): add qust jw (#14670)
| false
|
add qust jw (#14670)
|
feat
|
diff --git a/lib/routes/qust/jw.ts b/lib/routes/qust/jw.ts
new file mode 100644
index 00000000000000..cdfed631608768
--- /dev/null
+++ b/lib/routes/qust/jw.ts
@@ -0,0 +1,30 @@
+import got from '@/utils/got';
+import { load } from 'cheerio';
+
+const baseUrl = 'https://jw.qust.edu.cn/';
+
+export default async (ctx) => {
+ const response = await got({
+ method: 'get',
+ url: `${baseUrl}jwtz.htm`,
+ });
+ const $ = load(response.data);
+ const items = $('.winstyle60982 tr a.c60982').map((_, element) => {
+ const linkElement = $(element);
+ const itemTitle = linkElement.text().trim();
+ const path = linkElement.attr('href');
+ const itemUrl = path.startsWith('http') ? path : `${baseUrl}${path}`;
+ return {
+ title: itemTitle,
+ link: itemUrl,
+ };
+ }).get();
+
+ ctx.set('data', {
+ title: '青岛科技大学 - 教务通知',
+ link: `${baseUrl}jwtz.htm`,
+ item: items,
+ });
+};
+
+
diff --git a/lib/routes/qust/maintainer.ts b/lib/routes/qust/maintainer.ts
new file mode 100644
index 00000000000000..0f581dab35c6a9
--- /dev/null
+++ b/lib/routes/qust/maintainer.ts
@@ -0,0 +1,3 @@
+export default {
+ '/jw': ['Silent-wqh'],
+};
diff --git a/lib/routes/qust/radar.ts b/lib/routes/qust/radar.ts
new file mode 100644
index 00000000000000..d249ba0fa6c5c6
--- /dev/null
+++ b/lib/routes/qust/radar.ts
@@ -0,0 +1,13 @@
+export default {
+ 'qust.edu.cn': {
+ _name: '青岛科技大学',
+ jw: [
+ {
+ title: '教务通知',
+ docs: 'https://docs.rsshub.app/routes/university#qing-dao-ke-ji-da-xue',
+ source: ['/jwtz.htm', '/'],
+ target: '/qust/jw',
+ },
+ ],
+ },
+};
diff --git a/lib/routes/qust/router.ts b/lib/routes/qust/router.ts
new file mode 100644
index 00000000000000..3a69b3ed0199f0
--- /dev/null
+++ b/lib/routes/qust/router.ts
@@ -0,0 +1,3 @@
+export default (router) => {
+ router.get('/jw', './jw');
+};
diff --git a/website/docs/routes/university.mdx b/website/docs/routes/university.mdx
index 47edeb6175fb30..e0ba11e791ac84 100644
--- a/website/docs/routes/university.mdx
+++ b/website/docs/routes/university.mdx
@@ -3699,3 +3699,9 @@ jsjxy.hbut.edu.cn 证书链不全,自建 RSSHub 可设置环境变量 NODE\_TL
| -------- | -------- | -------- | -------- |
| results | papers | writings | policy |
</Route>
+
+## 青岛科技大学 {#qing-dao-ke-ji-da-xue}
+
+### 教务通知 {#qing-dao-ke-ji-da-xue-jiao-wu-tong-zhi}
+
+<Route author="Silent-wqh" example="/qust/jw" path="/qust/jw" radar="1" />
|
1afdc2820bffbb7b4f5543c9808c61b1c1e2f471
|
2019-05-10 15:56:28
|
DIYgod
|
chore: fix dependence
| false
|
fix dependence
|
chore
|
diff --git a/package.json b/package.json
index e9a05fcd458538..af5d81eb1fd1ba 100644
--- a/package.json
+++ b/package.json
@@ -41,6 +41,7 @@
"jest": "24.8.0",
"mockdate": "2.0.2",
"nodemon": "1.19.0",
+ "pinyin": "2.9.0",
"prettier": "1.17.0",
"prettier-check": "2.0.0",
"pretty-quick": "1.10.0",
@@ -77,7 +78,6 @@
"node-fetch": "2.5.0",
"path-to-regexp": "3.0.0",
"pidusage": "2.0.17",
- "pinyin": "^2.9.0",
"plist": "3.0.1",
"puppeteer": "1.15.0",
"redis": "2.8.0",
diff --git a/yarn.lock b/yarn.lock
index bae4d86efe4f69..0f8b472ab0292d 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -2611,6 +2611,13 @@ commander@^2.19.0, commander@^2.3.0, commander@~2.20.0:
resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.0.tgz#d58bb2b5c1ee8f87b0d340027e9e94e222c5a422"
integrity sha512-7j2y+40w61zy6YC2iRNpUe/NwhNyoXrYpHMrSunaMG64nRnaf96zO/KMQR4OyN/UnE5KLyEBnKHd4aG3rskjpQ==
+commander@~1.1.1:
+ version "1.1.1"
+ resolved "https://registry.yarnpkg.com/commander/-/commander-1.1.1.tgz#50d1651868ae60eccff0a2d9f34595376bc6b041"
+ integrity sha1-UNFlGGiuYOzP8KLZ80WVN2vGsEE=
+ dependencies:
+ keypress "0.1.x"
+
commander@~2.19.0:
version "2.19.0"
resolved "https://registry.yarnpkg.com/commander/-/commander-2.19.0.tgz#f6198aa84e5b83c46054b94ddedbfed5ee9ff12a"
@@ -6124,6 +6131,11 @@ keygrip@~1.0.3:
resolved "https://registry.yarnpkg.com/keygrip/-/keygrip-1.0.3.tgz#399d709f0aed2bab0a059e0cdd3a5023a053e1dc"
integrity sha512-/PpesirAIfaklxUzp4Yb7xBper9MwP6hNRA6BGGUFCgbJ+BM5CKBtsoxinNXkLHAr+GXS1/lSlF2rP7cv5Fl+g==
[email protected]:
+ version "0.1.0"
+ resolved "https://registry.yarnpkg.com/keypress/-/keypress-0.1.0.tgz#4a3188d4291b66b4f65edb99f806aa9ae293592a"
+ integrity sha1-SjGI1CkbZrT2XtuZ+AaqmuKTWSo=
+
killable@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/killable/-/killable-1.0.1.tgz#4c8ce441187a061c7474fb87ca08e2a638194892"
@@ -6921,6 +6933,11 @@ nan@^2.12.1, nan@^2.13.2:
resolved "https://registry.yarnpkg.com/nan/-/nan-2.13.2.tgz#f51dc7ae66ba7d5d55e1e6d4d8092e802c9aefe7"
integrity sha512-TghvYc72wlMGMVMluVo9WRJc0mB8KxxF/gZ4YYFy7V2ZQX9l7rgbPg7vjS9mt6U5HXODVFVI2bOduCzwOMv/lw==
+nan@~2.10.0:
+ version "2.10.0"
+ resolved "https://registry.yarnpkg.com/nan/-/nan-2.10.0.tgz#96d0cd610ebd58d4b4de9cc0c6828cda99c7548f"
+ integrity sha512-bAdJv7fBLhWC+/Bls0Oza+mvTaNQtP+1RyhhhvD95pgUJz6XM5IzgmxOkItJ9tkoCiplvAnXI1tNmmUD/eScyA==
+
nanomatch@^1.2.9:
version "1.2.13"
resolved "https://registry.yarnpkg.com/nanomatch/-/nanomatch-1.2.13.tgz#b87a8aa4fc0de8fe6be88895b38983ff265bd119"
@@ -7079,6 +7096,13 @@ node-releases@^1.1.14:
dependencies:
semver "^5.3.0"
+nodejieba@^2.2.1:
+ version "2.3.0"
+ resolved "https://registry.yarnpkg.com/nodejieba/-/nodejieba-2.3.0.tgz#ba6934b949ce486c6a57e4cb7df9f4a5fb3336c4"
+ integrity sha512-ZzLsVuNDlrmcBQa/b8G/yegdXje2iFmktYmPksk6qLha1brKEANYqg4XPiBspF1D0y7Npho91KTmvKFcDr0UdA==
+ dependencies:
+ nan "~2.10.0"
+
[email protected]:
version "1.19.0"
resolved "https://registry.yarnpkg.com/nodemon/-/nodemon-1.19.0.tgz#358e005549a1e9e1148cb2b9b8b28957dc4e4527"
@@ -7664,6 +7688,16 @@ pinkie@^2.0.0:
resolved "https://registry.yarnpkg.com/pinkie/-/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870"
integrity sha1-clVrgM+g1IqXToDnckjoDtT3+HA=
[email protected]:
+ version "2.9.0"
+ resolved "https://registry.yarnpkg.com/pinyin/-/pinyin-2.9.0.tgz#1e77025bf4fafdad4ea410022837b5f97e53aab1"
+ integrity sha512-TZYQ+2uE12arC1EfCeDmN5KgwIOuNMIweOotKvBZdhVOUuQc5RJsGEGf+BaSvxfVtu9ViYEFJmH0xTaj9t4n3Q==
+ dependencies:
+ commander "~1.1.1"
+ object-assign "^4.0.1"
+ optionalDependencies:
+ nodejieba "^2.2.1"
+
pirates@^4.0.1:
version "4.0.1"
resolved "https://registry.yarnpkg.com/pirates/-/pirates-4.0.1.tgz#643a92caf894566f91b2b986d2c66950a8e2fb87"
|
00d6a689d91ff1d921d2359860fe144fba48fec4
|
2022-09-21 19:42:57
|
Ethan Shen
|
feat(route): add web3caff (#10848)
| false
|
add web3caff (#10848)
|
feat
|
diff --git a/docs/new-media.md b/docs/new-media.md
index 89e417bbbcb181..85780767a6b504 100644
--- a/docs/new-media.md
+++ b/docs/new-media.md
@@ -1413,6 +1413,22 @@ Supported sub-sites:
</Route>
+## web3caff
+
+### 发现
+
+<Route author="nczitzk" example="/web3caff" path="/web3caff/:path?" :paramsDesc="['路径,默认为首页']">
+
+::: tip 提示
+
+路径处填写对应页面 URL 中 `https://web3caff.com/` 后的字段。下面是一个例子。
+
+若订阅 [叙事 - Web3Caff](https://web3caff.com/zh/archives/category/news_zh) 则将对应页面 URL <https://web3caff.com/zh/archives/category/news_zh> 中 `https://web3caff.com/` 后的字段 `zh/archives/category/news_zh` 作为路径填入。此时路由为 [`/web3caff/zh/archives/category/news_zh`](https://rsshub.app/web3caff/zh/archives/category/news_zh)
+
+:::
+
+</Route>
+
## World Happiness
### Blog
diff --git a/lib/v2/web3caff/index.js b/lib/v2/web3caff/index.js
new file mode 100644
index 00000000000000..fe9e769a23ccef
--- /dev/null
+++ b/lib/v2/web3caff/index.js
@@ -0,0 +1,63 @@
+const got = require('@/utils/got');
+const cheerio = require('cheerio');
+const { parseDate } = require('@/utils/parse-date');
+
+module.exports = async (ctx) => {
+ const params = ctx.path === '/' ? '' : ctx.path;
+
+ const rootUrl = 'https://web3caff.com';
+ const currentUrl = `${rootUrl}${params}`;
+
+ const response = await got({
+ method: 'get',
+ url: currentUrl,
+ });
+
+ const $ = cheerio.load(response.data);
+
+ let items = $('.list-grouped')
+ .first()
+ .find('.list-body')
+ .slice(0, ctx.query.limit ? parseInt(ctx.query.limit) : 10)
+ .toArray()
+ .map((item) => {
+ item = $(item);
+
+ const a = item.find('.list-title');
+
+ return {
+ title: a.text(),
+ link: a.attr('href'),
+ };
+ });
+
+ items = await Promise.all(
+ items.map((item) =>
+ ctx.cache.tryGet(item.link, async () => {
+ const detailResponse = await got({
+ method: 'get',
+ url: item.link,
+ });
+
+ const content = cheerio.load(detailResponse.data);
+
+ content('.ss-inline-share-wrapper').remove();
+
+ item.description = content('.post-content').html();
+ item.author = content('.author-name .author-popup').text();
+ item.category = content('a[rel="category tag"]')
+ .toArray()
+ .map((tag) => $(tag).text());
+ item.pubDate = parseDate(content('meta[property="article:published_time"]').attr('content'));
+
+ return item;
+ })
+ )
+ );
+
+ ctx.state.data = {
+ title: $('title').text(),
+ link: currentUrl,
+ item: items,
+ };
+};
diff --git a/lib/v2/web3caff/maintainer.js b/lib/v2/web3caff/maintainer.js
new file mode 100644
index 00000000000000..a56b4f486d7d56
--- /dev/null
+++ b/lib/v2/web3caff/maintainer.js
@@ -0,0 +1,3 @@
+module.exports = {
+ '/:path?': ['nczitzk'],
+};
diff --git a/lib/v2/web3caff/radar.js b/lib/v2/web3caff/radar.js
new file mode 100644
index 00000000000000..b370338123952a
--- /dev/null
+++ b/lib/v2/web3caff/radar.js
@@ -0,0 +1,13 @@
+module.exports = {
+ 'web3caff.com': {
+ _name: 'web3caff',
+ '.': [
+ {
+ title: '发现',
+ docs: 'https://docs.rsshub.app/new-media.html#web3caff-fa-xian',
+ source: ['/'],
+ target: (params, url) => `/web3caff${new URL(url).toString().match(/\.com(.*)/)[1]}`,
+ },
+ ],
+ },
+};
diff --git a/lib/v2/web3caff/router.js b/lib/v2/web3caff/router.js
new file mode 100644
index 00000000000000..4063156855136b
--- /dev/null
+++ b/lib/v2/web3caff/router.js
@@ -0,0 +1,3 @@
+module.exports = function (router) {
+ router.get(/([\w-/]+)?/, require('./index'));
+};
|
cdc36d3554789bce4d7e457906f4871f08c11a54
|
2024-02-22 19:20:40
|
Ethan Shen
|
feat(route): add 明月中文网 (#14520)
| false
|
add 明月中文网 (#14520)
|
feat
|
diff --git a/lib/v2/56kog/class.js b/lib/v2/56kog/class.js
new file mode 100644
index 00000000000000..b3e0b678e03f00
--- /dev/null
+++ b/lib/v2/56kog/class.js
@@ -0,0 +1,10 @@
+const { rootUrl, fetchItems } = require('./util');
+
+module.exports = async (ctx) => {
+ const { category = '1_1' } = ctx.params;
+ const limit = ctx.query.limit ? Number.parseInt(ctx.query.limit, 10) : 30;
+
+ const currentUrl = new URL(`class/${category}.html`, rootUrl).href;
+
+ ctx.state.data = await fetchItems(limit, currentUrl, ctx.cache.tryGet);
+};
diff --git a/lib/v2/56kog/maintainer.js b/lib/v2/56kog/maintainer.js
new file mode 100644
index 00000000000000..7ad76cbaa93837
--- /dev/null
+++ b/lib/v2/56kog/maintainer.js
@@ -0,0 +1,4 @@
+module.exports = {
+ '/class/:category?': ['nczitzk'],
+ '/top/:category?': ['nczitzk'],
+};
diff --git a/lib/v2/56kog/radar.js b/lib/v2/56kog/radar.js
new file mode 100644
index 00000000000000..84bac8db175d54
--- /dev/null
+++ b/lib/v2/56kog/radar.js
@@ -0,0 +1,85 @@
+module.exports = {
+ '56kog.com': {
+ _name: '明月中文网',
+ '.': [
+ {
+ title: '玄幻魔法',
+ docs: 'https://docs.rsshub.app/routes/reading#ming-yue-zhong-wen-wang-fen-lei',
+ source: ['/class/1_1.html'],
+ target: '/56kog/class/1_1',
+ },
+ {
+ title: '武侠修真',
+ docs: 'https://docs.rsshub.app/routes/reading#ming-yue-zhong-wen-wang-fen-lei',
+ source: ['/class/2_1.html'],
+ target: '/56kog/class/2_1',
+ },
+ {
+ title: '历史军事',
+ docs: 'https://docs.rsshub.app/routes/reading#ming-yue-zhong-wen-wang-fen-lei',
+ source: ['/class/4_1.html'],
+ target: '/56kog/class/4_1',
+ },
+ {
+ title: '侦探推理',
+ docs: 'https://docs.rsshub.app/routes/reading#ming-yue-zhong-wen-wang-fen-lei',
+ source: ['/class/5_1.html'],
+ target: '/56kog/class/5_1',
+ },
+ {
+ title: '网游动漫',
+ docs: 'https://docs.rsshub.app/routes/reading#ming-yue-zhong-wen-wang-fen-lei',
+ source: ['/class/6_1.html'],
+ target: '/56kog/class/6_1',
+ },
+ {
+ title: '恐怖灵异',
+ docs: 'https://docs.rsshub.app/routes/reading#ming-yue-zhong-wen-wang-fen-lei',
+ source: ['/class/8_1.html'],
+ target: '/56kog/class/8_1',
+ },
+ {
+ title: '都市言情',
+ docs: 'https://docs.rsshub.app/routes/reading#ming-yue-zhong-wen-wang-fen-lei',
+ source: ['/class/3_1.html'],
+ target: '/56kog/class/3_1',
+ },
+ {
+ title: '科幻',
+ docs: 'https://docs.rsshub.app/routes/reading#ming-yue-zhong-wen-wang-fen-lei',
+ source: ['/class/7_1.html'],
+ target: '/56kog/class/7_1',
+ },
+ {
+ title: '女生小说',
+ docs: 'https://docs.rsshub.app/routes/reading#ming-yue-zhong-wen-wang-fen-lei',
+ source: ['/class/9_1.html'],
+ target: '/56kog/class/9_1',
+ },
+ {
+ title: '其他',
+ docs: 'https://docs.rsshub.app/routes/reading#ming-yue-zhong-wen-wang-fen-lei',
+ source: ['/class/10_1.html'],
+ target: '/56kog/class/10_1',
+ },
+ {
+ title: '周点击榜',
+ docs: 'https://docs.rsshub.app/routes/reading#ming-yue-zhong-wen-wang-bang-dan',
+ source: ['/top/weekvisit_1.html'],
+ target: '/56kog/top/weekvisit',
+ },
+ {
+ title: '总收藏榜',
+ docs: 'https://docs.rsshub.app/routes/reading#ming-yue-zhong-wen-wang-bang-dan',
+ source: ['/top/goodnum_1.html'],
+ target: '/56kog/top/goodnum',
+ },
+ {
+ title: '最新入库',
+ docs: 'https://docs.rsshub.app/routes/reading#ming-yue-zhong-wen-wang-bang-dan',
+ source: ['/top/postdate_1.html'],
+ target: '/56kog/top/postdate',
+ },
+ ],
+ },
+};
diff --git a/lib/v2/56kog/router.js b/lib/v2/56kog/router.js
new file mode 100644
index 00000000000000..1ddc3458410f33
--- /dev/null
+++ b/lib/v2/56kog/router.js
@@ -0,0 +1,4 @@
+module.exports = (router) => {
+ router.get('/class/:category?', require('./class'));
+ router.get('/top/:category?', require('./top'));
+};
diff --git a/lib/v2/56kog/templates/description.art b/lib/v2/56kog/templates/description.art
new file mode 100644
index 00000000000000..dccde741aefb60
--- /dev/null
+++ b/lib/v2/56kog/templates/description.art
@@ -0,0 +1,32 @@
+{{ if images }}
+ {{ each images image }}
+ {{ if image?.src }}
+ <figure>
+ <img
+ {{ if image.alt }}
+ alt="{{ image.alt }}"
+ {{ /if }}
+ src="{{ image.src }}">
+ </figure>
+ {{ /if }}
+ {{ /each }}
+{{ /if }}
+
+{{ if details }}
+ <table>
+ <tbody>
+ {{ each details detail }}
+ <tr>
+ <th>{{ detail.label }}</th>
+ <td>
+ {{ if detail.value?.href && detail.value?.text }}
+ <a href="{{ detail.value.href }}">{{ detail.value.text }}</a>
+ {{ else }}
+ {{ detail.value }}
+ {{ /if }}
+ </td>
+ </tr>
+ {{ /each }}
+ </tbody>
+ </table>
+{{ /if }}
\ No newline at end of file
diff --git a/lib/v2/56kog/top.js b/lib/v2/56kog/top.js
new file mode 100644
index 00000000000000..fa90ff4a5750dc
--- /dev/null
+++ b/lib/v2/56kog/top.js
@@ -0,0 +1,10 @@
+const { rootUrl, fetchItems } = require('./util');
+
+module.exports = async (ctx) => {
+ const { category = 'weekvisit' } = ctx.params;
+ const limit = ctx.query.limit ? Number.parseInt(ctx.query.limit, 10) : 30;
+
+ const currentUrl = new URL(`top/${category.split(/_/)[0]}_1.html`, rootUrl).href;
+
+ ctx.state.data = await fetchItems(limit, currentUrl, ctx.cache.tryGet);
+};
diff --git a/lib/v2/56kog/util.js b/lib/v2/56kog/util.js
new file mode 100644
index 00000000000000..bacb4353e743df
--- /dev/null
+++ b/lib/v2/56kog/util.js
@@ -0,0 +1,111 @@
+const got = require('@/utils/got');
+const cheerio = require('cheerio');
+const iconv = require('iconv-lite');
+const timezone = require('@/utils/timezone');
+const { parseDate } = require('@/utils/parse-date');
+const { art } = require('@/utils/render');
+const path = require('path');
+
+const rootUrl = 'https://www.56kog.com';
+
+const fetchItems = async (limit, currentUrl, tryGet) => {
+ const { data: response } = await got(currentUrl, {
+ responseType: 'buffer',
+ });
+
+ const $ = cheerio.load(iconv.decode(response, 'gbk'));
+
+ let items = $('p.line')
+ .toArray()
+ .map((item) => {
+ item = $(item);
+
+ const a = item.find('a');
+
+ return {
+ title: a.text(),
+ link: new URL(a.prop('href'), rootUrl).href,
+ author: item.find('span').last().text(),
+ };
+ });
+
+ items = await Promise.all(
+ items.map((item) =>
+ tryGet(item.link, async () => {
+ try {
+ const { data: detailResponse } = await got(item.link, {
+ responseType: 'buffer',
+ });
+
+ const content = cheerio.load(iconv.decode(detailResponse, 'gbk'));
+
+ const details = content('div.mohe-content p')
+ .toArray()
+ .map((detail) => {
+ detail = content(detail);
+ const as = detail.find('a');
+
+ return {
+ label: detail.find('span.c-l-depths').text().split(/:/)[0],
+ value:
+ as.length === 0
+ ? content(
+ detail
+ .contents()
+ .toArray()
+ .find((c) => c.nodeType === 3)
+ )
+ .text()
+ .trim()
+ : {
+ href: new URL(as.first().prop('href'), rootUrl).href,
+ text: as.first().text().trim(),
+ },
+ };
+ });
+
+ const pubDate = details.find((detail) => detail.label === '更新').value;
+
+ item.title = content('h1').contents().first().text();
+ item.description = art(path.join(__dirname, 'templates/description.art'), {
+ images: [
+ {
+ src: new URL(content('a.mohe-imgs img').prop('src'), rootUrl).href,
+ alt: item.title,
+ },
+ ],
+ details,
+ });
+ item.author = details.find((detail) => detail.label === '作者').value;
+ item.category = [details.find((detail) => detail.label === '状态').value, details.find((detail) => detail.label === '类型').value.text].filter(Boolean);
+ item.guid = `56kog-${item.link.match(/\/(\d+)\.html$/)[1]}#${pubDate}`;
+ item.pubDate = timezone(parseDate(pubDate), +8);
+ } catch {
+ // no-empty
+ }
+
+ return item;
+ })
+ )
+ );
+
+ const icon = new URL('favicon.ico', rootUrl).href;
+
+ return {
+ item: items.filter((item) => item.description).slice(0, limit),
+ title: $('title').text(),
+ link: currentUrl,
+ description: $('meta[name="description"]').prop('content'),
+ language: $('html').prop('lang'),
+ icon,
+ logo: icon,
+ subtitle: $('meta[name="keywords"]').prop('content'),
+ author: $('div.uni_footer a').text(),
+ allowEmpty: true,
+ };
+};
+
+module.exports = {
+ rootUrl,
+ fetchItems,
+};
diff --git a/website/docs/routes/reading.mdx b/website/docs/routes/reading.mdx
index 553f8c2d13ffa2..858142e8646806 100644
--- a/website/docs/routes/reading.mdx
+++ b/website/docs/routes/reading.mdx
@@ -289,6 +289,28 @@
<Route author="misakicoca" path="/linovelib/novel/:id" example="/linovelib/novel/2547" paramsDesc={['小说 id,对应书架开始阅读 URL 中找到']} anticrawler="1" />
+## 明月中文网 {#ming-yue-zhong-wen-wang}
+
+### 分类 {#ming-yue-zhong-wen-wang-fen-lei}
+
+<Route author="nczitzk" example="/56kog/class/1_1" path="/56kog/class/:category?" paramsDesc={['分类,见下表,默认为玄幻魔法']} radar="1">
+ | [玄幻魔法](https://www.56kog.com/class/1_1.html) | [武侠修真](https://www.56kog.com/class/2_1.html) | [历史军事](https://www.56kog.com/class/4_1.html) | [侦探推理](https://www.56kog.com/class/5_1.html) | [网游动漫](https://www.56kog.com/class/6_1.html) |
+ | ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
+ | 1\_1 | 2\_1 | 4\_1 | 5\_1 | 6\_1 |
+
+ | [恐怖灵异](https://www.56kog.com/class/8_1.html) | [都市言情](https://www.56kog.com/class/3_1.html) | [科幻](https://www.56kog.com/class/7_1.html) | [女生小说](https://www.56kog.com/class/9_1.html) | [其他](https://www.56kog.com/class/10_1.html) |
+ | ------------------------------------------------ | ------------------------------------------------ | -------------------------------------------- | ------------------------------------------------ | --------------------------------------------- |
+ | 8\_1 | 3\_1 | 7\_1 | 9\_1 | 10\_1 |
+</Route>
+
+### 榜单 {#ming-yue-zhong-wen-wang-bang-dan}
+
+<Route author="nczitzk" example="/56kog/top/weekvisit" path="/56kog/top/:category?" paramsDesc={['分类,见下表,默认为周点击榜']} radar="1">
+ | [周点击榜](https://www.56kog.com/top/weekvisit.html) | [总收藏榜](https://www.56kog.com/top/goodnum.html) | [最新 入库](https://www.56kog.com/top/postdate.html) |
+ | ---------------------------------------------------- | -------------------------------------------------- | ---------------------------------------------------- |
+ | weekvisit | goodnum | postdate |
+</Route>
+
## 起点 {#qi-dian}
### 章节 {#qi-dian-zhang-jie}
|
935649be9f838ea56e304f7652d1b86649b59107
|
2024-03-06 21:26:33
|
DIYgod
|
feat: replace require with import 2/n
| false
|
replace require with import 2/n
|
feat
|
diff --git a/lib/routes/aijishu/index.ts b/lib/routes/aijishu/index.ts
index 33b4a3af45f3c1..bd0e989f60de82 100644
--- a/lib/routes/aijishu/index.ts
+++ b/lib/routes/aijishu/index.ts
@@ -1,4 +1,4 @@
-const utils = require('./utils');
+import utils from './utils';
import got from '@/utils/got';
import { load } from 'cheerio';
diff --git a/lib/routes/aijishu/utils.ts b/lib/routes/aijishu/utils.ts
index 9cfbbf9cef9ca4..c9f44616c90de8 100644
--- a/lib/routes/aijishu/utils.ts
+++ b/lib/routes/aijishu/utils.ts
@@ -32,4 +32,4 @@ const parseArticle = (item) => {
});
};
-export { parseArticle };
+export default { parseArticle };
diff --git a/lib/routes/bangumi/tv/subject/comments.ts b/lib/routes/bangumi/tv/subject/comments.ts
index cc4190e92780bd..25f8628675c904 100644
--- a/lib/routes/bangumi/tv/subject/comments.ts
+++ b/lib/routes/bangumi/tv/subject/comments.ts
@@ -2,7 +2,7 @@ import got from '@/utils/got';
import { load } from 'cheerio';
import { parseDate, parseRelativeDate } from '@/utils/parse-date';
-module.exports = async (subjectID, minLength) => {
+export default async (subjectID, minLength) => {
// bangumi.tv未提供获取“吐槽(comments)”的API,因此仍需要通过抓取网页来获取
const link = `https://bgm.tv/subject/${subjectID}/comments`;
const { data: html } = await got(link);
diff --git a/lib/routes/bangumi/tv/subject/ep.ts b/lib/routes/bangumi/tv/subject/ep.ts
index d1de13380007cb..616c5f86664bcd 100644
--- a/lib/routes/bangumi/tv/subject/ep.ts
+++ b/lib/routes/bangumi/tv/subject/ep.ts
@@ -7,7 +7,7 @@ import { art } from '@/utils/render';
import * as path from 'node:path';
import { getLocalName } from './utils';
-module.exports = async (subjectID, showOriginalName) => {
+export default async (subjectID, showOriginalName) => {
const url = `https://api.bgm.tv/subject/${subjectID}?responseGroup=large`;
const { data: epsInfo } = await got(url);
const activeEps = [];
diff --git a/lib/routes/bangumi/tv/subject/index.ts b/lib/routes/bangumi/tv/subject/index.ts
index 7289a292b2bffa..218567c1e07273 100644
--- a/lib/routes/bangumi/tv/subject/index.ts
+++ b/lib/routes/bangumi/tv/subject/index.ts
@@ -1,6 +1,6 @@
-const getComments = require('./comments.js');
-const getFromAPI = require('./offcial-subject-api.js');
-const getEps = require('./ep.js');
+import getComments from './comments';
+import getFromAPI from './offcial-subject-api';
+import getEps from './ep';
import { queryToBoolean } from '@/utils/readable-social';
export default async (ctx) => {
diff --git a/lib/routes/bangumi/tv/subject/offcial-subject-api.ts b/lib/routes/bangumi/tv/subject/offcial-subject-api.ts
index 4850fd94601530..3ee1847169bb52 100644
--- a/lib/routes/bangumi/tv/subject/offcial-subject-api.ts
+++ b/lib/routes/bangumi/tv/subject/offcial-subject-api.ts
@@ -2,7 +2,7 @@ import got from '@/utils/got';
import { parseDate } from '@/utils/parse-date';
import { getLocalName } from './utils';
-module.exports = (type) => {
+export default (type) => {
const mapping = {
blog: {
en: 'reviews',
diff --git a/lib/routes/coomer/artist.ts b/lib/routes/coomer/artist.ts
index bfb1aac105c84c..70694836f55754 100644
--- a/lib/routes/coomer/artist.ts
+++ b/lib/routes/coomer/artist.ts
@@ -1,4 +1,4 @@
-const fetchItems = require('./utils');
+import fetchItems from './utils';
export default async (ctx) => {
const id = ctx.req.param('id');
diff --git a/lib/routes/coomer/posts.ts b/lib/routes/coomer/posts.ts
index 4d0fd2d2d133d6..fea1c90982c745 100644
--- a/lib/routes/coomer/posts.ts
+++ b/lib/routes/coomer/posts.ts
@@ -1,4 +1,4 @@
-const fetchItems = require('./utils');
+import fetchItems from './utils';
export default async (ctx) => {
const currentUrl = 'posts';
diff --git a/lib/routes/coomer/utils.ts b/lib/routes/coomer/utils.ts
index 363b4182cc3a75..4d85cd4b56bb91 100644
--- a/lib/routes/coomer/utils.ts
+++ b/lib/routes/coomer/utils.ts
@@ -3,7 +3,7 @@ import got from '@/utils/got';
import { load } from 'cheerio';
import { parseDate } from '@/utils/parse-date';
-module.exports = async (ctx, currentUrl) => {
+export default async (ctx, currentUrl) => {
const rootUrl = 'https://coomer.party';
currentUrl = `${rootUrl}/${currentUrl}`;
diff --git a/lib/routes/dapenti/subject.ts b/lib/routes/dapenti/subject.ts
index f6059dca5cb638..8dec686f97d966 100644
--- a/lib/routes/dapenti/subject.ts
+++ b/lib/routes/dapenti/subject.ts
@@ -1,4 +1,4 @@
-const utils = require('./utils');
+import utils from './utils';
export default async (ctx) => {
ctx.set('data', await utils.parseFeed({ subjectid: ctx.req.param('id') }));
diff --git a/lib/routes/dapenti/tugua.ts b/lib/routes/dapenti/tugua.ts
index 753605c6e2a589..16a76541fc8be4 100644
--- a/lib/routes/dapenti/tugua.ts
+++ b/lib/routes/dapenti/tugua.ts
@@ -1,4 +1,4 @@
-const utils = require('./utils');
+import utils from './utils';
export default async (ctx) => {
ctx.set('data', await utils.parseFeed({ subjectid: 70 }));
diff --git a/lib/routes/dongqiudi/player-news.ts b/lib/routes/dongqiudi/player-news.ts
index d0c979c26c28c1..ad6eade02a7982 100644
--- a/lib/routes/dongqiudi/player-news.ts
+++ b/lib/routes/dongqiudi/player-news.ts
@@ -1,4 +1,4 @@
-const utils = require('./utils');
+import utils from './utils';
export default async (ctx) => {
const playerId = ctx.req.param('id');
diff --git a/lib/routes/dongqiudi/special.ts b/lib/routes/dongqiudi/special.ts
index dffa9a9da9c9f4..0207ef561ad51c 100644
--- a/lib/routes/dongqiudi/special.ts
+++ b/lib/routes/dongqiudi/special.ts
@@ -1,6 +1,6 @@
import cache from '@/utils/cache';
import got from '@/utils/got';
-const utils = require('./utils');
+import utils from './utils';
import { parseDate } from '@/utils/parse-date';
export default async (ctx) => {
diff --git a/lib/routes/dongqiudi/team-news.ts b/lib/routes/dongqiudi/team-news.ts
index 4dcf2d4e24e960..3f8b0f8bc60cdf 100644
--- a/lib/routes/dongqiudi/team-news.ts
+++ b/lib/routes/dongqiudi/team-news.ts
@@ -1,4 +1,4 @@
-const utils = require('./utils');
+import utils from './utils';
export default async (ctx) => {
const teamId = ctx.req.param('team');
diff --git a/lib/routes/dongqiudi/top-news.ts b/lib/routes/dongqiudi/top-news.ts
index b9a0772cc21f72..0e1cbf312bea33 100644
--- a/lib/routes/dongqiudi/top-news.ts
+++ b/lib/routes/dongqiudi/top-news.ts
@@ -1,6 +1,6 @@
import cache from '@/utils/cache';
import got from '@/utils/got';
-const utils = require('./utils');
+import utils from './utils';
import { parseDate } from '@/utils/parse-date';
export default async (ctx) => {
diff --git a/lib/routes/dongqiudi/utils.ts b/lib/routes/dongqiudi/utils.ts
index a0367f8186ba7f..f6f4c47222e8a5 100644
--- a/lib/routes/dongqiudi/utils.ts
+++ b/lib/routes/dongqiudi/utils.ts
@@ -162,4 +162,4 @@ const ProcessFeedType3 = (item, response) => {
}
};
-export { ProcessVideo, ProcessFeed, ProcessFeedType2, ProcessFeedType3, ProcessHref, ProcessImg };
+export default { ProcessVideo, ProcessFeed, ProcessFeedType2, ProcessFeedType3, ProcessHref, ProcessImg };
diff --git a/lib/routes/dribbble/keyword.ts b/lib/routes/dribbble/keyword.ts
index 1763838c80375f..cf6041e0f0bacd 100644
--- a/lib/routes/dribbble/keyword.ts
+++ b/lib/routes/dribbble/keyword.ts
@@ -1,4 +1,4 @@
-const utils = require('./utils');
+import utils from './utils';
export default async (ctx) => {
const keyword = ctx.req.param('keyword');
diff --git a/lib/routes/dribbble/popular.ts b/lib/routes/dribbble/popular.ts
index 16cd6a82a37363..2f3d193f1d2103 100644
--- a/lib/routes/dribbble/popular.ts
+++ b/lib/routes/dribbble/popular.ts
@@ -1,4 +1,4 @@
-const utils = require('./utils');
+import utils from './utils';
export default async (ctx) => {
const timeframe = ctx.req.param('timeframe');
diff --git a/lib/routes/dribbble/user.ts b/lib/routes/dribbble/user.ts
index dda8f68cfbc9b1..9af04e9dd370c5 100644
--- a/lib/routes/dribbble/user.ts
+++ b/lib/routes/dribbble/user.ts
@@ -1,4 +1,4 @@
-const utils = require('./utils');
+import utils from './utils';
export default async (ctx) => {
const name = ctx.req.param('name');
diff --git a/lib/routes/dribbble/utils.ts b/lib/routes/dribbble/utils.ts
index dee1f437dc1392..ef4bcd6601f75a 100644
--- a/lib/routes/dribbble/utils.ts
+++ b/lib/routes/dribbble/utils.ts
@@ -155,4 +155,4 @@ const getData = async (ctx, url, title) => {
};
};
-export { getData };
+export default { getData };
diff --git a/lib/routes/ft/channel.ts b/lib/routes/ft/channel.ts
index 29648a7b88f408..f17655b82d16e5 100644
--- a/lib/routes/ft/channel.ts
+++ b/lib/routes/ft/channel.ts
@@ -1,4 +1,4 @@
-const utils = require('./utils');
+import utils from './utils';
export default async (ctx) => {
ctx.set(
diff --git a/lib/routes/ft/utils.ts b/lib/routes/ft/utils.ts
index 0002484c321977..ce42eb7e8db9df 100644
--- a/lib/routes/ft/utils.ts
+++ b/lib/routes/ft/utils.ts
@@ -87,4 +87,4 @@ const getData = async ({ site = 'www', channel }) => {
};
};
-export { getData };
+export default { getData };
diff --git a/lib/routes/furstar/archive.ts b/lib/routes/furstar/archive.ts
index 48a8b171e59d93..bb26670616ab8c 100644
--- a/lib/routes/furstar/archive.ts
+++ b/lib/routes/furstar/archive.ts
@@ -1,4 +1,4 @@
-const utils = require('./utils');
+import utils from './utils';
import got from '@/utils/got';
import { parseDate } from '@/utils/parse-date';
diff --git a/lib/routes/furstar/artists.ts b/lib/routes/furstar/artists.ts
index 78b25f978b6957..7da98254c4c747 100644
--- a/lib/routes/furstar/artists.ts
+++ b/lib/routes/furstar/artists.ts
@@ -1,4 +1,4 @@
-const utils = require('./utils');
+import utils from './utils';
import { load } from 'cheerio';
import got from '@/utils/got';
import { parseDate } from '@/utils/parse-date';
diff --git a/lib/routes/grubstreet/index.ts b/lib/routes/grubstreet/index.ts
index 56999ef7d99beb..f3ae2d14114d17 100644
--- a/lib/routes/grubstreet/index.ts
+++ b/lib/routes/grubstreet/index.ts
@@ -1,4 +1,4 @@
-const utils = require('./utils');
+import utils from './utils';
export default async (ctx) => {
const url = `https://www.grubstreet.com/_components/newsfeed/instances/grubstreet-index@published`;
diff --git a/lib/routes/grubstreet/utils.ts b/lib/routes/grubstreet/utils.ts
index 31e231387412ee..b86687531fc93d 100644
--- a/lib/routes/grubstreet/utils.ts
+++ b/lib/routes/grubstreet/utils.ts
@@ -80,4 +80,4 @@ const getData = async (ctx, url, title, description) => {
};
};
-export { getData };
+export default { getData };
diff --git a/lib/routes/hafu/news.ts b/lib/routes/hafu/news.ts
index 8f7afd5a37750a..fae6da36e3aac9 100644
--- a/lib/routes/hafu/news.ts
+++ b/lib/routes/hafu/news.ts
@@ -1,4 +1,4 @@
-const parseList = require('./utils');
+import parseList from './utils';
export default async (ctx) => {
// set default router type
diff --git a/lib/routes/hafu/utils.ts b/lib/routes/hafu/utils.ts
index cd393bedf22ff3..fc6ab58876b1f9 100644
--- a/lib/routes/hafu/utils.ts
+++ b/lib/routes/hafu/utils.ts
@@ -17,7 +17,7 @@ const typeMap = {
// Number of get articles
let limit = 10;
-module.exports = async (ctx, type) => {
+export default async (ctx, type) => {
const link = typeMap[type].url;
const title = typeMap[type].title;
diff --git a/lib/routes/hunau/ied.ts b/lib/routes/hunau/ied.ts
index 9803a4b6fe2195..49dd4bbeb0846f 100644
--- a/lib/routes/hunau/ied.ts
+++ b/lib/routes/hunau/ied.ts
@@ -1,4 +1,4 @@
-const getContent = require('./utils/common');
+import getContent from './utils/common';
export default async (ctx) => {
await getContent(ctx, {
diff --git a/lib/routes/hunau/jwc.ts b/lib/routes/hunau/jwc.ts
index 3b1a5762541aa6..6f1c99b38338a4 100644
--- a/lib/routes/hunau/jwc.ts
+++ b/lib/routes/hunau/jwc.ts
@@ -1,4 +1,4 @@
-const getContent = require('./utils/common');
+import getContent from './utils/common';
export default async (ctx) => {
await getContent(ctx, {
diff --git a/lib/routes/hunau/utils/category-title.ts b/lib/routes/hunau/utils/category-title.ts
index c1eb2a3e1c6c5a..48c1e52614e041 100644
--- a/lib/routes/hunau/utils/category-title.ts
+++ b/lib/routes/hunau/utils/category-title.ts
@@ -28,4 +28,4 @@ const categoryTitle = (type) => {
return title;
};
-module.exports = categoryTitle;
+export default categoryTitle;
diff --git a/lib/routes/hunau/utils/common.ts b/lib/routes/hunau/utils/common.ts
index 1c4a6f64ba1cce..41895c35ceccf4 100644
--- a/lib/routes/hunau/utils/common.ts
+++ b/lib/routes/hunau/utils/common.ts
@@ -2,9 +2,9 @@ import cache from '@/utils/cache';
// common.js
import { load } from 'cheerio';
import got from '@/utils/got';
-const categoryTitle = require('./category-title');
-const newsContent = require('./news-content');
-const indexPage = require('./index-page');
+import categoryTitle from './category-title';
+import newsContent from './news-content';
+import indexPage from './index-page';
async function getContent(ctx, { baseHost, baseCategory, baseType, baseTitle, baseDescription = '', baseDeparment = '', baseClass = 'div.article_list ul li:has(a)' }) {
const { category = baseCategory, type = baseType, page = '1' } = ctx.req.param();
@@ -59,4 +59,4 @@ async function getContent(ctx, { baseHost, baseCategory, baseType, baseTitle, ba
});
}
-module.exports = getContent;
+export default getContent;
diff --git a/lib/routes/hunau/utils/index-page.ts b/lib/routes/hunau/utils/index-page.ts
index 11405cb5a5b329..b53e9ed5e0df49 100644
--- a/lib/routes/hunau/utils/index-page.ts
+++ b/lib/routes/hunau/utils/index-page.ts
@@ -7,4 +7,4 @@ const indexPage = (page) => {
return `${fileName}${filePage}.${fileType}`;
};
-module.exports = indexPage;
+export default indexPage;
diff --git a/lib/routes/hunau/utils/news-content.ts b/lib/routes/hunau/utils/news-content.ts
index 815f30a3cb2956..88a6ef11b4373b 100644
--- a/lib/routes/hunau/utils/news-content.ts
+++ b/lib/routes/hunau/utils/news-content.ts
@@ -44,4 +44,4 @@ async function newsContent(link, department = '') {
}
}
-module.exports = newsContent;
+export default newsContent;
diff --git a/lib/routes/javdb/actors.ts b/lib/routes/javdb/actors.ts
index 240999c4068e3a..ab00a8d9ffb176 100644
--- a/lib/routes/javdb/actors.ts
+++ b/lib/routes/javdb/actors.ts
@@ -1,4 +1,4 @@
-const utils = require('./utils');
+import utils from './utils';
export default async (ctx) => {
const id = ctx.req.param('id');
diff --git a/lib/routes/javdb/index.ts b/lib/routes/javdb/index.ts
index 8dbb49c65d4040..18f2964bdaccc8 100644
--- a/lib/routes/javdb/index.ts
+++ b/lib/routes/javdb/index.ts
@@ -1,4 +1,4 @@
-const utils = require('./utils');
+import utils from './utils';
export default async (ctx) => {
const category = ctx.req.param('category') ?? 'censored';
diff --git a/lib/routes/javdb/lists.ts b/lib/routes/javdb/lists.ts
index 454f9c7c6a9152..bfb91337fb6f03 100644
--- a/lib/routes/javdb/lists.ts
+++ b/lib/routes/javdb/lists.ts
@@ -1,4 +1,4 @@
-const utils = require('./utils');
+import utils from './utils';
export default async (ctx) => {
const id = ctx.req.param('id');
diff --git a/lib/routes/javdb/makers.ts b/lib/routes/javdb/makers.ts
index 70e56cdac00245..647bf142c62892 100644
--- a/lib/routes/javdb/makers.ts
+++ b/lib/routes/javdb/makers.ts
@@ -1,4 +1,4 @@
-const utils = require('./utils');
+import utils from './utils';
export default async (ctx) => {
const id = ctx.req.param('id');
diff --git a/lib/routes/javdb/rankings.ts b/lib/routes/javdb/rankings.ts
index 295d44a0c5eb27..81b8a8b6e803f3 100644
--- a/lib/routes/javdb/rankings.ts
+++ b/lib/routes/javdb/rankings.ts
@@ -1,4 +1,4 @@
-const utils = require('./utils');
+import utils from './utils';
export default async (ctx) => {
const category = ctx.req.param('category') ?? 'censored';
diff --git a/lib/routes/javdb/search.ts b/lib/routes/javdb/search.ts
index 9ce1cdeed5ef01..c788786534f6eb 100644
--- a/lib/routes/javdb/search.ts
+++ b/lib/routes/javdb/search.ts
@@ -1,4 +1,4 @@
-const utils = require('./utils');
+import utils from './utils';
export default async (ctx) => {
const filter = ctx.req.param('filter') ?? '';
diff --git a/lib/routes/javdb/series.ts b/lib/routes/javdb/series.ts
index f00c5a571dc670..33f0ccc9b062ff 100644
--- a/lib/routes/javdb/series.ts
+++ b/lib/routes/javdb/series.ts
@@ -1,4 +1,4 @@
-const utils = require('./utils');
+import utils from './utils';
export default async (ctx) => {
const id = ctx.req.param('id');
diff --git a/lib/routes/javdb/tags.ts b/lib/routes/javdb/tags.ts
index a4c75e439b8553..60260d011da7df 100644
--- a/lib/routes/javdb/tags.ts
+++ b/lib/routes/javdb/tags.ts
@@ -1,4 +1,4 @@
-const utils = require('./utils');
+import utils from './utils';
export default async (ctx) => {
const category = ctx.req.param('category') ?? 'censored';
diff --git a/lib/routes/javdb/utils.ts b/lib/routes/javdb/utils.ts
index ec55b0e0e0b9a4..f13b4484557cca 100644
--- a/lib/routes/javdb/utils.ts
+++ b/lib/routes/javdb/utils.ts
@@ -78,4 +78,4 @@ const ProcessItems = async (ctx, currentUrl, title) => {
};
};
-export { ProcessItems };
+export default { ProcessItems };
diff --git a/lib/routes/kuaidi100/index.ts b/lib/routes/kuaidi100/index.ts
index ff8ff1bd4a54e7..255ddc1138c795 100644
--- a/lib/routes/kuaidi100/index.ts
+++ b/lib/routes/kuaidi100/index.ts
@@ -1,4 +1,4 @@
-const utils = require('./utils');
+import utils from './utils';
export default async (ctx) => {
// number is shorthand for company
diff --git a/lib/routes/kuaidi100/supported-company.ts b/lib/routes/kuaidi100/supported-company.ts
index f96dce2a0c7329..149e763a92d2d1 100644
--- a/lib/routes/kuaidi100/supported-company.ts
+++ b/lib/routes/kuaidi100/supported-company.ts
@@ -1,4 +1,4 @@
-const utils = require('./utils');
+import utils from './utils';
export default async (ctx) => {
const ls = await utils.company();
diff --git a/lib/routes/mastodon/account-id.ts b/lib/routes/mastodon/account-id.ts
index 7c2de61db1225f..b35347022f67ca 100644
--- a/lib/routes/mastodon/account-id.ts
+++ b/lib/routes/mastodon/account-id.ts
@@ -1,4 +1,4 @@
-const utils = require('./utils');
+import utils from './utils';
import { config } from '@/config';
export default async (ctx) => {
diff --git a/lib/routes/mastodon/acct.ts b/lib/routes/mastodon/acct.ts
index 57ac3a6a711411..666abc9cd0c969 100644
--- a/lib/routes/mastodon/acct.ts
+++ b/lib/routes/mastodon/acct.ts
@@ -1,4 +1,4 @@
-const utils = require('./utils');
+import utils from './utils';
export default async (ctx) => {
const acct = ctx.req.param('acct');
diff --git a/lib/routes/mastodon/timeline-local.ts b/lib/routes/mastodon/timeline-local.ts
index 96b9eeb2b86609..eb04ca19703bed 100644
--- a/lib/routes/mastodon/timeline-local.ts
+++ b/lib/routes/mastodon/timeline-local.ts
@@ -1,5 +1,5 @@
import got from '@/utils/got';
-const utils = require('./utils');
+import utils from './utils';
import { config } from '@/config';
export default async (ctx) => {
diff --git a/lib/routes/mastodon/timeline-remote.ts b/lib/routes/mastodon/timeline-remote.ts
index 2dc557ccaae80b..03acc54cb988d7 100644
--- a/lib/routes/mastodon/timeline-remote.ts
+++ b/lib/routes/mastodon/timeline-remote.ts
@@ -1,5 +1,5 @@
import got from '@/utils/got';
-const utils = require('./utils');
+import utils from './utils';
import { config } from '@/config';
export default async (ctx) => {
diff --git a/lib/routes/mastodon/utils.ts b/lib/routes/mastodon/utils.ts
index c07d9c7d39a687..d4492f007ad979 100644
--- a/lib/routes/mastodon/utils.ts
+++ b/lib/routes/mastodon/utils.ts
@@ -131,4 +131,4 @@ async function getAccountIdByAcct(acct) {
return { site, account_id };
}
-export { apiHeaders, parseStatuses, getAccountStatuses, getAccountIdByAcct, allowSiteList };
+export default { apiHeaders, parseStatuses, getAccountStatuses, getAccountIdByAcct, allowSiteList };
diff --git a/lib/routes/nua/dc.ts b/lib/routes/nua/dc.ts
index d44419d439cffc..d0db9ac0d1756d 100644
--- a/lib/routes/nua/dc.ts
+++ b/lib/routes/nua/dc.ts
@@ -1,4 +1,4 @@
-const util = require('./utils');
+import util from './utils';
export default async (ctx) => {
const type = ctx.req.param('type');
diff --git a/lib/routes/nua/gra.ts b/lib/routes/nua/gra.ts
index 55433aef508894..8920d4c0ca471c 100644
--- a/lib/routes/nua/gra.ts
+++ b/lib/routes/nua/gra.ts
@@ -1,4 +1,4 @@
-const util = require('./utils');
+import util from './utils';
const baseUrl = 'https://grad.nua.edu.cn';
export default async (ctx) => {
diff --git a/lib/routes/nua/index.ts b/lib/routes/nua/index.ts
index 65448c4ba0df7e..2b2ccda4783894 100644
--- a/lib/routes/nua/index.ts
+++ b/lib/routes/nua/index.ts
@@ -1,4 +1,4 @@
-const util = require('./utils');
+import util from './utils';
export default async (ctx) => {
const type = ctx.req.param('type');
diff --git a/lib/routes/nua/lib.ts b/lib/routes/nua/lib.ts
index 7c36fa37dcaa8d..0f6c14561c5a08 100644
--- a/lib/routes/nua/lib.ts
+++ b/lib/routes/nua/lib.ts
@@ -1,4 +1,4 @@
-const util = require('./utils');
+import util from './utils';
const baseUrl = 'https://lib.nua.edu.cn';
export default async (ctx) => {
diff --git a/lib/routes/nua/sxw.ts b/lib/routes/nua/sxw.ts
index 86956860cd91e9..fd6d5a16385369 100644
--- a/lib/routes/nua/sxw.ts
+++ b/lib/routes/nua/sxw.ts
@@ -1,4 +1,4 @@
-const util = require('./utils');
+import util from './utils';
export default async (ctx) => {
const type = ctx.req.param('type');
diff --git a/lib/routes/nua/utils.ts b/lib/routes/nua/utils.ts
index b007b58d7d441d..dedfc968228b22 100644
--- a/lib/routes/nua/utils.ts
+++ b/lib/routes/nua/utils.ts
@@ -70,4 +70,4 @@ const ProcessFeed = (items, artiContent) =>
)
);
-export { ProcessList, ProcessFeed };
+export default { ProcessList, ProcessFeed };
diff --git a/lib/routes/penguin-random-house/articles.ts b/lib/routes/penguin-random-house/articles.ts
index 100dfd7778b79e..34f7103a135ff3 100644
--- a/lib/routes/penguin-random-house/articles.ts
+++ b/lib/routes/penguin-random-house/articles.ts
@@ -1,4 +1,4 @@
-const utils = require('./utils');
+import utils from './utils';
import { load } from 'cheerio';
import got from '@/utils/got';
diff --git a/lib/routes/penguin-random-house/thereaddown.ts b/lib/routes/penguin-random-house/thereaddown.ts
index 68df88d48e3e8d..95e4920207bea1 100644
--- a/lib/routes/penguin-random-house/thereaddown.ts
+++ b/lib/routes/penguin-random-house/thereaddown.ts
@@ -1,4 +1,4 @@
-const utils = require('./utils');
+import utils from './utils';
import { load } from 'cheerio';
import got from '@/utils/got';
diff --git a/lib/routes/penguin-random-house/utils.ts b/lib/routes/penguin-random-house/utils.ts
index bd0e690ede4f74..7e35d9328e130e 100644
--- a/lib/routes/penguin-random-house/utils.ts
+++ b/lib/routes/penguin-random-house/utils.ts
@@ -116,4 +116,4 @@ const parseList = (items, ctx, contentParser) =>
)
);
-export { parseList, parseBooks, parseArticle };
+export default { parseList, parseBooks, parseArticle };
diff --git a/lib/routes/qq/kg/reply.ts b/lib/routes/qq/kg/reply.ts
index 527c6ad1d3457d..ed29bc9bac4e2a 100644
--- a/lib/routes/qq/kg/reply.ts
+++ b/lib/routes/qq/kg/reply.ts
@@ -1,4 +1,4 @@
-const cache = require('./cache');
+import cache from './cache';
import { parseDate } from '@/utils/parse-date';
export default async (ctx) => {
diff --git a/lib/routes/ruancan/category.ts b/lib/routes/ruancan/category.ts
index 9d3444e4da5cda..e7b48d198f1133 100644
--- a/lib/routes/ruancan/category.ts
+++ b/lib/routes/ruancan/category.ts
@@ -1,4 +1,4 @@
-const fetchFeed = require('./utils');
+import fetchFeed from './utils';
export default async (ctx) => {
const category = ctx.req.param('category');
diff --git a/lib/routes/ruancan/index.ts b/lib/routes/ruancan/index.ts
index 5afc7dc5db3340..1a5a347cf5ed65 100644
--- a/lib/routes/ruancan/index.ts
+++ b/lib/routes/ruancan/index.ts
@@ -1,4 +1,4 @@
-const fetchFeed = require('./utils');
+import fetchFeed from './utils';
export default async (ctx) => {
const currentUrl = '';
diff --git a/lib/routes/ruancan/search.ts b/lib/routes/ruancan/search.ts
index 87e983cff90980..00a871c66efa35 100644
--- a/lib/routes/ruancan/search.ts
+++ b/lib/routes/ruancan/search.ts
@@ -1,4 +1,4 @@
-const fetchFeed = require('./utils');
+import fetchFeed from './utils';
export default async (ctx) => {
const keyword = ctx.req.param('keyword');
diff --git a/lib/routes/ruancan/user.ts b/lib/routes/ruancan/user.ts
index 8eda3f97173108..1be09ad8d413ef 100644
--- a/lib/routes/ruancan/user.ts
+++ b/lib/routes/ruancan/user.ts
@@ -1,4 +1,4 @@
-const fetchFeed = require('./utils');
+import fetchFeed from './utils';
export default async (ctx) => {
const id = ctx.req.param('id');
diff --git a/lib/routes/ruancan/utils.ts b/lib/routes/ruancan/utils.ts
index 3af71a1583af96..07f85acd951ddb 100644
--- a/lib/routes/ruancan/utils.ts
+++ b/lib/routes/ruancan/utils.ts
@@ -3,7 +3,7 @@ import got from '@/utils/got';
import { load } from 'cheerio';
import { parseDate } from '@/utils/parse-date';
-module.exports = async (ctx, currentUrl) => {
+export default async (ctx, currentUrl) => {
const rootUrl = 'https://www.ruancan.com';
currentUrl = `${rootUrl}${currentUrl}`;
diff --git a/lib/routes/sjtu/seiee/academic.ts b/lib/routes/sjtu/seiee/academic.ts
index ea571f1dc15562..e9e323a736e4b6 100644
--- a/lib/routes/sjtu/seiee/academic.ts
+++ b/lib/routes/sjtu/seiee/academic.ts
@@ -1,4 +1,4 @@
-const workerFactory = require('./utils');
+import workerFactory from './utils';
module.exports = workerFactory(
() => ({
diff --git a/lib/routes/sjtu/seiee/bjwb.ts b/lib/routes/sjtu/seiee/bjwb.ts
index 894e013b88b4c9..3500832e693817 100644
--- a/lib/routes/sjtu/seiee/bjwb.ts
+++ b/lib/routes/sjtu/seiee/bjwb.ts
@@ -1,4 +1,4 @@
-const workerFactory = require('./utils');
+import workerFactory from './utils';
module.exports = workerFactory(
(ctx) => {
diff --git a/lib/routes/sjtu/seiee/utils.ts b/lib/routes/sjtu/seiee/utils.ts
index 32eb00ed02d45d..75ce0286949413 100644
--- a/lib/routes/sjtu/seiee/utils.ts
+++ b/lib/routes/sjtu/seiee/utils.ts
@@ -5,7 +5,7 @@ import { parseDate } from '@/utils/parse-date';
const host = 'https://bjwb.seiee.sjtu.edu.cn';
-module.exports = function (meta, extract) {
+export default function (meta, extract) {
return async (ctx) => {
const { title, local, author } = meta(ctx);
@@ -38,4 +38,4 @@ module.exports = function (meta, extract) {
item: out,
});
};
-};
+}
diff --git a/lib/routes/sjtu/seiee/xsb.ts b/lib/routes/sjtu/seiee/xsb.ts
index f0114c3c8f1283..73fc64bd57a8cb 100644
--- a/lib/routes/sjtu/seiee/xsb.ts
+++ b/lib/routes/sjtu/seiee/xsb.ts
@@ -1,4 +1,4 @@
-const workerFactory = require('./utils');
+import workerFactory from './utils';
module.exports = workerFactory(
(ctx) => {
diff --git a/lib/routes/sobooks/date.ts b/lib/routes/sobooks/date.ts
index f4ffd41745c40a..03675b458bf529 100644
--- a/lib/routes/sobooks/date.ts
+++ b/lib/routes/sobooks/date.ts
@@ -1,4 +1,4 @@
-const utils = require('./utils');
+import utils from './utils';
export default async (ctx) => {
const date = ctx.req.param('date') ?? `${new Date().getFullYear()}/${new Date().getMonth()}`;
diff --git a/lib/routes/sobooks/index.ts b/lib/routes/sobooks/index.ts
index d941bb5621fde1..bba1f4b1ad4842 100644
--- a/lib/routes/sobooks/index.ts
+++ b/lib/routes/sobooks/index.ts
@@ -1,4 +1,4 @@
-const utils = require('./utils');
+import utils from './utils';
export default async (ctx) => {
const category = ctx.req.param('category') ?? '';
diff --git a/lib/routes/sobooks/tag.ts b/lib/routes/sobooks/tag.ts
index 06cffbd4aa837f..1d9b35711f64b5 100644
--- a/lib/routes/sobooks/tag.ts
+++ b/lib/routes/sobooks/tag.ts
@@ -1,4 +1,4 @@
-const utils = require('./utils');
+import utils from './utils';
export default async (ctx) => {
const id = ctx.req.param('id') ?? '小说';
diff --git a/lib/routes/sobooks/utils.ts b/lib/routes/sobooks/utils.ts
index aae919a90d907e..b3b6fe60371b4f 100644
--- a/lib/routes/sobooks/utils.ts
+++ b/lib/routes/sobooks/utils.ts
@@ -3,7 +3,7 @@ import got from '@/utils/got';
import { load } from 'cheerio';
import { parseDate } from '@/utils/parse-date';
-module.exports = async (ctx, currentUrl) => {
+export default async (ctx, currentUrl) => {
const rootUrl = 'https://www.sobooks.net';
currentUrl = `${rootUrl}/${currentUrl}`;
const response = await got({
diff --git a/lib/routes/spotify/artist.ts b/lib/routes/spotify/artist.ts
index d9a4140556681e..b4d9625d3d1dec 100644
--- a/lib/routes/spotify/artist.ts
+++ b/lib/routes/spotify/artist.ts
@@ -1,4 +1,4 @@
-const utils = require('./utils');
+import utils from './utils';
import got from '@/utils/got';
import { parseDate } from '@/utils/parse-date';
diff --git a/lib/routes/spotify/artists-top.ts b/lib/routes/spotify/artists-top.ts
index 5480a50b03fb5c..90983d4a431f76 100644
--- a/lib/routes/spotify/artists-top.ts
+++ b/lib/routes/spotify/artists-top.ts
@@ -1,4 +1,4 @@
-const utils = require('./utils');
+import utils from './utils';
import got from '@/utils/got';
export default async (ctx) => {
diff --git a/lib/routes/spotify/playlist.ts b/lib/routes/spotify/playlist.ts
index a69e2e0c7cd318..5e2668a39f14b5 100644
--- a/lib/routes/spotify/playlist.ts
+++ b/lib/routes/spotify/playlist.ts
@@ -1,4 +1,4 @@
-const utils = require('./utils');
+import utils from './utils';
import got from '@/utils/got';
import { parseDate } from '@/utils/parse-date';
diff --git a/lib/routes/spotify/saved.ts b/lib/routes/spotify/saved.ts
index fe2a8c0b13eb3f..6afd65e4f2aea3 100644
--- a/lib/routes/spotify/saved.ts
+++ b/lib/routes/spotify/saved.ts
@@ -1,4 +1,4 @@
-const utils = require('./utils');
+import utils from './utils';
import got from '@/utils/got';
import { parseDate } from '@/utils/parse-date';
diff --git a/lib/routes/spotify/show.ts b/lib/routes/spotify/show.ts
index 32a5fc2bb70f27..0eb684ef689b7a 100644
--- a/lib/routes/spotify/show.ts
+++ b/lib/routes/spotify/show.ts
@@ -1,4 +1,4 @@
-const utils = require('./utils');
+import utils from './utils';
import got from '@/utils/got';
import { parseDate } from '@/utils/parse-date';
diff --git a/lib/routes/spotify/tracks-top.ts b/lib/routes/spotify/tracks-top.ts
index 74eeb224707a31..5bd558d725acbd 100644
--- a/lib/routes/spotify/tracks-top.ts
+++ b/lib/routes/spotify/tracks-top.ts
@@ -1,4 +1,4 @@
-const utils = require('./utils');
+import utils from './utils';
import got from '@/utils/got';
export default async (ctx) => {
diff --git a/lib/routes/spotify/utils.ts b/lib/routes/spotify/utils.ts
index bed3d4625c6214..919304677b224a 100644
--- a/lib/routes/spotify/utils.ts
+++ b/lib/routes/spotify/utils.ts
@@ -54,4 +54,4 @@ const parseTrack = (x) => ({
const parseArtist = (x) => ({ title: x.name, description: `${x.name}, with ${x.followers.total} followers`, link: x.external_urls.spotify });
-export { getPublicToken, getPrivateToken, parseTrack, parseArtist };
+export default { getPublicToken, getPrivateToken, parseTrack, parseArtist };
diff --git a/lib/routes/thepaper/channel.ts b/lib/routes/thepaper/channel.ts
index 52c8caccdadbf4..d8c6694c6e0f32 100644
--- a/lib/routes/thepaper/channel.ts
+++ b/lib/routes/thepaper/channel.ts
@@ -1,4 +1,4 @@
-const utils = require('./utils');
+import utils from './utils';
import { load } from 'cheerio';
import got from '@/utils/got';
diff --git a/lib/routes/thepaper/featured.ts b/lib/routes/thepaper/featured.ts
index f0e507a50d3bb8..3cd1bf0145a7d9 100644
--- a/lib/routes/thepaper/featured.ts
+++ b/lib/routes/thepaper/featured.ts
@@ -1,4 +1,4 @@
-const utils = require('./utils');
+import utils from './utils';
import { load } from 'cheerio';
import got from '@/utils/got';
diff --git a/lib/routes/thepaper/list.ts b/lib/routes/thepaper/list.ts
index e784565bd9aaaf..fc0915e551af89 100644
--- a/lib/routes/thepaper/list.ts
+++ b/lib/routes/thepaper/list.ts
@@ -1,4 +1,4 @@
-const utils = require('./utils');
+import utils from './utils';
import { load } from 'cheerio';
import got from '@/utils/got';
diff --git a/lib/routes/thepaper/sidebar.ts b/lib/routes/thepaper/sidebar.ts
index 01998a0ec6589a..e89a20b968fe96 100644
--- a/lib/routes/thepaper/sidebar.ts
+++ b/lib/routes/thepaper/sidebar.ts
@@ -1,4 +1,4 @@
-const utils = require('./utils');
+import utils from './utils';
import got from '@/utils/got';
const sections = {
diff --git a/lib/routes/twitter/collection.ts b/lib/routes/twitter/collection.ts
index 8aebe839054da6..bd935f8f39fe16 100644
--- a/lib/routes/twitter/collection.ts
+++ b/lib/routes/twitter/collection.ts
@@ -1,4 +1,4 @@
-const utils = require('./utils');
+import utils from './utils';
import { config } from '@/config';
const T = {};
const { TwitterApi } = require('twitter-api-v2');
diff --git a/lib/routes/twitter/followings.ts b/lib/routes/twitter/followings.ts
index 0658836e37187c..760b613e434cce 100644
--- a/lib/routes/twitter/followings.ts
+++ b/lib/routes/twitter/followings.ts
@@ -1,4 +1,4 @@
-const utils = require('./utils');
+import utils from './utils';
import { config } from '@/config';
const T = {};
const { TwitterApi } = require('twitter-api-v2');
diff --git a/lib/routes/twitter/likes.ts b/lib/routes/twitter/likes.ts
index ec162b8ffe95ca..2ca9520233a511 100644
--- a/lib/routes/twitter/likes.ts
+++ b/lib/routes/twitter/likes.ts
@@ -1,4 +1,4 @@
-const utils = require('./utils');
+import utils from './utils';
import { config } from '@/config';
export default async (ctx) => {
diff --git a/lib/routes/twitter/trends.ts b/lib/routes/twitter/trends.ts
index 10a03c2171104b..bd068e9ee6e62b 100644
--- a/lib/routes/twitter/trends.ts
+++ b/lib/routes/twitter/trends.ts
@@ -1,4 +1,4 @@
-const utils = require('./utils');
+import utils from './utils';
import { config } from '@/config';
export default async (ctx) => {
diff --git a/lib/routes/twitter/utils.ts b/lib/routes/twitter/utils.ts
index d4260aa27d1377..30fbf810c353c0 100644
--- a/lib/routes/twitter/utils.ts
+++ b/lib/routes/twitter/utils.ts
@@ -474,4 +474,4 @@ const parseRouteParams = (routeParams) => {
return { count, exclude_replies, include_rts, force_web_api };
};
-export { ProcessFeed, getAppClient, parseRouteParams };
+export default { ProcessFeed, getAppClient, parseRouteParams };
|
a213bf79815040e6e1afb45d9aa316699eb8696e
|
2024-06-25 17:49:49
|
dependabot[bot]
|
chore(deps): bump @scalar/hono-api-reference from 0.5.77 to 0.5.78 (#15986)
| false
|
bump @scalar/hono-api-reference from 0.5.77 to 0.5.78 (#15986)
|
chore
|
diff --git a/package.json b/package.json
index d108dccbd18cd9..c09389a29fb341 100644
--- a/package.json
+++ b/package.json
@@ -54,7 +54,7 @@
"@hono/zod-openapi": "0.14.5",
"@notionhq/client": "2.2.15",
"@postlight/parser": "2.2.3",
- "@scalar/hono-api-reference": "0.5.77",
+ "@scalar/hono-api-reference": "0.5.78",
"@sentry/node": "7.116.0",
"@tonyrl/rand-user-agent": "2.0.69",
"aes-js": "3.1.2",
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 5f56316caaf4d8..59bfd53b162868 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -21,8 +21,8 @@ importers:
specifier: 2.2.3
version: 2.2.3
'@scalar/hono-api-reference':
- specifier: 0.5.77
- version: 0.5.77([email protected])([email protected])([email protected])([email protected](@types/[email protected])([email protected]([email protected])([email protected])))
+ specifier: 0.5.78
+ version: 0.5.78([email protected])([email protected])([email protected])([email protected](@types/[email protected])([email protected]([email protected])([email protected])))
'@sentry/node':
specifier: 7.116.0
version: 7.116.0
@@ -1569,40 +1569,40 @@ packages:
cpu: [x64]
os: [win32]
- '@scalar/[email protected]':
- resolution: {integrity: sha512-v8YGy8dUomuUGPaqlzgcd+b7TlRT76O/yavGwpSbgROLDxwYkaPZRNSIdTA0jJGguscvcCd5fJWtHAvE6L9Ssw==}
+ '@scalar/[email protected]':
+ resolution: {integrity: sha512-UjZ6fj3A8bQeQEhMOkOoXnsL7M4YpDJ1TJ1qh00j0AZ+ds0LoKEHbuzI3Gy78SpljskV3SQcdUf2NQUXzVulNQ==}
engines: {node: '>=18'}
- '@scalar/[email protected]':
- resolution: {integrity: sha512-Q4hkPfiEAyZPzLfg8VgpIPxjFT+9s0vS9e0vaRR9SZgJ6kxQ2AEFNSjrcwazTQ/F5IPQzeQNFLj/OLn7s9CwSA==}
+ '@scalar/[email protected]':
+ resolution: {integrity: sha512-q9i/8UcUoWMl0/Cl7Jylt24w4LIGWujGoYw4E9s+B1xNehSDmY5uku1O1vHzZR4wxABGr4yOSz2fhN1zhiGzeQ==}
engines: {node: '>=18'}
- '@scalar/[email protected]':
- resolution: {integrity: sha512-OIngEQx9yGAQ2mVi8+FlcfS0BhZPC5mbzBxEfDlHkZjKANc/Uw9CUf7bnyWuTpBnqAvsM5xZg/tJcT+/I6p1QA==}
+ '@scalar/[email protected]':
+ resolution: {integrity: sha512-BZ1/8V6yXyOQxRqv0RznauHM1op45HR13OGWB+chK3cxbL4ckwcPE+HsyHThqhmEsIr81T+gPEHfh/iltO9B0g==}
engines: {node: '>=18'}
- '@scalar/[email protected]':
- resolution: {integrity: sha512-yUaVGFr8mMhUHNCnn+po1Rsv4atAXe6V9MpZE6F+y9aHfiSm0PqKitPs++JpxxC2q16VU2KYLnvAc4t7MxXNuQ==}
+ '@scalar/[email protected]':
+ resolution: {integrity: sha512-O2BKPzpsjyHtudkSF/jY6KXZc2b6+TsAj0+O64us6KKSRjnNDEW+uzXO5L5xKMNk/0DUdiDmowjE881bcI6G5A==}
engines: {node: '>=18'}
'@scalar/[email protected]':
resolution: {integrity: sha512-BRSIM787nQ05aZYqDs/dPI3DMJn62ioD8iFr7tYcdWXNNH7lcsXxCddW2hL3xlpJR8lc70rebRVhg5nDqyVqaA==}
engines: {node: '>=18'}
- '@scalar/[email protected]':
- resolution: {integrity: sha512-SxFJQ59jzeJnY6L7Di7IvMwR2S5ASaZPYTd+jK36FlP9DietGOCayWIcjCtbEDLhqHRFUvonb68qdBNmtZkOyQ==}
+ '@scalar/[email protected]':
+ resolution: {integrity: sha512-ydy5AIihYwz/1qBB4tkRYewWIXBPrMk9PJnee32VX3v8w4Gb+K4EFaeA4RKwHb8GYC65k8DA9v1zAxuXaDzkJA==}
engines: {node: '>=18'}
'@scalar/[email protected]':
resolution: {integrity: sha512-fcQMzJDWNCJkKxiua20LiZB0J3rkEANVdCX+2+z4x2uEpmRcQx3TqT2/aETs9OmNqr/jlNMtSubUqAgBnDpc/A==}
engines: {node: '>=18'}
- '@scalar/[email protected]':
- resolution: {integrity: sha512-SypiZst89mXfbVGRKl2PXtM3fLpKBoSfistz5Cpm/cwl2L6zfNYYbqrd/gsnYgkjIn891a6G8qH3k6obnzBfeA==}
+ '@scalar/[email protected]':
+ resolution: {integrity: sha512-dm8IBdEpHG/OZY8mmayQ0C+QXmbXLnVHiu3r+2N9qeWfYNc4p79VsvF/BwkbdZHIQGRZNk/VeT8EHFLB/5oh2Q==}
engines: {node: '>=18'}
- '@scalar/[email protected]':
- resolution: {integrity: sha512-3cS88eNtds38LR3hZrG6ztY7Z8yb5YG2B4AMG2gLSXeGKUKNM1V1Me6jdAHoKEXbM/nMIYTqsXM3Y08D5Ttd+g==}
+ '@scalar/[email protected]':
+ resolution: {integrity: sha512-0iOeD9L//lUBdcBGXgBIeZqc1IlasXSwSvwp2jLOLKUrcwCWGElBSfKHkg+9gHYFJorP55wWVmhAQOAXywyy2w==}
engines: {node: '>=18'}
'@scalar/[email protected]':
@@ -8084,11 +8084,11 @@ snapshots:
'@rollup/[email protected]':
optional: true
- '@scalar/[email protected]([email protected])([email protected])([email protected](@types/[email protected])([email protected]([email protected])([email protected])))':
+ '@scalar/[email protected]([email protected])([email protected])([email protected](@types/[email protected])([email protected]([email protected])([email protected])))':
dependencies:
- '@scalar/client-app': 0.1.10([email protected])([email protected])([email protected](@types/[email protected])([email protected]([email protected])([email protected])))
- '@scalar/components': 0.12.0([email protected])([email protected](@types/[email protected])([email protected]([email protected])([email protected])))
- '@scalar/oas-utils': 0.2.3
+ '@scalar/client-app': 0.1.11([email protected])([email protected])([email protected](@types/[email protected])([email protected]([email protected])([email protected])))
+ '@scalar/components': 0.12.1([email protected])([email protected](@types/[email protected])([email protected]([email protected])([email protected])))
+ '@scalar/oas-utils': 0.2.4
vue: 3.4.30([email protected])
vue-router: 4.4.0([email protected]([email protected]))
transitivePeerDependencies:
@@ -8103,12 +8103,12 @@ snapshots:
- typescript
- vitest
- '@scalar/[email protected]([email protected])([email protected](@types/[email protected])([email protected]([email protected])([email protected])))':
+ '@scalar/[email protected]([email protected])([email protected](@types/[email protected])([email protected]([email protected])([email protected])))':
dependencies:
'@floating-ui/vue': 1.0.7([email protected]([email protected]))
'@headlessui/vue': 1.7.22([email protected]([email protected]))
- '@scalar/components': 0.12.0([email protected])([email protected](@types/[email protected])([email protected]([email protected])([email protected])))
- '@scalar/oas-utils': 0.2.3
+ '@scalar/components': 0.12.1([email protected])([email protected](@types/[email protected])([email protected]([email protected])([email protected])))
+ '@scalar/oas-utils': 0.2.4
'@scalar/openapi-parser': 0.7.1
'@scalar/themes': 0.9.5([email protected])
'@scalar/use-codemirror': 0.11.2([email protected])
@@ -8132,13 +8132,13 @@ snapshots:
- typescript
- vitest
- '@scalar/[email protected]([email protected])([email protected])([email protected])([email protected](@types/[email protected])([email protected]([email protected])([email protected])))':
+ '@scalar/[email protected]([email protected])([email protected])([email protected])([email protected](@types/[email protected])([email protected]([email protected])([email protected])))':
dependencies:
'@headlessui/vue': 1.7.22([email protected]([email protected]))
- '@scalar/api-client': 1.3.15([email protected])([email protected](@types/[email protected])([email protected]([email protected])([email protected])))
- '@scalar/api-client-modal': 0.0.12([email protected])([email protected])([email protected](@types/[email protected])([email protected]([email protected])([email protected])))
- '@scalar/components': 0.12.0([email protected])([email protected](@types/[email protected])([email protected]([email protected])([email protected])))
- '@scalar/oas-utils': 0.2.3
+ '@scalar/api-client': 1.3.16([email protected])([email protected](@types/[email protected])([email protected]([email protected])([email protected])))
+ '@scalar/api-client-modal': 0.0.13([email protected])([email protected])([email protected](@types/[email protected])([email protected]([email protected])([email protected])))
+ '@scalar/components': 0.12.1([email protected])([email protected](@types/[email protected])([email protected]([email protected])([email protected])))
+ '@scalar/oas-utils': 0.2.4
'@scalar/openapi-parser': 0.7.1
'@scalar/snippetz': 0.1.6
'@scalar/themes': 0.9.5([email protected])
@@ -8168,13 +8168,13 @@ snapshots:
- typescript
- vitest
- '@scalar/[email protected]([email protected])([email protected])([email protected](@types/[email protected])([email protected]([email protected])([email protected])))':
+ '@scalar/[email protected]([email protected])([email protected])([email protected](@types/[email protected])([email protected]([email protected])([email protected])))':
dependencies:
'@headlessui/tailwindcss': 0.2.1([email protected])
'@headlessui/vue': 1.7.22([email protected]([email protected]))
- '@scalar/components': 0.12.0([email protected])([email protected](@types/[email protected])([email protected]([email protected])([email protected])))
+ '@scalar/components': 0.12.1([email protected])([email protected](@types/[email protected])([email protected]([email protected])([email protected])))
'@scalar/draggable': 0.1.2([email protected])
- '@scalar/oas-utils': 0.2.3
+ '@scalar/oas-utils': 0.2.4
'@scalar/object-utils': 1.1.1
'@scalar/openapi-parser': 0.7.1
'@scalar/use-toasts': 0.7.2([email protected])
@@ -8222,13 +8222,13 @@ snapshots:
transitivePeerDependencies:
- supports-color
- '@scalar/[email protected]([email protected])([email protected](@types/[email protected])([email protected]([email protected])([email protected])))':
+ '@scalar/[email protected]([email protected])([email protected](@types/[email protected])([email protected]([email protected])([email protected])))':
dependencies:
'@floating-ui/utils': 0.2.3
'@floating-ui/vue': 1.0.7([email protected]([email protected]))
'@headlessui/vue': 1.7.22([email protected]([email protected]))
'@scalar/code-highlight': 0.0.4
- '@scalar/oas-utils': 0.2.3
+ '@scalar/oas-utils': 0.2.4
'@storybook/test': 8.1.10([email protected](@types/[email protected])([email protected]([email protected])([email protected])))
'@vueuse/core': 10.11.0([email protected]([email protected]))
cva: 1.0.0-beta.1([email protected])
@@ -8253,9 +8253,9 @@ snapshots:
transitivePeerDependencies:
- typescript
- '@scalar/[email protected]([email protected])([email protected])([email protected])([email protected](@types/[email protected])([email protected]([email protected])([email protected])))':
+ '@scalar/[email protected]([email protected])([email protected])([email protected])([email protected](@types/[email protected])([email protected]([email protected])([email protected])))':
dependencies:
- '@scalar/api-reference': 1.24.16([email protected])([email protected])([email protected])([email protected](@types/[email protected])([email protected]([email protected])([email protected])))
+ '@scalar/api-reference': 1.24.17([email protected])([email protected])([email protected])([email protected](@types/[email protected])([email protected]([email protected])([email protected])))
hono: 4.4.8
transitivePeerDependencies:
- '@jest/globals'
@@ -8270,7 +8270,7 @@ snapshots:
- typescript
- vitest
- '@scalar/[email protected]':
+ '@scalar/[email protected]':
dependencies:
axios: 1.7.2
nanoid: 5.0.7
|
eae077c58cdcbb6d9db7093a600a5bdff6082df3
|
2020-02-01 14:48:10
|
Kyouya
|
feat: Add 南京林业大学教务处 (#3836)
| false
|
Add 南京林业大学教务处 (#3836)
|
feat
|
diff --git a/docs/university.md b/docs/university.md
index 0477d718767747..f4b9faff56a056 100644
--- a/docs/university.md
+++ b/docs/university.md
@@ -606,6 +606,18 @@ category 列表:
</Route>
+## 南京林业大学
+
+### 教务处
+
+<Route author="kiusiudeng" example="/njfu/jwc/1798" path="/universities/njfu/jwc/:category?" :paramsDesc="['省略则默认为1799']">
+
+| 校级发文 | 通知公告 | 上级发文 | 下载专区 |
+| -------- | -------- | -------- | -------- |
+| 1798 | 1799 | 2270 | 1797 |
+
+</Route>
+
## 南京信息工程大学
::: tip 提示
diff --git a/lib/router.js b/lib/router.js
index 84da151295706d..1508cf3110986e 100644
--- a/lib/router.js
+++ b/lib/router.js
@@ -2161,6 +2161,9 @@ router.get('/coronavirus/dxy', require('./routes/coronavirus/dxy'));
router.get('/coronavirus/scmp', require('./routes/coronavirus/scmp'));
router.get('/coronavirus/nhc', require('./routes/coronavirus/nhc'));
+// 南京林业大学教务处
+router.get('/njfu/jwc/:category?', require('./routes/universities/njfu/jwc'));
+
// 日本経済新聞
router.get('/nikkei/index', require('./routes/nikkei/index'));
diff --git a/lib/routes/universities/njfu/jwc.js b/lib/routes/universities/njfu/jwc.js
new file mode 100644
index 00000000000000..cf88bc6d159656
--- /dev/null
+++ b/lib/routes/universities/njfu/jwc.js
@@ -0,0 +1,44 @@
+const got = require('@/utils/got');
+const cheerio = require('cheerio');
+
+const url = 'http://jwc.njfu.edu.cn//c';
+const map = {
+ 1798: '校级发文',
+ 1799: '通知公告',
+ 2270: '上级发文',
+ 1797: '下载专区',
+};
+
+module.exports = async (ctx) => {
+ const category = map.hasOwnProperty(ctx.params.category) ? ctx.params.category : 1799;
+ const response = await got({
+ method: 'get',
+ url: url + category + '/index.html',
+ });
+
+ const $ = cheerio.load(response.data);
+ const list = $('.List_R4');
+
+ ctx.state.data = {
+ title: '南京林业大学教务处-' + map[category],
+ link: url + category + '/index.html',
+ description: '南京林业大学教务处-' + map[category] + 'Rss源',
+ item: list
+ .map((index, item) => ({
+ title: $(item)
+ .find('a')
+ .attr('title'),
+ description: $(item)
+ .find('a')
+ .attr('title'),
+ pubDate: $(item)
+ .find('.List_R4_R')
+ .text()
+ .replace(/\[|]/g, ''),
+ link: $(item)
+ .find('a')
+ .attr('href'),
+ }))
+ .get(),
+ };
+};
|
1114f7e1573b938a15884144b95bd0069aa7b494
|
2023-10-12 18:41:08
|
hoilc
|
feat(route): add twitch (#13464)
| false
|
add twitch (#13464)
|
feat
|
diff --git a/lib/v2/twitch/live.js b/lib/v2/twitch/live.js
new file mode 100644
index 00000000000000..928a8c3f42dd83
--- /dev/null
+++ b/lib/v2/twitch/live.js
@@ -0,0 +1,88 @@
+const got = require('@/utils/got');
+const { parseDate } = require('@/utils/parse-date');
+
+// https://github.com/streamlink/streamlink/blob/master/src/streamlink/plugins/twitch.py#L286
+const TWITCH_CLIENT_ID = 'kimne78kx3ncx6brgo4mv6wki5h1ko';
+
+module.exports = async (ctx) => {
+ const { login } = ctx.params;
+
+ const response = await got({
+ method: 'post',
+ url: 'https://gql.twitch.tv/gql',
+ headers: {
+ Referer: 'https://player.twitch.tv',
+ 'Client-ID': TWITCH_CLIENT_ID,
+ },
+ json: [
+ {
+ operationName: 'ChannelShell',
+ extensions: {
+ persistedQuery: {
+ version: 1,
+ sha256Hash: 'c3ea5a669ec074a58df5c11ce3c27093fa38534c94286dc14b68a25d5adcbf55',
+ },
+ },
+ variables: {
+ login,
+ lcpVideosEnabled: false,
+ },
+ },
+ {
+ operationName: 'StreamMetadata',
+ extensions: {
+ persistedQuery: {
+ version: 1,
+ sha256Hash: '059c4653b788f5bdb2f5a2d2a24b0ddc3831a15079001a3d927556a96fb0517f',
+ },
+ },
+ variables: {
+ channelLogin: login,
+ },
+ },
+ {
+ operationName: 'RealtimeStreamTagList',
+ extensions: {
+ persistedQuery: {
+ version: 1,
+ sha256Hash: 'a4747cac9d8e8bf6cf80969f6da6363ca1bdbd80fe136797e71504eb404313fd',
+ },
+ },
+ variables: {
+ channelLogin: login,
+ },
+ },
+ ],
+ });
+
+ const channelShellData = response.data[0].data;
+ const streamMetadataData = response.data[1].data;
+ const realtimeStreamTagListData = response.data[2].data;
+
+ if (!channelShellData.userOrError.id) {
+ throw Error(channelShellData.userOrError.__typename);
+ }
+
+ const displayName = channelShellData.userOrError.displayName;
+
+ const liveItem = [];
+
+ if (streamMetadataData.user.stream) {
+ liveItem.push({
+ title: streamMetadataData.user.lastBroadcast.title,
+ author: displayName,
+ category: realtimeStreamTagListData.user.stream.freeformTags.map((item) => item.name),
+ description: `<img style="max-width: 100%;" src="https://static-cdn.jtvnw.net/previews-ttv/live_user_${login}.jpg">`,
+ pubDate: parseDate(streamMetadataData.user.stream.createdAt),
+ guid: streamMetadataData.user.stream.id,
+ link: `https://www.twitch.tv/${login}`,
+ });
+ }
+
+ ctx.state.data = {
+ title: `Twitch - ${displayName} - Live`,
+ link: `https://www.twitch.tv/${login}`,
+ item: liveItem,
+ allowEmpty: true,
+ };
+};
diff --git a/lib/v2/twitch/maintainer.js b/lib/v2/twitch/maintainer.js
new file mode 100644
index 00000000000000..a83f7f7f4962df
--- /dev/null
+++ b/lib/v2/twitch/maintainer.js
@@ -0,0 +1,5 @@
+module.exports = {
+ '/live/:login': ['hoilc'],
+ '/video/:login/:filter?': ['hoilc'],
+ '/schedule/:login': ['hoilc'],
+};
diff --git a/lib/v2/twitch/radar.js b/lib/v2/twitch/radar.js
new file mode 100644
index 00000000000000..9f600ea220628a
--- /dev/null
+++ b/lib/v2/twitch/radar.js
@@ -0,0 +1,37 @@
+module.exports = {
+ 'twitch.tv': {
+ _name: 'Twitch',
+ www: [
+ {
+ title: 'Live',
+ docs: 'https://docs.rsshub.app/routes/live#twitch-live',
+ source: '/:login',
+ target: (params) => {
+ if (
+ params.login !== 'directory' &&
+ params.login !== 'downloads' &&
+ params.login !== 'store' &&
+ params.login !== 'turbo' &&
+ params.login !== 'search' &&
+ params.login !== 'subscriptions' &&
+ params.login !== 'wallet'
+ ) {
+ return '/twitch/live/:login';
+ }
+ },
+ },
+ {
+ title: 'Channel Video',
+ docs: 'https://docs.rsshub.app/routes/live#twitch-channel-video',
+ source: '/:login/videos',
+ target: '/twitch/video/:login',
+ },
+ {
+ title: 'Stream Schedule',
+ docs: 'https://docs.rsshub.app/routes/live#twitch-stream-schedule',
+ source: '/:login/schedule',
+ target: '/twitch/schedule/:login',
+ },
+ ],
+ },
+};
diff --git a/lib/v2/twitch/router.js b/lib/v2/twitch/router.js
new file mode 100644
index 00000000000000..5a93b0cef64a77
--- /dev/null
+++ b/lib/v2/twitch/router.js
@@ -0,0 +1,5 @@
+module.exports = (router) => {
+ router.get('/live/:login', require('./live'));
+ router.get('/video/:login/:filter?', require('./video'));
+ router.get('/schedule/:login', require('./schedule'));
+};
diff --git a/lib/v2/twitch/schedule.js b/lib/v2/twitch/schedule.js
new file mode 100644
index 00000000000000..21345e196f5409
--- /dev/null
+++ b/lib/v2/twitch/schedule.js
@@ -0,0 +1,75 @@
+const got = require('@/utils/got');
+
+// https://github.com/streamlink/streamlink/blob/master/src/streamlink/plugins/twitch.py#L286
+const TWITCH_CLIENT_ID = 'kimne78kx3ncx6brgo4mv6wki5h1ko';
+
+module.exports = async (ctx) => {
+ const { login } = ctx.params;
+
+ const today = new Date();
+ const oneWeekLater = new Date(today.getTime() + 86400000 * 7);
+ const response = await got({
+ method: 'post',
+ url: 'https://gql.twitch.tv/gql',
+ headers: {
+ Referer: 'https://player.twitch.tv',
+ 'Client-ID': TWITCH_CLIENT_ID,
+ },
+ json: [
+ {
+ operationName: 'ChannelShell',
+ extensions: {
+ persistedQuery: {
+ version: 1,
+ sha256Hash: 'c3ea5a669ec074a58df5c11ce3c27093fa38534c94286dc14b68a25d5adcbf55',
+ },
+ },
+ variables: {
+ login,
+ lcpVideosEnabled: false,
+ },
+ },
+ {
+ operationName: 'StreamSchedule',
+ variables: {
+ login,
+ startingWeekday: 'MONDAY',
+ utcOffsetMinutes: 480,
+ startAt: today.toISOString(),
+ endAt: oneWeekLater.toISOString(),
+ },
+ extensions: {
+ persistedQuery: {
+ version: 1,
+ sha256Hash: '01925339777a81111ffac469430bc4ea4773c18a3c1642f1b231e61e2278ea41',
+ },
+ },
+ },
+ ],
+ });
+
+ const channelShellData = response.data[0].data;
+ const streamScheduleData = response.data[1].data;
+
+ if (!streamScheduleData.user.id) {
+ throw Error(`Username does not exist`);
+ }
+
+ const displayName = channelShellData.userOrError.displayName;
+
+ const out = streamScheduleData.user.channel.schedule.segments.map((item) => ({
+ title: item.title,
+ guid: item.id,
+ link: `https://www.twitch.tv/${login}`,
+ author: displayName,
+ description: `StartAt: ${item.startAt}</br>EndAt: ${item.endAt}`,
+ category: item.categories.map((item) => item.name),
+ }));
+
+ ctx.state.data = {
+ title: `Twitch - ${displayName} - Schedule`,
+ link: `https://www.twitch.tv/${login}`,
+ item: out,
+ allowEmpty: true,
+ };
+};
diff --git a/lib/v2/twitch/video.js b/lib/v2/twitch/video.js
new file mode 100644
index 00000000000000..d552077d98c815
--- /dev/null
+++ b/lib/v2/twitch/video.js
@@ -0,0 +1,64 @@
+const got = require('@/utils/got');
+const { parseDate } = require('@/utils/parse-date');
+
+// https://github.com/streamlink/streamlink/blob/master/src/streamlink/plugins/twitch.py#L286
+const TWITCH_CLIENT_ID = 'kimne78kx3ncx6brgo4mv6wki5h1ko';
+
+const FILTER_CURSOR_MAP = {
+ archive: 0,
+ highlights: 1,
+ all: 2,
+};
+
+module.exports = async (ctx) => {
+ const { login, filter = 'all' } = ctx.params;
+
+ const response = await got({
+ method: 'post',
+ url: 'https://gql.twitch.tv/gql',
+ headers: {
+ Referer: 'https://player.twitch.tv',
+ 'Client-ID': TWITCH_CLIENT_ID,
+ },
+ json: [
+ {
+ operationName: 'ChannelVideoShelvesQuery',
+ variables: {
+ channelLogin: login,
+ first: 5,
+ },
+ extensions: {
+ persistedQuery: {
+ version: 1,
+ sha256Hash: '7b31d8ae7274b79d169a504e3727baaaed0d5ede101f4a38fc44f34d76827903',
+ },
+ },
+ },
+ ],
+ });
+
+ const channelVideoShelvesQueryData = response.data[0].data;
+
+ if (!channelVideoShelvesQueryData.user.id) {
+ throw Error(`Username does not exist`);
+ }
+
+ const displayName = channelVideoShelvesQueryData.user.displayName;
+
+ const videoShelvesEdge = channelVideoShelvesQueryData.user.videoShelves.edges[FILTER_CURSOR_MAP[filter] || FILTER_CURSOR_MAP.all];
+
+ const out = videoShelvesEdge.node.items.map((item) => ({
+ title: item.title,
+ link: `https://www.twitch.tv/videos/${item.id}`,
+ author: displayName,
+ pubDate: parseDate(item.publishedAt),
+ description: `<img style="max-width: 100%;" src="${item.previewThumbnailURL}"><br/><img style="max-width: 100%;" src="${item.animatedPreviewURL}">`,
+ category: [item.game.displayName],
+ }));
+
+ ctx.state.data = {
+ title: `Twitch - ${displayName} - ${videoShelvesEdge.node.title}`,
+ link: `https://www.twitch.tv/${login}`,
+ item: out,
+ };
+};
diff --git a/website/docs/routes/live.md b/website/docs/routes/live.md
index a14ffe765582f3..5e224944c49174 100644
--- a/website/docs/routes/live.md
+++ b/website/docs/routes/live.md
@@ -17,6 +17,24 @@
<Route author="nwindz" example="/showroom/room/93401" path="/showroom/room/:id" paramsDesc={['直播间 id, 打开浏览器控制台,刷新页面,找到请求中的room_id参数']}/>
+## Twitch {#twitch}
+
+### Live {#twitch-live}
+
+<Route author="hoilc" path="/twitch/live/:login" example="/twitch/live/riotgames" paramsDesc={['Twitch username']} radar="1"/>
+
+### Channel Video {#twitch-channel-video}
+
+<Route author="hoilc" path="/video/:login/:filter?" example="/twitch/video/riotgames/highlights" paramsDesc={['Twitch username', 'Video type, Default to all']} radar="1"/>
+
+| archive | highlights | all |
+| ---- | ---- | -------- |
+| Recent broadcasts | Recent highlights and uploads | All videos |
+
+### Stream Schedule {#twitch-stream-schedule}
+
+<Route author="hoilc" path="/twitch/schedule/:login" example="/twitch/schedule/riotgames" paramsDesc={['Twitch username']} radar="1"/>
+
## V LIVE {#v-live}
### Board {#v-live-board}
|
2789ed96e5b4496f2dcff5e4bcaa7489f4a985cc
|
2024-03-22 20:12:29
|
DIYgod
|
chore: upgrade got (#14913)
| false
|
upgrade got (#14913)
|
chore
|
diff --git a/.github/dependabot.yml b/.github/dependabot.yml
index 921464b8a92904..9aa571cd5e06e0 100644
--- a/.github/dependabot.yml
+++ b/.github/dependabot.yml
@@ -11,9 +11,6 @@ updates:
ignore:
- dependency-name: jsrsasign
versions: ['>=11.0.0'] # no longer includes KJUR.crypto.Cipher for RSA
- # ESM only packages
- - dependency-name: got
- versions: ['>=12.0.0']
- dependency-name: unified
versions: ['>=10.0.0']
diff --git a/lib/utils/got.ts b/lib/utils/got.ts
index 1aace01ec09aad..d99ddc3f6d7c34 100644
--- a/lib/utils/got.ts
+++ b/lib/utils/got.ts
@@ -1,6 +1,6 @@
import logger from '@/utils/logger';
import { config } from '@/config';
-import got, { CancelableRequest, Response as GotResponse, NormalizedOptions, Options, Got } from 'got';
+import got, { CancelableRequest, Response as GotResponse, OptionsInit, Options, Got } from 'got';
type Response<T> = GotResponse<string> & {
data: T;
@@ -25,22 +25,14 @@ const custom: {
delete: GotRequestFunction;
} & GotRequestFunction &
Got = got.extend({
- get: got.get,
retry: {
limit: config.requestRetry,
statusCodes: [400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 421, 422, 423, 424, 426, 428, 429, 431, 451, 500, 501, 502, 503, 504, 505, 506, 507, 508, 510, 511, 521, 522, 524],
},
hooks: {
beforeRetry: [
- (
- options: NormalizedOptions & {
- retryCount?: number;
- },
- err,
- count
- ) => {
- logger.error(`Request ${options.url} fail, retry attempt #${count}: ${err}`);
- options.retryCount = count;
+ (err, count) => {
+ logger.error(`Request ${err.options.url} fail, retry attempt #${count}: ${err}`);
},
],
beforeRedirect: [
@@ -63,7 +55,7 @@ const custom: {
],
init: [
(
- options: Options & {
+ options: OptionsInit & {
data?: string;
}
) => {
@@ -84,4 +76,4 @@ const custom: {
custom.all = (list) => Promise.all(list);
export default custom;
-export type { Response, NormalizedOptions, Options } from 'got';
+export type { Response, Options } from 'got';
diff --git a/lib/utils/request-wrapper.ts b/lib/utils/request-wrapper.ts
index d80fbc7f73cae6..98e0a3a2de83e2 100644
--- a/lib/utils/request-wrapper.ts
+++ b/lib/utils/request-wrapper.ts
@@ -45,6 +45,7 @@ const requestWrapper = (url: string, options: http.RequestOptions = {}) => {
if (config.proxyStrategy === 'all') {
prxied = proxyWrapper(url, optionsWithHeaders);
} else if (config.proxyStrategy === 'on_retry' && (optionsWithHeaders as any).retryCount) {
+ // TODO
prxied = proxyWrapper(url, optionsWithHeaders);
}
if (prxied) {
diff --git a/package.json b/package.json
index f680298a42127d..81bae96eedee94 100644
--- a/package.json
+++ b/package.json
@@ -70,7 +70,7 @@
"fanfou-sdk": "5.0.0",
"git-rev-sync": "3.0.2",
"googleapis": "134.0.0",
- "got": "11.8.6",
+ "got": "14.2.1",
"hono": "4.1.3",
"html-to-text": "9.0.5",
"https-proxy-agent": "7.0.4",
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index cb0d1fea76341a..387bc28e986d70 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -75,8 +75,8 @@ dependencies:
specifier: 134.0.0
version: 134.0.0
got:
- specifier: 11.8.6
- version: 11.8.6
+ specifier: 14.2.1
+ version: 14.2.1
hono:
specifier: 4.1.3
version: 4.1.3
@@ -216,10 +216,10 @@ dependencies:
devDependencies:
'@babel/preset-env':
specifier: 7.24.3
- version: 7.24.3(@babel/[email protected])
+ version: 7.24.3(@babel/[email protected])
'@babel/preset-typescript':
specifier: 7.24.1
- version: 7.24.1(@babel/[email protected])
+ version: 7.24.1(@babel/[email protected])
'@microsoft/eslint-formatter-sarif':
specifier: 3.0.0
version: 3.0.0
@@ -380,6 +380,14 @@ packages:
'@jridgewell/trace-mapping': 0.3.22
dev: true
+ /@ampproject/[email protected]:
+ resolution: {integrity: sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==}
+ engines: {node: '>=6.0.0'}
+ dependencies:
+ '@jridgewell/gen-mapping': 0.3.5
+ '@jridgewell/trace-mapping': 0.3.25
+ dev: true
+
/@asteasolutions/[email protected]([email protected]):
resolution: {integrity: sha512-d5HwrvM6dOKr3XdeF+DmashGvfEc+1oiEfbscugsiwSTrFtuMa7ETpW9sTNnVgn+hJaz+PRxPQUYD7q9/5dUig==}
peerDependencies:
@@ -402,24 +410,32 @@ packages:
'@babel/highlight': 7.23.4
chalk: 2.4.2
+ /@babel/[email protected]:
+ resolution: {integrity: sha512-y5+tLQyV8pg3fsiln67BVLD1P13Eg4lh5RW9mF0zUuvLrv9uIQ4MCL+CRT+FTsBlBjcIan6PGsLcBN0m3ClUyQ==}
+ engines: {node: '>=6.9.0'}
+ dependencies:
+ '@babel/highlight': 7.24.2
+ picocolors: 1.0.0
+ dev: true
+
/@babel/[email protected]:
resolution: {integrity: sha512-Pc65opHDliVpRHuKfzI+gSA4zcgr65O4cl64fFJIWEEh8JoHIHh0Oez1Eo8Arz8zq/JhgKodQaxEwUPRtZylVA==}
engines: {node: '>=6.9.0'}
dev: true
- /@babel/[email protected]:
- resolution: {integrity: sha512-5q0175NOjddqpvvzU+kDiSOAk4PfdO6FvwCWoQ6RO7rTzEe8vlo+4HVfcnAREhD4npMs0e9uZypjTwzZPCf/cw==}
+ /@babel/[email protected]:
+ resolution: {integrity: sha512-5FcvN1JHw2sHJChotgx8Ek0lyuh4kCKelgMTTqhYJJtloNvUfpAFMeNQUtdlIaktwrSV9LtCdqwk48wL2wBacQ==}
engines: {node: '>=6.9.0'}
dependencies:
- '@ampproject/remapping': 2.2.1
- '@babel/code-frame': 7.23.5
- '@babel/generator': 7.23.6
+ '@ampproject/remapping': 2.3.0
+ '@babel/code-frame': 7.24.2
+ '@babel/generator': 7.24.1
'@babel/helper-compilation-targets': 7.23.6
- '@babel/helper-module-transforms': 7.23.3(@babel/[email protected])
- '@babel/helpers': 7.23.9
+ '@babel/helper-module-transforms': 7.23.3(@babel/[email protected])
+ '@babel/helpers': 7.24.1
'@babel/parser': 7.24.1
'@babel/template': 7.24.0
- '@babel/traverse': 7.23.9
+ '@babel/traverse': 7.24.1
'@babel/types': 7.24.0
convert-source-map: 2.0.0
debug: 4.3.4
@@ -430,12 +446,12 @@ packages:
- supports-color
dev: true
- /@babel/[email protected]:
- resolution: {integrity: sha512-qrSfCYxYQB5owCmGLbl8XRpX1ytXlpueOb0N0UmQwA073KZxejgQTzAmJezxvpwQD9uGtK2shHdi55QT+MbjIw==}
+ /@babel/[email protected]:
+ resolution: {integrity: sha512-DfCRfZsBcrPEHUfuBMgbJ1Ut01Y/itOs+hY2nFLgqsqXd52/iSiVq5TITtUasIUgm+IIKdY2/1I7auiQOEeC9A==}
engines: {node: '>=6.9.0'}
dependencies:
'@babel/types': 7.24.0
- '@jridgewell/gen-mapping': 0.3.3
+ '@jridgewell/gen-mapping': 0.3.5
'@jridgewell/trace-mapping': 0.3.25
jsesc: 2.5.2
dev: true
@@ -465,42 +481,42 @@ packages:
semver: 6.3.1
dev: true
- /@babel/[email protected](@babel/[email protected]):
+ /@babel/[email protected](@babel/[email protected]):
resolution: {integrity: sha512-1yJa9dX9g//V6fDebXoEfEsxkZHk3Hcbm+zLhyu6qVgYFLvmTALTeV+jNU9e5RnYtioBrGEOdoI2joMSNQ/+aA==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0
dependencies:
- '@babel/core': 7.23.9
+ '@babel/core': 7.24.3
'@babel/helper-annotate-as-pure': 7.22.5
'@babel/helper-environment-visitor': 7.22.20
'@babel/helper-function-name': 7.23.0
'@babel/helper-member-expression-to-functions': 7.23.0
'@babel/helper-optimise-call-expression': 7.22.5
- '@babel/helper-replace-supers': 7.24.1(@babel/[email protected])
+ '@babel/helper-replace-supers': 7.24.1(@babel/[email protected])
'@babel/helper-skip-transparent-expression-wrappers': 7.22.5
'@babel/helper-split-export-declaration': 7.22.6
semver: 6.3.1
dev: true
- /@babel/[email protected](@babel/[email protected]):
+ /@babel/[email protected](@babel/[email protected]):
resolution: {integrity: sha512-29FkPLFjn4TPEa3RE7GpW+qbE8tlsu3jntNYNfcGsc49LphF1PQIiD+vMZ1z1xVOKt+93khA9tc2JBs3kBjA7w==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0
dependencies:
- '@babel/core': 7.23.9
+ '@babel/core': 7.24.3
'@babel/helper-annotate-as-pure': 7.22.5
regexpu-core: 5.3.2
semver: 6.3.1
dev: true
- /@babel/[email protected](@babel/[email protected]):
+ /@babel/[email protected](@babel/[email protected]):
resolution: {integrity: sha512-o7SDgTJuvx5vLKD6SFvkydkSMBvahDKGiNJzG22IZYXhiqoe9efY7zocICBgzHV4IRg5wdgl2nEL/tulKIEIbA==}
peerDependencies:
'@babel/core': ^7.4.0 || ^8.0.0-0 <8.0.0
dependencies:
- '@babel/core': 7.23.9
+ '@babel/core': 7.24.3
'@babel/helper-compilation-targets': 7.23.6
'@babel/helper-plugin-utils': 7.24.0
debug: 4.3.4
@@ -544,13 +560,13 @@ packages:
'@babel/types': 7.24.0
dev: true
- /@babel/[email protected](@babel/[email protected]):
+ /@babel/[email protected](@babel/[email protected]):
resolution: {integrity: sha512-7bBs4ED9OmswdfDzpz4MpWgSrV7FXlc3zIagvLFjS5H+Mk7Snr21vQ6QwrsoCGMfNC4e4LQPdoULEt4ykz0SRQ==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0
dependencies:
- '@babel/core': 7.23.9
+ '@babel/core': 7.24.3
'@babel/helper-environment-visitor': 7.22.20
'@babel/helper-module-imports': 7.24.1
'@babel/helper-simple-access': 7.22.5
@@ -570,25 +586,25 @@ packages:
engines: {node: '>=6.9.0'}
dev: true
- /@babel/[email protected](@babel/[email protected]):
+ /@babel/[email protected](@babel/[email protected]):
resolution: {integrity: sha512-pBGyV4uBqOns+0UvhsTO8qgl8hO89PmiDYv+/COyp1aeMcmfrfruz+/nCMFiYyFF/Knn0yfrC85ZzNFjembFTw==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0
dependencies:
- '@babel/core': 7.23.9
+ '@babel/core': 7.24.3
'@babel/helper-annotate-as-pure': 7.22.5
'@babel/helper-environment-visitor': 7.22.20
'@babel/helper-wrap-function': 7.22.20
dev: true
- /@babel/[email protected](@babel/[email protected]):
+ /@babel/[email protected](@babel/[email protected]):
resolution: {integrity: sha512-QCR1UqC9BzG5vZl8BMicmZ28RuUBnHhAMddD8yHFHDRH9lLTZ9uUPehX8ctVPT8l0TKblJidqcgUUKGVrePleQ==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0
dependencies:
- '@babel/core': 7.23.9
+ '@babel/core': 7.24.3
'@babel/helper-environment-visitor': 7.22.20
'@babel/helper-member-expression-to-functions': 7.23.0
'@babel/helper-optimise-call-expression': 7.22.5
@@ -638,12 +654,12 @@ packages:
'@babel/types': 7.24.0
dev: true
- /@babel/[email protected]:
- resolution: {integrity: sha512-87ICKgU5t5SzOT7sBMfCOZQ2rHjRU+Pcb9BoILMYz600W6DkVRLFBPwQ18gwUVvggqXivaUakpnxWQGbpywbBQ==}
+ /@babel/[email protected]:
+ resolution: {integrity: sha512-BpU09QqEe6ZCHuIHFphEFgvNSrubve1FtyMton26ekZ85gRGi6LrTF7zArARp2YvyFxloeiRmtSCq5sjh1WqIg==}
engines: {node: '>=6.9.0'}
dependencies:
'@babel/template': 7.24.0
- '@babel/traverse': 7.23.9
+ '@babel/traverse': 7.24.1
'@babel/types': 7.24.0
transitivePeerDependencies:
- supports-color
@@ -657,6 +673,16 @@ packages:
chalk: 2.4.2
js-tokens: 4.0.0
+ /@babel/[email protected]:
+ resolution: {integrity: sha512-Yac1ao4flkTxTteCDZLEvdxg2fZfz1v8M4QpaGypq/WPDqg3ijHYbDfs+LG5hvzSoqaSZ9/Z9lKSP3CjZjv+pA==}
+ engines: {node: '>=6.9.0'}
+ dependencies:
+ '@babel/helper-validator-identifier': 7.22.20
+ chalk: 2.4.2
+ js-tokens: 4.0.0
+ picocolors: 1.0.0
+ dev: true
+
/@babel/[email protected]:
resolution: {integrity: sha512-9tcKgqKbs3xGJ+NtKF2ndOBBLVwPjl1SHxPQkd36r3Dlirw3xWUeGaTbqr7uGZcTaxkVNwc+03SVP7aCdWrTlA==}
engines: {node: '>=6.0.0'}
@@ -673,895 +699,895 @@ packages:
'@babel/types': 7.24.0
dev: true
- /@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@7.24.1(@babel/[email protected]):
+ /@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@7.24.1(@babel/[email protected]):
resolution: {integrity: sha512-y4HqEnkelJIOQGd+3g1bTeKsA5c6qM7eOn7VggGVbBc0y8MLSKHacwcIE2PplNlQSj0PqS9rrXL/nkPVK+kUNg==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0
dependencies:
- '@babel/core': 7.23.9
+ '@babel/core': 7.24.3
'@babel/helper-plugin-utils': 7.24.0
dev: true
- /@babel/[email protected](@babel/[email protected]):
+ /@babel/[email protected](@babel/[email protected]):
resolution: {integrity: sha512-Hj791Ii4ci8HqnaKHAlLNs+zaLXb0EzSDhiAWp5VNlyvCNymYfacs64pxTxbH1znW/NcArSmwpmG9IKE/TUVVQ==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.13.0
dependencies:
- '@babel/core': 7.23.9
+ '@babel/core': 7.24.3
'@babel/helper-plugin-utils': 7.24.0
'@babel/helper-skip-transparent-expression-wrappers': 7.22.5
- '@babel/plugin-transform-optional-chaining': 7.24.1(@babel/[email protected])
+ '@babel/plugin-transform-optional-chaining': 7.24.1(@babel/[email protected])
dev: true
- /@babel/[email protected](@babel/[email protected]):
+ /@babel/[email protected](@babel/[email protected]):
resolution: {integrity: sha512-m9m/fXsXLiHfwdgydIFnpk+7jlVbnvlK5B2EKiPdLUb6WX654ZaaEWJUjk8TftRbZpK0XibovlLWX4KIZhV6jw==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0
dependencies:
- '@babel/core': 7.23.9
+ '@babel/core': 7.24.3
'@babel/helper-environment-visitor': 7.22.20
'@babel/helper-plugin-utils': 7.24.0
dev: true
- /@babel/plugin-proposal-private-property-in-object@7.21.0-placeholder-for-preset-env.2(@babel/[email protected]):
+ /@babel/plugin-proposal-private-property-in-object@7.21.0-placeholder-for-preset-env.2(@babel/[email protected]):
resolution: {integrity: sha512-SOSkfJDddaM7mak6cPEpswyTRnuRltl429hMraQEglW+OkovnCzsiszTmsrlY//qLFjCpQDFRvjdm2wA5pPm9w==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
- '@babel/core': 7.23.9
+ '@babel/core': 7.24.3
dev: true
- /@babel/[email protected](@babel/[email protected]):
+ /@babel/[email protected](@babel/[email protected]):
resolution: {integrity: sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
- '@babel/core': 7.23.9
+ '@babel/core': 7.24.3
'@babel/helper-plugin-utils': 7.24.0
dev: true
- /@babel/[email protected](@babel/[email protected]):
+ /@babel/[email protected](@babel/[email protected]):
resolution: {integrity: sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA==}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
- '@babel/core': 7.23.9
+ '@babel/core': 7.24.3
'@babel/helper-plugin-utils': 7.24.0
dev: true
- /@babel/[email protected](@babel/[email protected]):
+ /@babel/[email protected](@babel/[email protected]):
resolution: {integrity: sha512-b+YyPmr6ldyNnM6sqYeMWE+bgJcJpO6yS4QD7ymxgH34GBPNDM/THBh8iunyvKIZztiwLH4CJZ0RxTk9emgpjw==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
- '@babel/core': 7.23.9
+ '@babel/core': 7.24.3
'@babel/helper-plugin-utils': 7.24.0
dev: true
- /@babel/[email protected](@babel/[email protected]):
+ /@babel/[email protected](@babel/[email protected]):
resolution: {integrity: sha512-5gdGbFon+PszYzqs83S3E5mpi7/y/8M9eC90MRTZfduQOYW76ig6SOSPNe41IG5LoP3FGBn2N0RjVDSQiS94kQ==}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
- '@babel/core': 7.23.9
+ '@babel/core': 7.24.3
'@babel/helper-plugin-utils': 7.24.0
dev: true
- /@babel/[email protected](@babel/[email protected]):
+ /@babel/[email protected](@babel/[email protected]):
resolution: {integrity: sha512-MXf5laXo6c1IbEbegDmzGPwGNTsHZmEy6QGznu5Sh2UCWvueywb2ee+CCE4zQiZstxU9BMoQO9i6zUFSY0Kj0Q==}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
- '@babel/core': 7.23.9
+ '@babel/core': 7.24.3
'@babel/helper-plugin-utils': 7.24.0
dev: true
- /@babel/[email protected](@babel/[email protected]):
+ /@babel/[email protected](@babel/[email protected]):
resolution: {integrity: sha512-IuwnI5XnuF189t91XbxmXeCDz3qs6iDRO7GJ++wcfgeXNs/8FmIlKcpDSXNVyuLQxlwvskmI3Ct73wUODkJBlQ==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
- '@babel/core': 7.23.9
+ '@babel/core': 7.24.3
'@babel/helper-plugin-utils': 7.24.0
dev: true
- /@babel/[email protected](@babel/[email protected]):
+ /@babel/[email protected](@babel/[email protected]):
resolution: {integrity: sha512-zhQTMH0X2nVLnb04tz+s7AMuasX8U0FnpE+nHTOhSOINjWMnopoZTxtIKsd45n4GQ/HIZLyfIpoul8e2m0DnRA==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
- '@babel/core': 7.23.9
+ '@babel/core': 7.24.3
'@babel/helper-plugin-utils': 7.24.0
dev: true
- /@babel/[email protected](@babel/[email protected]):
+ /@babel/[email protected](@babel/[email protected]):
resolution: {integrity: sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g==}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
- '@babel/core': 7.23.9
+ '@babel/core': 7.24.3
'@babel/helper-plugin-utils': 7.24.0
dev: true
- /@babel/[email protected](@babel/[email protected]):
+ /@babel/[email protected](@babel/[email protected]):
resolution: {integrity: sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
- '@babel/core': 7.23.9
+ '@babel/core': 7.24.3
'@babel/helper-plugin-utils': 7.24.0
dev: true
- /@babel/[email protected](@babel/[email protected]):
+ /@babel/[email protected](@babel/[email protected]):
resolution: {integrity: sha512-2eCtxZXf+kbkMIsXS4poTvT4Yu5rXiRa+9xGVT56raghjmBTKMpFNc9R4IDiB4emao9eO22Ox7CxuJG7BgExqA==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
- '@babel/core': 7.23.9
+ '@babel/core': 7.24.3
'@babel/helper-plugin-utils': 7.24.0
dev: true
- /@babel/[email protected](@babel/[email protected]):
+ /@babel/[email protected](@babel/[email protected]):
resolution: {integrity: sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
- '@babel/core': 7.23.9
+ '@babel/core': 7.24.3
'@babel/helper-plugin-utils': 7.24.0
dev: true
- /@babel/[email protected](@babel/[email protected]):
+ /@babel/[email protected](@babel/[email protected]):
resolution: {integrity: sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
- '@babel/core': 7.23.9
+ '@babel/core': 7.24.3
'@babel/helper-plugin-utils': 7.24.0
dev: true
- /@babel/[email protected](@babel/[email protected]):
+ /@babel/[email protected](@babel/[email protected]):
resolution: {integrity: sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
- '@babel/core': 7.23.9
+ '@babel/core': 7.24.3
'@babel/helper-plugin-utils': 7.24.0
dev: true
- /@babel/[email protected](@babel/[email protected]):
+ /@babel/[email protected](@babel/[email protected]):
resolution: {integrity: sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
- '@babel/core': 7.23.9
+ '@babel/core': 7.24.3
'@babel/helper-plugin-utils': 7.24.0
dev: true
- /@babel/[email protected](@babel/[email protected]):
+ /@babel/[email protected](@babel/[email protected]):
resolution: {integrity: sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
- '@babel/core': 7.23.9
+ '@babel/core': 7.24.3
'@babel/helper-plugin-utils': 7.24.0
dev: true
- /@babel/[email protected](@babel/[email protected]):
+ /@babel/[email protected](@babel/[email protected]):
resolution: {integrity: sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
- '@babel/core': 7.23.9
+ '@babel/core': 7.24.3
'@babel/helper-plugin-utils': 7.24.0
dev: true
- /@babel/[email protected](@babel/[email protected]):
+ /@babel/[email protected](@babel/[email protected]):
resolution: {integrity: sha512-0wVnp9dxJ72ZUJDV27ZfbSj6iHLoytYZmh3rFcxNnvsJF3ktkzLDZPy/mA17HGsaQT3/DQsWYX1f1QGWkCoVUg==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
- '@babel/core': 7.23.9
+ '@babel/core': 7.24.3
'@babel/helper-plugin-utils': 7.24.0
dev: true
- /@babel/[email protected](@babel/[email protected]):
+ /@babel/[email protected](@babel/[email protected]):
resolution: {integrity: sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
- '@babel/core': 7.23.9
+ '@babel/core': 7.24.3
'@babel/helper-plugin-utils': 7.24.0
dev: true
- /@babel/[email protected](@babel/[email protected]):
+ /@babel/[email protected](@babel/[email protected]):
resolution: {integrity: sha512-Yhnmvy5HZEnHUty6i++gcfH1/l68AHnItFHnaCv6hn9dNh0hQvvQJsxpi4BMBFN5DLeHBuucT/0DgzXif/OyRw==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
- '@babel/core': 7.23.9
+ '@babel/core': 7.24.3
'@babel/helper-plugin-utils': 7.24.0
dev: true
- /@babel/[email protected](@babel/[email protected]):
+ /@babel/[email protected](@babel/[email protected]):
resolution: {integrity: sha512-727YkEAPwSIQTv5im8QHz3upqp92JTWhidIC81Tdx4VJYIte/VndKf1qKrfnnhPLiPghStWfvC/iFaMCQu7Nqg==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0
dependencies:
- '@babel/core': 7.23.9
- '@babel/helper-create-regexp-features-plugin': 7.22.15(@babel/[email protected])
+ '@babel/core': 7.24.3
+ '@babel/helper-create-regexp-features-plugin': 7.22.15(@babel/[email protected])
'@babel/helper-plugin-utils': 7.24.0
dev: true
- /@babel/[email protected](@babel/[email protected]):
+ /@babel/[email protected](@babel/[email protected]):
resolution: {integrity: sha512-ngT/3NkRhsaep9ck9uj2Xhv9+xB1zShY3tM3g6om4xxCELwCDN4g4Aq5dRn48+0hasAql7s2hdBOysCfNpr4fw==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
- '@babel/core': 7.23.9
+ '@babel/core': 7.24.3
'@babel/helper-plugin-utils': 7.24.0
dev: true
- /@babel/[email protected](@babel/[email protected]):
+ /@babel/[email protected](@babel/[email protected]):
resolution: {integrity: sha512-Qe26CMYVjpQxJ8zxM1340JFNjZaF+ISWpr1Kt/jGo+ZTUzKkfw/pphEWbRCb+lmSM6k/TOgfYLvmbHkUQ0asIg==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
- '@babel/core': 7.23.9
+ '@babel/core': 7.24.3
'@babel/helper-environment-visitor': 7.22.20
'@babel/helper-plugin-utils': 7.24.0
- '@babel/helper-remap-async-to-generator': 7.22.20(@babel/[email protected])
- '@babel/plugin-syntax-async-generators': 7.8.4(@babel/[email protected])
+ '@babel/helper-remap-async-to-generator': 7.22.20(@babel/[email protected])
+ '@babel/plugin-syntax-async-generators': 7.8.4(@babel/[email protected])
dev: true
- /@babel/[email protected](@babel/[email protected]):
+ /@babel/[email protected](@babel/[email protected]):
resolution: {integrity: sha512-AawPptitRXp1y0n4ilKcGbRYWfbbzFWz2NqNu7dacYDtFtz0CMjG64b3LQsb3KIgnf4/obcUL78hfaOS7iCUfw==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
- '@babel/core': 7.23.9
+ '@babel/core': 7.24.3
'@babel/helper-module-imports': 7.24.1
'@babel/helper-plugin-utils': 7.24.0
- '@babel/helper-remap-async-to-generator': 7.22.20(@babel/[email protected])
+ '@babel/helper-remap-async-to-generator': 7.22.20(@babel/[email protected])
dev: true
- /@babel/[email protected](@babel/[email protected]):
+ /@babel/[email protected](@babel/[email protected]):
resolution: {integrity: sha512-TWWC18OShZutrv9C6mye1xwtam+uNi2bnTOCBUd5sZxyHOiWbU6ztSROofIMrK84uweEZC219POICK/sTYwfgg==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
- '@babel/core': 7.23.9
+ '@babel/core': 7.24.3
'@babel/helper-plugin-utils': 7.24.0
dev: true
- /@babel/[email protected](@babel/[email protected]):
+ /@babel/[email protected](@babel/[email protected]):
resolution: {integrity: sha512-h71T2QQvDgM2SmT29UYU6ozjMlAt7s7CSs5Hvy8f8cf/GM/Z4a2zMfN+fjVGaieeCrXR3EdQl6C4gQG+OgmbKw==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
- '@babel/core': 7.23.9
+ '@babel/core': 7.24.3
'@babel/helper-plugin-utils': 7.24.0
dev: true
- /@babel/[email protected](@babel/[email protected]):
+ /@babel/[email protected](@babel/[email protected]):
resolution: {integrity: sha512-OMLCXi0NqvJfORTaPQBwqLXHhb93wkBKZ4aNwMl6WtehO7ar+cmp+89iPEQPqxAnxsOKTaMcs3POz3rKayJ72g==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
- '@babel/core': 7.23.9
- '@babel/helper-create-class-features-plugin': 7.24.1(@babel/[email protected])
+ '@babel/core': 7.24.3
+ '@babel/helper-create-class-features-plugin': 7.24.1(@babel/[email protected])
'@babel/helper-plugin-utils': 7.24.0
dev: true
- /@babel/[email protected](@babel/[email protected]):
+ /@babel/[email protected](@babel/[email protected]):
resolution: {integrity: sha512-FUHlKCn6J3ERiu8Dv+4eoz7w8+kFLSyeVG4vDAikwADGjUCoHw/JHokyGtr8OR4UjpwPVivyF+h8Q5iv/JmrtA==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.12.0
dependencies:
- '@babel/core': 7.23.9
- '@babel/helper-create-class-features-plugin': 7.24.1(@babel/[email protected])
+ '@babel/core': 7.24.3
+ '@babel/helper-create-class-features-plugin': 7.24.1(@babel/[email protected])
'@babel/helper-plugin-utils': 7.24.0
- '@babel/plugin-syntax-class-static-block': 7.14.5(@babel/[email protected])
+ '@babel/plugin-syntax-class-static-block': 7.14.5(@babel/[email protected])
dev: true
- /@babel/[email protected](@babel/[email protected]):
+ /@babel/[email protected](@babel/[email protected]):
resolution: {integrity: sha512-ZTIe3W7UejJd3/3R4p7ScyyOoafetUShSf4kCqV0O7F/RiHxVj/wRaRnQlrGwflvcehNA8M42HkAiEDYZu2F1Q==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
- '@babel/core': 7.23.9
+ '@babel/core': 7.24.3
'@babel/helper-annotate-as-pure': 7.22.5
'@babel/helper-compilation-targets': 7.23.6
'@babel/helper-environment-visitor': 7.22.20
'@babel/helper-function-name': 7.23.0
'@babel/helper-plugin-utils': 7.24.0
- '@babel/helper-replace-supers': 7.24.1(@babel/[email protected])
+ '@babel/helper-replace-supers': 7.24.1(@babel/[email protected])
'@babel/helper-split-export-declaration': 7.22.6
globals: 11.12.0
dev: true
- /@babel/[email protected](@babel/[email protected]):
+ /@babel/[email protected](@babel/[email protected]):
resolution: {integrity: sha512-5pJGVIUfJpOS+pAqBQd+QMaTD2vCL/HcePooON6pDpHgRp4gNRmzyHTPIkXntwKsq3ayUFVfJaIKPw2pOkOcTw==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
- '@babel/core': 7.23.9
+ '@babel/core': 7.24.3
'@babel/helper-plugin-utils': 7.24.0
'@babel/template': 7.24.0
dev: true
- /@babel/[email protected](@babel/[email protected]):
+ /@babel/[email protected](@babel/[email protected]):
resolution: {integrity: sha512-ow8jciWqNxR3RYbSNVuF4U2Jx130nwnBnhRw6N6h1bOejNkABmcI5X5oz29K4alWX7vf1C+o6gtKXikzRKkVdw==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
- '@babel/core': 7.23.9
+ '@babel/core': 7.24.3
'@babel/helper-plugin-utils': 7.24.0
dev: true
- /@babel/[email protected](@babel/[email protected]):
+ /@babel/[email protected](@babel/[email protected]):
resolution: {integrity: sha512-p7uUxgSoZwZ2lPNMzUkqCts3xlp8n+o05ikjy7gbtFJSt9gdU88jAmtfmOxHM14noQXBxfgzf2yRWECiNVhTCw==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
- '@babel/core': 7.23.9
- '@babel/helper-create-regexp-features-plugin': 7.22.15(@babel/[email protected])
+ '@babel/core': 7.24.3
+ '@babel/helper-create-regexp-features-plugin': 7.22.15(@babel/[email protected])
'@babel/helper-plugin-utils': 7.24.0
dev: true
- /@babel/[email protected](@babel/[email protected]):
+ /@babel/[email protected](@babel/[email protected]):
resolution: {integrity: sha512-msyzuUnvsjsaSaocV6L7ErfNsa5nDWL1XKNnDePLgmz+WdU4w/J8+AxBMrWfi9m4IxfL5sZQKUPQKDQeeAT6lA==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
- '@babel/core': 7.23.9
+ '@babel/core': 7.24.3
'@babel/helper-plugin-utils': 7.24.0
dev: true
- /@babel/[email protected](@babel/[email protected]):
+ /@babel/[email protected](@babel/[email protected]):
resolution: {integrity: sha512-av2gdSTyXcJVdI+8aFZsCAtR29xJt0S5tas+Ef8NvBNmD1a+N/3ecMLeMBgfcK+xzsjdLDT6oHt+DFPyeqUbDA==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
- '@babel/core': 7.23.9
+ '@babel/core': 7.24.3
'@babel/helper-plugin-utils': 7.24.0
- '@babel/plugin-syntax-dynamic-import': 7.8.3(@babel/[email protected])
+ '@babel/plugin-syntax-dynamic-import': 7.8.3(@babel/[email protected])
dev: true
- /@babel/[email protected](@babel/[email protected]):
+ /@babel/[email protected](@babel/[email protected]):
resolution: {integrity: sha512-U1yX13dVBSwS23DEAqU+Z/PkwE9/m7QQy8Y9/+Tdb8UWYaGNDYwTLi19wqIAiROr8sXVum9A/rtiH5H0boUcTw==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
- '@babel/core': 7.23.9
+ '@babel/core': 7.24.3
'@babel/helper-builder-binary-assignment-operator-visitor': 7.22.15
'@babel/helper-plugin-utils': 7.24.0
dev: true
- /@babel/[email protected](@babel/[email protected]):
+ /@babel/[email protected](@babel/[email protected]):
resolution: {integrity: sha512-Ft38m/KFOyzKw2UaJFkWG9QnHPG/Q/2SkOrRk4pNBPg5IPZ+dOxcmkK5IyuBcxiNPyyYowPGUReyBvrvZs7IlQ==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
- '@babel/core': 7.23.9
+ '@babel/core': 7.24.3
'@babel/helper-plugin-utils': 7.24.0
- '@babel/plugin-syntax-export-namespace-from': 7.8.3(@babel/[email protected])
+ '@babel/plugin-syntax-export-namespace-from': 7.8.3(@babel/[email protected])
dev: true
- /@babel/[email protected](@babel/[email protected]):
+ /@babel/[email protected](@babel/[email protected]):
resolution: {integrity: sha512-OxBdcnF04bpdQdR3i4giHZNZQn7cm8RQKcSwA17wAAqEELo1ZOwp5FFgeptWUQXFyT9kwHo10aqqauYkRZPCAg==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
- '@babel/core': 7.23.9
+ '@babel/core': 7.24.3
'@babel/helper-plugin-utils': 7.24.0
'@babel/helper-skip-transparent-expression-wrappers': 7.22.5
dev: true
- /@babel/[email protected](@babel/[email protected]):
+ /@babel/[email protected](@babel/[email protected]):
resolution: {integrity: sha512-BXmDZpPlh7jwicKArQASrj8n22/w6iymRnvHYYd2zO30DbE277JO20/7yXJT3QxDPtiQiOxQBbZH4TpivNXIxA==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
- '@babel/core': 7.23.9
+ '@babel/core': 7.24.3
'@babel/helper-compilation-targets': 7.23.6
'@babel/helper-function-name': 7.23.0
'@babel/helper-plugin-utils': 7.24.0
dev: true
- /@babel/[email protected](@babel/[email protected]):
+ /@babel/[email protected](@babel/[email protected]):
resolution: {integrity: sha512-U7RMFmRvoasscrIFy5xA4gIp8iWnWubnKkKuUGJjsuOH7GfbMkB+XZzeslx2kLdEGdOJDamEmCqOks6e8nv8DQ==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
- '@babel/core': 7.23.9
+ '@babel/core': 7.24.3
'@babel/helper-plugin-utils': 7.24.0
- '@babel/plugin-syntax-json-strings': 7.8.3(@babel/[email protected])
+ '@babel/plugin-syntax-json-strings': 7.8.3(@babel/[email protected])
dev: true
- /@babel/[email protected](@babel/[email protected]):
+ /@babel/[email protected](@babel/[email protected]):
resolution: {integrity: sha512-zn9pwz8U7nCqOYIiBaOxoQOtYmMODXTJnkxG4AtX8fPmnCRYWBOHD0qcpwS9e2VDSp1zNJYpdnFMIKb8jmwu6g==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
- '@babel/core': 7.23.9
+ '@babel/core': 7.24.3
'@babel/helper-plugin-utils': 7.24.0
dev: true
- /@babel/[email protected](@babel/[email protected]):
+ /@babel/[email protected](@babel/[email protected]):
resolution: {integrity: sha512-OhN6J4Bpz+hIBqItTeWJujDOfNP+unqv/NJgyhlpSqgBTPm37KkMmZV6SYcOj+pnDbdcl1qRGV/ZiIjX9Iy34w==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
- '@babel/core': 7.23.9
+ '@babel/core': 7.24.3
'@babel/helper-plugin-utils': 7.24.0
- '@babel/plugin-syntax-logical-assignment-operators': 7.10.4(@babel/[email protected])
+ '@babel/plugin-syntax-logical-assignment-operators': 7.10.4(@babel/[email protected])
dev: true
- /@babel/[email protected](@babel/[email protected]):
+ /@babel/[email protected](@babel/[email protected]):
resolution: {integrity: sha512-4ojai0KysTWXzHseJKa1XPNXKRbuUrhkOPY4rEGeR+7ChlJVKxFa3H3Bz+7tWaGKgJAXUWKOGmltN+u9B3+CVg==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
- '@babel/core': 7.23.9
+ '@babel/core': 7.24.3
'@babel/helper-plugin-utils': 7.24.0
dev: true
- /@babel/[email protected](@babel/[email protected]):
+ /@babel/[email protected](@babel/[email protected]):
resolution: {integrity: sha512-lAxNHi4HVtjnHd5Rxg3D5t99Xm6H7b04hUS7EHIXcUl2EV4yl1gWdqZrNzXnSrHveL9qMdbODlLF55mvgjAfaQ==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
- '@babel/core': 7.23.9
- '@babel/helper-module-transforms': 7.23.3(@babel/[email protected])
+ '@babel/core': 7.24.3
+ '@babel/helper-module-transforms': 7.23.3(@babel/[email protected])
'@babel/helper-plugin-utils': 7.24.0
dev: true
- /@babel/[email protected](@babel/[email protected]):
+ /@babel/[email protected](@babel/[email protected]):
resolution: {integrity: sha512-szog8fFTUxBfw0b98gEWPaEqF42ZUD/T3bkynW/wtgx2p/XCP55WEsb+VosKceRSd6njipdZvNogqdtI4Q0chw==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
- '@babel/core': 7.23.9
- '@babel/helper-module-transforms': 7.23.3(@babel/[email protected])
+ '@babel/core': 7.24.3
+ '@babel/helper-module-transforms': 7.23.3(@babel/[email protected])
'@babel/helper-plugin-utils': 7.24.0
'@babel/helper-simple-access': 7.22.5
dev: true
- /@babel/[email protected](@babel/[email protected]):
+ /@babel/[email protected](@babel/[email protected]):
resolution: {integrity: sha512-mqQ3Zh9vFO1Tpmlt8QPnbwGHzNz3lpNEMxQb1kAemn/erstyqw1r9KeOlOfo3y6xAnFEcOv2tSyrXfmMk+/YZA==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
- '@babel/core': 7.23.9
+ '@babel/core': 7.24.3
'@babel/helper-hoist-variables': 7.22.5
- '@babel/helper-module-transforms': 7.23.3(@babel/[email protected])
+ '@babel/helper-module-transforms': 7.23.3(@babel/[email protected])
'@babel/helper-plugin-utils': 7.24.0
'@babel/helper-validator-identifier': 7.22.20
dev: true
- /@babel/[email protected](@babel/[email protected]):
+ /@babel/[email protected](@babel/[email protected]):
resolution: {integrity: sha512-tuA3lpPj+5ITfcCluy6nWonSL7RvaG0AOTeAuvXqEKS34lnLzXpDb0dcP6K8jD0zWZFNDVly90AGFJPnm4fOYg==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
- '@babel/core': 7.23.9
- '@babel/helper-module-transforms': 7.23.3(@babel/[email protected])
+ '@babel/core': 7.24.3
+ '@babel/helper-module-transforms': 7.23.3(@babel/[email protected])
'@babel/helper-plugin-utils': 7.24.0
dev: true
- /@babel/[email protected](@babel/[email protected]):
+ /@babel/[email protected](@babel/[email protected]):
resolution: {integrity: sha512-YgLLKmS3aUBhHaxp5hi1WJTgOUb/NCuDHzGT9z9WTt3YG+CPRhJs6nprbStx6DnWM4dh6gt7SU3sZodbZ08adQ==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0
dependencies:
- '@babel/core': 7.23.9
- '@babel/helper-create-regexp-features-plugin': 7.22.15(@babel/[email protected])
+ '@babel/core': 7.24.3
+ '@babel/helper-create-regexp-features-plugin': 7.22.15(@babel/[email protected])
'@babel/helper-plugin-utils': 7.24.0
dev: true
- /@babel/[email protected](@babel/[email protected]):
+ /@babel/[email protected](@babel/[email protected]):
resolution: {integrity: sha512-/rurytBM34hYy0HKZQyA0nHbQgQNFm4Q/BOc9Hflxi2X3twRof7NaE5W46j4kQitm7SvACVRXsa6N/tSZxvPug==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
- '@babel/core': 7.23.9
+ '@babel/core': 7.24.3
'@babel/helper-plugin-utils': 7.24.0
dev: true
- /@babel/[email protected](@babel/[email protected]):
+ /@babel/[email protected](@babel/[email protected]):
resolution: {integrity: sha512-iQ+caew8wRrhCikO5DrUYx0mrmdhkaELgFa+7baMcVuhxIkN7oxt06CZ51D65ugIb1UWRQ8oQe+HXAVM6qHFjw==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
- '@babel/core': 7.23.9
+ '@babel/core': 7.24.3
'@babel/helper-plugin-utils': 7.24.0
- '@babel/plugin-syntax-nullish-coalescing-operator': 7.8.3(@babel/[email protected])
+ '@babel/plugin-syntax-nullish-coalescing-operator': 7.8.3(@babel/[email protected])
dev: true
- /@babel/[email protected](@babel/[email protected]):
+ /@babel/[email protected](@babel/[email protected]):
resolution: {integrity: sha512-7GAsGlK4cNL2OExJH1DzmDeKnRv/LXq0eLUSvudrehVA5Rgg4bIrqEUW29FbKMBRT0ztSqisv7kjP+XIC4ZMNw==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
- '@babel/core': 7.23.9
+ '@babel/core': 7.24.3
'@babel/helper-plugin-utils': 7.24.0
- '@babel/plugin-syntax-numeric-separator': 7.10.4(@babel/[email protected])
+ '@babel/plugin-syntax-numeric-separator': 7.10.4(@babel/[email protected])
dev: true
- /@babel/[email protected](@babel/[email protected]):
+ /@babel/[email protected](@babel/[email protected]):
resolution: {integrity: sha512-XjD5f0YqOtebto4HGISLNfiNMTTs6tbkFf2TOqJlYKYmbo+mN9Dnpl4SRoofiziuOWMIyq3sZEUqLo3hLITFEA==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
- '@babel/core': 7.23.9
+ '@babel/core': 7.24.3
'@babel/helper-compilation-targets': 7.23.6
'@babel/helper-plugin-utils': 7.24.0
- '@babel/plugin-syntax-object-rest-spread': 7.8.3(@babel/[email protected])
- '@babel/plugin-transform-parameters': 7.24.1(@babel/[email protected])
+ '@babel/plugin-syntax-object-rest-spread': 7.8.3(@babel/[email protected])
+ '@babel/plugin-transform-parameters': 7.24.1(@babel/[email protected])
dev: true
- /@babel/[email protected](@babel/[email protected]):
+ /@babel/[email protected](@babel/[email protected]):
resolution: {integrity: sha512-oKJqR3TeI5hSLRxudMjFQ9re9fBVUU0GICqM3J1mi8MqlhVr6hC/ZN4ttAyMuQR6EZZIY6h/exe5swqGNNIkWQ==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
- '@babel/core': 7.23.9
+ '@babel/core': 7.24.3
'@babel/helper-plugin-utils': 7.24.0
- '@babel/helper-replace-supers': 7.24.1(@babel/[email protected])
+ '@babel/helper-replace-supers': 7.24.1(@babel/[email protected])
dev: true
- /@babel/[email protected](@babel/[email protected]):
+ /@babel/[email protected](@babel/[email protected]):
resolution: {integrity: sha512-oBTH7oURV4Y+3EUrf6cWn1OHio3qG/PVwO5J03iSJmBg6m2EhKjkAu/xuaXaYwWW9miYtvbWv4LNf0AmR43LUA==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
- '@babel/core': 7.23.9
+ '@babel/core': 7.24.3
'@babel/helper-plugin-utils': 7.24.0
- '@babel/plugin-syntax-optional-catch-binding': 7.8.3(@babel/[email protected])
+ '@babel/plugin-syntax-optional-catch-binding': 7.8.3(@babel/[email protected])
dev: true
- /@babel/[email protected](@babel/[email protected]):
+ /@babel/[email protected](@babel/[email protected]):
resolution: {integrity: sha512-n03wmDt+987qXwAgcBlnUUivrZBPZ8z1plL0YvgQalLm+ZE5BMhGm94jhxXtA1wzv1Cu2aaOv1BM9vbVttrzSg==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
- '@babel/core': 7.23.9
+ '@babel/core': 7.24.3
'@babel/helper-plugin-utils': 7.24.0
'@babel/helper-skip-transparent-expression-wrappers': 7.22.5
- '@babel/plugin-syntax-optional-chaining': 7.8.3(@babel/[email protected])
+ '@babel/plugin-syntax-optional-chaining': 7.8.3(@babel/[email protected])
dev: true
- /@babel/[email protected](@babel/[email protected]):
+ /@babel/[email protected](@babel/[email protected]):
resolution: {integrity: sha512-8Jl6V24g+Uw5OGPeWNKrKqXPDw2YDjLc53ojwfMcKwlEoETKU9rU0mHUtcg9JntWI/QYzGAXNWEcVHZ+fR+XXg==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
- '@babel/core': 7.23.9
+ '@babel/core': 7.24.3
'@babel/helper-plugin-utils': 7.24.0
dev: true
- /@babel/[email protected](@babel/[email protected]):
+ /@babel/[email protected](@babel/[email protected]):
resolution: {integrity: sha512-tGvisebwBO5em4PaYNqt4fkw56K2VALsAbAakY0FjTYqJp7gfdrgr7YX76Or8/cpik0W6+tj3rZ0uHU9Oil4tw==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
- '@babel/core': 7.23.9
- '@babel/helper-create-class-features-plugin': 7.24.1(@babel/[email protected])
+ '@babel/core': 7.24.3
+ '@babel/helper-create-class-features-plugin': 7.24.1(@babel/[email protected])
'@babel/helper-plugin-utils': 7.24.0
dev: true
- /@babel/[email protected](@babel/[email protected]):
+ /@babel/[email protected](@babel/[email protected]):
resolution: {integrity: sha512-pTHxDVa0BpUbvAgX3Gat+7cSciXqUcY9j2VZKTbSB6+VQGpNgNO9ailxTGHSXlqOnX1Hcx1Enme2+yv7VqP9bg==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
- '@babel/core': 7.23.9
+ '@babel/core': 7.24.3
'@babel/helper-annotate-as-pure': 7.22.5
- '@babel/helper-create-class-features-plugin': 7.24.1(@babel/[email protected])
+ '@babel/helper-create-class-features-plugin': 7.24.1(@babel/[email protected])
'@babel/helper-plugin-utils': 7.24.0
- '@babel/plugin-syntax-private-property-in-object': 7.14.5(@babel/[email protected])
+ '@babel/plugin-syntax-private-property-in-object': 7.14.5(@babel/[email protected])
dev: true
- /@babel/[email protected](@babel/[email protected]):
+ /@babel/[email protected](@babel/[email protected]):
resolution: {integrity: sha512-LetvD7CrHmEx0G442gOomRr66d7q8HzzGGr4PMHGr+5YIm6++Yke+jxj246rpvsbyhJwCLxcTn6zW1P1BSenqA==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
- '@babel/core': 7.23.9
+ '@babel/core': 7.24.3
'@babel/helper-plugin-utils': 7.24.0
dev: true
- /@babel/[email protected](@babel/[email protected]):
+ /@babel/[email protected](@babel/[email protected]):
resolution: {integrity: sha512-sJwZBCzIBE4t+5Q4IGLaaun5ExVMRY0lYwos/jNecjMrVCygCdph3IKv0tkP5Fc87e/1+bebAmEAGBfnRD+cnw==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
- '@babel/core': 7.23.9
+ '@babel/core': 7.24.3
'@babel/helper-plugin-utils': 7.24.0
regenerator-transform: 0.15.2
dev: true
- /@babel/[email protected](@babel/[email protected]):
+ /@babel/[email protected](@babel/[email protected]):
resolution: {integrity: sha512-JAclqStUfIwKN15HrsQADFgeZt+wexNQ0uLhuqvqAUFoqPMjEcFCYZBhq0LUdz6dZK/mD+rErhW71fbx8RYElg==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
- '@babel/core': 7.23.9
+ '@babel/core': 7.24.3
'@babel/helper-plugin-utils': 7.24.0
dev: true
- /@babel/[email protected](@babel/[email protected]):
+ /@babel/[email protected](@babel/[email protected]):
resolution: {integrity: sha512-LyjVB1nsJ6gTTUKRjRWx9C1s9hE7dLfP/knKdrfeH9UPtAGjYGgxIbFfx7xyLIEWs7Xe1Gnf8EWiUqfjLhInZA==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
- '@babel/core': 7.23.9
+ '@babel/core': 7.24.3
'@babel/helper-plugin-utils': 7.24.0
dev: true
- /@babel/[email protected](@babel/[email protected]):
+ /@babel/[email protected](@babel/[email protected]):
resolution: {integrity: sha512-KjmcIM+fxgY+KxPVbjelJC6hrH1CgtPmTvdXAfn3/a9CnWGSTY7nH4zm5+cjmWJybdcPSsD0++QssDsjcpe47g==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
- '@babel/core': 7.23.9
+ '@babel/core': 7.24.3
'@babel/helper-plugin-utils': 7.24.0
'@babel/helper-skip-transparent-expression-wrappers': 7.22.5
dev: true
- /@babel/[email protected](@babel/[email protected]):
+ /@babel/[email protected](@babel/[email protected]):
resolution: {integrity: sha512-9v0f1bRXgPVcPrngOQvLXeGNNVLc8UjMVfebo9ka0WF3/7+aVUHmaJVT3sa0XCzEFioPfPHZiOcYG9qOsH63cw==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
- '@babel/core': 7.23.9
+ '@babel/core': 7.24.3
'@babel/helper-plugin-utils': 7.24.0
dev: true
- /@babel/[email protected](@babel/[email protected]):
+ /@babel/[email protected](@babel/[email protected]):
resolution: {integrity: sha512-WRkhROsNzriarqECASCNu/nojeXCDTE/F2HmRgOzi7NGvyfYGq1NEjKBK3ckLfRgGc6/lPAqP0vDOSw3YtG34g==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
- '@babel/core': 7.23.9
+ '@babel/core': 7.24.3
'@babel/helper-plugin-utils': 7.24.0
dev: true
- /@babel/[email protected](@babel/[email protected]):
+ /@babel/[email protected](@babel/[email protected]):
resolution: {integrity: sha512-CBfU4l/A+KruSUoW+vTQthwcAdwuqbpRNB8HQKlZABwHRhsdHZ9fezp4Sn18PeAlYxTNiLMlx4xUBV3AWfg1BA==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
- '@babel/core': 7.23.9
+ '@babel/core': 7.24.3
'@babel/helper-plugin-utils': 7.24.0
dev: true
- /@babel/[email protected](@babel/[email protected]):
+ /@babel/[email protected](@babel/[email protected]):
resolution: {integrity: sha512-liYSESjX2fZ7JyBFkYG78nfvHlMKE6IpNdTVnxmlYUR+j5ZLsitFbaAE+eJSK2zPPkNWNw4mXL51rQ8WrvdK0w==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
- '@babel/core': 7.23.9
+ '@babel/core': 7.24.3
'@babel/helper-annotate-as-pure': 7.22.5
- '@babel/helper-create-class-features-plugin': 7.24.1(@babel/[email protected])
+ '@babel/helper-create-class-features-plugin': 7.24.1(@babel/[email protected])
'@babel/helper-plugin-utils': 7.24.0
- '@babel/plugin-syntax-typescript': 7.24.1(@babel/[email protected])
+ '@babel/plugin-syntax-typescript': 7.24.1(@babel/[email protected])
dev: true
- /@babel/[email protected](@babel/[email protected]):
+ /@babel/[email protected](@babel/[email protected]):
resolution: {integrity: sha512-RlkVIcWT4TLI96zM660S877E7beKlQw7Ig+wqkKBiWfj0zH5Q4h50q6er4wzZKRNSYpfo6ILJ+hrJAGSX2qcNw==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
- '@babel/core': 7.23.9
+ '@babel/core': 7.24.3
'@babel/helper-plugin-utils': 7.24.0
dev: true
- /@babel/[email protected](@babel/[email protected]):
+ /@babel/[email protected](@babel/[email protected]):
resolution: {integrity: sha512-Ss4VvlfYV5huWApFsF8/Sq0oXnGO+jB+rijFEFugTd3cwSObUSnUi88djgR5528Csl0uKlrI331kRqe56Ov2Ng==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
- '@babel/core': 7.23.9
- '@babel/helper-create-regexp-features-plugin': 7.22.15(@babel/[email protected])
+ '@babel/core': 7.24.3
+ '@babel/helper-create-regexp-features-plugin': 7.22.15(@babel/[email protected])
'@babel/helper-plugin-utils': 7.24.0
dev: true
- /@babel/[email protected](@babel/[email protected]):
+ /@babel/[email protected](@babel/[email protected]):
resolution: {integrity: sha512-2A/94wgZgxfTsiLaQ2E36XAOdcZmGAaEEgVmxQWwZXWkGhvoHbaqXcKnU8zny4ycpu3vNqg0L/PcCiYtHtA13g==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
- '@babel/core': 7.23.9
- '@babel/helper-create-regexp-features-plugin': 7.22.15(@babel/[email protected])
+ '@babel/core': 7.24.3
+ '@babel/helper-create-regexp-features-plugin': 7.22.15(@babel/[email protected])
'@babel/helper-plugin-utils': 7.24.0
dev: true
- /@babel/[email protected](@babel/[email protected]):
+ /@babel/[email protected](@babel/[email protected]):
resolution: {integrity: sha512-fqj4WuzzS+ukpgerpAoOnMfQXwUHFxXUZUE84oL2Kao2N8uSlvcpnAidKASgsNgzZHBsHWvcm8s9FPWUhAb8fA==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0
dependencies:
- '@babel/core': 7.23.9
- '@babel/helper-create-regexp-features-plugin': 7.22.15(@babel/[email protected])
+ '@babel/core': 7.24.3
+ '@babel/helper-create-regexp-features-plugin': 7.22.15(@babel/[email protected])
'@babel/helper-plugin-utils': 7.24.0
dev: true
- /@babel/[email protected](@babel/[email protected]):
+ /@babel/[email protected](@babel/[email protected]):
resolution: {integrity: sha512-fSk430k5c2ff8536JcPvPWK4tZDwehWLGlBp0wrsBUjZVdeQV6lePbwKWZaZfK2vnh/1kQX1PzAJWsnBmVgGJA==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
'@babel/compat-data': 7.24.1
- '@babel/core': 7.23.9
+ '@babel/core': 7.24.3
'@babel/helper-compilation-targets': 7.23.6
'@babel/helper-plugin-utils': 7.24.0
'@babel/helper-validator-option': 7.23.5
- '@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression': 7.24.1(@babel/[email protected])
- '@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining': 7.24.1(@babel/[email protected])
- '@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly': 7.24.1(@babel/[email protected])
- '@babel/plugin-proposal-private-property-in-object': 7.21.0-placeholder-for-preset-env.2(@babel/[email protected])
- '@babel/plugin-syntax-async-generators': 7.8.4(@babel/[email protected])
- '@babel/plugin-syntax-class-properties': 7.12.13(@babel/[email protected])
- '@babel/plugin-syntax-class-static-block': 7.14.5(@babel/[email protected])
- '@babel/plugin-syntax-dynamic-import': 7.8.3(@babel/[email protected])
- '@babel/plugin-syntax-export-namespace-from': 7.8.3(@babel/[email protected])
- '@babel/plugin-syntax-import-assertions': 7.24.1(@babel/[email protected])
- '@babel/plugin-syntax-import-attributes': 7.24.1(@babel/[email protected])
- '@babel/plugin-syntax-import-meta': 7.10.4(@babel/[email protected])
- '@babel/plugin-syntax-json-strings': 7.8.3(@babel/[email protected])
- '@babel/plugin-syntax-logical-assignment-operators': 7.10.4(@babel/[email protected])
- '@babel/plugin-syntax-nullish-coalescing-operator': 7.8.3(@babel/[email protected])
- '@babel/plugin-syntax-numeric-separator': 7.10.4(@babel/[email protected])
- '@babel/plugin-syntax-object-rest-spread': 7.8.3(@babel/[email protected])
- '@babel/plugin-syntax-optional-catch-binding': 7.8.3(@babel/[email protected])
- '@babel/plugin-syntax-optional-chaining': 7.8.3(@babel/[email protected])
- '@babel/plugin-syntax-private-property-in-object': 7.14.5(@babel/[email protected])
- '@babel/plugin-syntax-top-level-await': 7.14.5(@babel/[email protected])
- '@babel/plugin-syntax-unicode-sets-regex': 7.18.6(@babel/[email protected])
- '@babel/plugin-transform-arrow-functions': 7.24.1(@babel/[email protected])
- '@babel/plugin-transform-async-generator-functions': 7.24.3(@babel/[email protected])
- '@babel/plugin-transform-async-to-generator': 7.24.1(@babel/[email protected])
- '@babel/plugin-transform-block-scoped-functions': 7.24.1(@babel/[email protected])
- '@babel/plugin-transform-block-scoping': 7.24.1(@babel/[email protected])
- '@babel/plugin-transform-class-properties': 7.24.1(@babel/[email protected])
- '@babel/plugin-transform-class-static-block': 7.24.1(@babel/[email protected])
- '@babel/plugin-transform-classes': 7.24.1(@babel/[email protected])
- '@babel/plugin-transform-computed-properties': 7.24.1(@babel/[email protected])
- '@babel/plugin-transform-destructuring': 7.24.1(@babel/[email protected])
- '@babel/plugin-transform-dotall-regex': 7.24.1(@babel/[email protected])
- '@babel/plugin-transform-duplicate-keys': 7.24.1(@babel/[email protected])
- '@babel/plugin-transform-dynamic-import': 7.24.1(@babel/[email protected])
- '@babel/plugin-transform-exponentiation-operator': 7.24.1(@babel/[email protected])
- '@babel/plugin-transform-export-namespace-from': 7.24.1(@babel/[email protected])
- '@babel/plugin-transform-for-of': 7.24.1(@babel/[email protected])
- '@babel/plugin-transform-function-name': 7.24.1(@babel/[email protected])
- '@babel/plugin-transform-json-strings': 7.24.1(@babel/[email protected])
- '@babel/plugin-transform-literals': 7.24.1(@babel/[email protected])
- '@babel/plugin-transform-logical-assignment-operators': 7.24.1(@babel/[email protected])
- '@babel/plugin-transform-member-expression-literals': 7.24.1(@babel/[email protected])
- '@babel/plugin-transform-modules-amd': 7.24.1(@babel/[email protected])
- '@babel/plugin-transform-modules-commonjs': 7.24.1(@babel/[email protected])
- '@babel/plugin-transform-modules-systemjs': 7.24.1(@babel/[email protected])
- '@babel/plugin-transform-modules-umd': 7.24.1(@babel/[email protected])
- '@babel/plugin-transform-named-capturing-groups-regex': 7.22.5(@babel/[email protected])
- '@babel/plugin-transform-new-target': 7.24.1(@babel/[email protected])
- '@babel/plugin-transform-nullish-coalescing-operator': 7.24.1(@babel/[email protected])
- '@babel/plugin-transform-numeric-separator': 7.24.1(@babel/[email protected])
- '@babel/plugin-transform-object-rest-spread': 7.24.1(@babel/[email protected])
- '@babel/plugin-transform-object-super': 7.24.1(@babel/[email protected])
- '@babel/plugin-transform-optional-catch-binding': 7.24.1(@babel/[email protected])
- '@babel/plugin-transform-optional-chaining': 7.24.1(@babel/[email protected])
- '@babel/plugin-transform-parameters': 7.24.1(@babel/[email protected])
- '@babel/plugin-transform-private-methods': 7.24.1(@babel/[email protected])
- '@babel/plugin-transform-private-property-in-object': 7.24.1(@babel/[email protected])
- '@babel/plugin-transform-property-literals': 7.24.1(@babel/[email protected])
- '@babel/plugin-transform-regenerator': 7.24.1(@babel/[email protected])
- '@babel/plugin-transform-reserved-words': 7.24.1(@babel/[email protected])
- '@babel/plugin-transform-shorthand-properties': 7.24.1(@babel/[email protected])
- '@babel/plugin-transform-spread': 7.24.1(@babel/[email protected])
- '@babel/plugin-transform-sticky-regex': 7.24.1(@babel/[email protected])
- '@babel/plugin-transform-template-literals': 7.24.1(@babel/[email protected])
- '@babel/plugin-transform-typeof-symbol': 7.24.1(@babel/[email protected])
- '@babel/plugin-transform-unicode-escapes': 7.24.1(@babel/[email protected])
- '@babel/plugin-transform-unicode-property-regex': 7.24.1(@babel/[email protected])
- '@babel/plugin-transform-unicode-regex': 7.24.1(@babel/[email protected])
- '@babel/plugin-transform-unicode-sets-regex': 7.24.1(@babel/[email protected])
- '@babel/preset-modules': 0.1.6-no-external-plugins(@babel/[email protected])
- babel-plugin-polyfill-corejs2: 0.4.10(@babel/[email protected])
- babel-plugin-polyfill-corejs3: 0.10.4(@babel/[email protected])
- babel-plugin-polyfill-regenerator: 0.6.1(@babel/[email protected])
+ '@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression': 7.24.1(@babel/[email protected])
+ '@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining': 7.24.1(@babel/[email protected])
+ '@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly': 7.24.1(@babel/[email protected])
+ '@babel/plugin-proposal-private-property-in-object': 7.21.0-placeholder-for-preset-env.2(@babel/[email protected])
+ '@babel/plugin-syntax-async-generators': 7.8.4(@babel/[email protected])
+ '@babel/plugin-syntax-class-properties': 7.12.13(@babel/[email protected])
+ '@babel/plugin-syntax-class-static-block': 7.14.5(@babel/[email protected])
+ '@babel/plugin-syntax-dynamic-import': 7.8.3(@babel/[email protected])
+ '@babel/plugin-syntax-export-namespace-from': 7.8.3(@babel/[email protected])
+ '@babel/plugin-syntax-import-assertions': 7.24.1(@babel/[email protected])
+ '@babel/plugin-syntax-import-attributes': 7.24.1(@babel/[email protected])
+ '@babel/plugin-syntax-import-meta': 7.10.4(@babel/[email protected])
+ '@babel/plugin-syntax-json-strings': 7.8.3(@babel/[email protected])
+ '@babel/plugin-syntax-logical-assignment-operators': 7.10.4(@babel/[email protected])
+ '@babel/plugin-syntax-nullish-coalescing-operator': 7.8.3(@babel/[email protected])
+ '@babel/plugin-syntax-numeric-separator': 7.10.4(@babel/[email protected])
+ '@babel/plugin-syntax-object-rest-spread': 7.8.3(@babel/[email protected])
+ '@babel/plugin-syntax-optional-catch-binding': 7.8.3(@babel/[email protected])
+ '@babel/plugin-syntax-optional-chaining': 7.8.3(@babel/[email protected])
+ '@babel/plugin-syntax-private-property-in-object': 7.14.5(@babel/[email protected])
+ '@babel/plugin-syntax-top-level-await': 7.14.5(@babel/[email protected])
+ '@babel/plugin-syntax-unicode-sets-regex': 7.18.6(@babel/[email protected])
+ '@babel/plugin-transform-arrow-functions': 7.24.1(@babel/[email protected])
+ '@babel/plugin-transform-async-generator-functions': 7.24.3(@babel/[email protected])
+ '@babel/plugin-transform-async-to-generator': 7.24.1(@babel/[email protected])
+ '@babel/plugin-transform-block-scoped-functions': 7.24.1(@babel/[email protected])
+ '@babel/plugin-transform-block-scoping': 7.24.1(@babel/[email protected])
+ '@babel/plugin-transform-class-properties': 7.24.1(@babel/[email protected])
+ '@babel/plugin-transform-class-static-block': 7.24.1(@babel/[email protected])
+ '@babel/plugin-transform-classes': 7.24.1(@babel/[email protected])
+ '@babel/plugin-transform-computed-properties': 7.24.1(@babel/[email protected])
+ '@babel/plugin-transform-destructuring': 7.24.1(@babel/[email protected])
+ '@babel/plugin-transform-dotall-regex': 7.24.1(@babel/[email protected])
+ '@babel/plugin-transform-duplicate-keys': 7.24.1(@babel/[email protected])
+ '@babel/plugin-transform-dynamic-import': 7.24.1(@babel/[email protected])
+ '@babel/plugin-transform-exponentiation-operator': 7.24.1(@babel/[email protected])
+ '@babel/plugin-transform-export-namespace-from': 7.24.1(@babel/[email protected])
+ '@babel/plugin-transform-for-of': 7.24.1(@babel/[email protected])
+ '@babel/plugin-transform-function-name': 7.24.1(@babel/[email protected])
+ '@babel/plugin-transform-json-strings': 7.24.1(@babel/[email protected])
+ '@babel/plugin-transform-literals': 7.24.1(@babel/[email protected])
+ '@babel/plugin-transform-logical-assignment-operators': 7.24.1(@babel/[email protected])
+ '@babel/plugin-transform-member-expression-literals': 7.24.1(@babel/[email protected])
+ '@babel/plugin-transform-modules-amd': 7.24.1(@babel/[email protected])
+ '@babel/plugin-transform-modules-commonjs': 7.24.1(@babel/[email protected])
+ '@babel/plugin-transform-modules-systemjs': 7.24.1(@babel/[email protected])
+ '@babel/plugin-transform-modules-umd': 7.24.1(@babel/[email protected])
+ '@babel/plugin-transform-named-capturing-groups-regex': 7.22.5(@babel/[email protected])
+ '@babel/plugin-transform-new-target': 7.24.1(@babel/[email protected])
+ '@babel/plugin-transform-nullish-coalescing-operator': 7.24.1(@babel/[email protected])
+ '@babel/plugin-transform-numeric-separator': 7.24.1(@babel/[email protected])
+ '@babel/plugin-transform-object-rest-spread': 7.24.1(@babel/[email protected])
+ '@babel/plugin-transform-object-super': 7.24.1(@babel/[email protected])
+ '@babel/plugin-transform-optional-catch-binding': 7.24.1(@babel/[email protected])
+ '@babel/plugin-transform-optional-chaining': 7.24.1(@babel/[email protected])
+ '@babel/plugin-transform-parameters': 7.24.1(@babel/[email protected])
+ '@babel/plugin-transform-private-methods': 7.24.1(@babel/[email protected])
+ '@babel/plugin-transform-private-property-in-object': 7.24.1(@babel/[email protected])
+ '@babel/plugin-transform-property-literals': 7.24.1(@babel/[email protected])
+ '@babel/plugin-transform-regenerator': 7.24.1(@babel/[email protected])
+ '@babel/plugin-transform-reserved-words': 7.24.1(@babel/[email protected])
+ '@babel/plugin-transform-shorthand-properties': 7.24.1(@babel/[email protected])
+ '@babel/plugin-transform-spread': 7.24.1(@babel/[email protected])
+ '@babel/plugin-transform-sticky-regex': 7.24.1(@babel/[email protected])
+ '@babel/plugin-transform-template-literals': 7.24.1(@babel/[email protected])
+ '@babel/plugin-transform-typeof-symbol': 7.24.1(@babel/[email protected])
+ '@babel/plugin-transform-unicode-escapes': 7.24.1(@babel/[email protected])
+ '@babel/plugin-transform-unicode-property-regex': 7.24.1(@babel/[email protected])
+ '@babel/plugin-transform-unicode-regex': 7.24.1(@babel/[email protected])
+ '@babel/plugin-transform-unicode-sets-regex': 7.24.1(@babel/[email protected])
+ '@babel/preset-modules': 0.1.6-no-external-plugins(@babel/[email protected])
+ babel-plugin-polyfill-corejs2: 0.4.10(@babel/[email protected])
+ babel-plugin-polyfill-corejs3: 0.10.4(@babel/[email protected])
+ babel-plugin-polyfill-regenerator: 0.6.1(@babel/[email protected])
core-js-compat: 3.36.1
semver: 6.3.1
transitivePeerDependencies:
- supports-color
dev: true
- /@babel/[email protected](@babel/[email protected]):
+ /@babel/[email protected](@babel/[email protected]):
resolution: {integrity: sha512-HrcgcIESLm9aIR842yhJ5RWan/gebQUJ6E/E5+rf0y9o6oj7w0Br+sWuL6kEQ/o/AdfvR1Je9jG18/gnpwjEyA==}
peerDependencies:
'@babel/core': ^7.0.0-0 || ^8.0.0-0 <8.0.0
dependencies:
- '@babel/core': 7.23.9
+ '@babel/core': 7.24.3
'@babel/helper-plugin-utils': 7.24.0
'@babel/types': 7.24.0
esutils: 2.0.3
dev: true
- /@babel/[email protected](@babel/[email protected]):
+ /@babel/[email protected](@babel/[email protected]):
resolution: {integrity: sha512-1DBaMmRDpuYQBPWD8Pf/WEwCrtgRHxsZnP4mIy9G/X+hFfbI47Q2G4t1Paakld84+qsk2fSsUPMKg71jkoOOaQ==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
- '@babel/core': 7.23.9
+ '@babel/core': 7.24.3
'@babel/helper-plugin-utils': 7.24.0
'@babel/helper-validator-option': 7.23.5
- '@babel/plugin-syntax-jsx': 7.24.1(@babel/[email protected])
- '@babel/plugin-transform-modules-commonjs': 7.24.1(@babel/[email protected])
- '@babel/plugin-transform-typescript': 7.24.1(@babel/[email protected])
+ '@babel/plugin-syntax-jsx': 7.24.1(@babel/[email protected])
+ '@babel/plugin-transform-modules-commonjs': 7.24.1(@babel/[email protected])
+ '@babel/plugin-transform-typescript': 7.24.1(@babel/[email protected])
dev: true
/@babel/[email protected]:
@@ -1592,12 +1618,12 @@ packages:
'@babel/types': 7.24.0
dev: true
- /@babel/[email protected]:
- resolution: {integrity: sha512-I/4UJ9vs90OkBtY6iiiTORVMyIhJ4kAVmsKo9KFc8UOxMeUfi2hvtIBsET5u9GizXE6/GFSuKCTNfgCswuEjRg==}
+ /@babel/[email protected]:
+ resolution: {integrity: sha512-xuU6o9m68KeqZbQuDt2TcKSxUw/mrsvavlEqQ1leZ/B+C9tk6E4sRWy97WaXgvq5E+nU3cXMxv3WKOCanVMCmQ==}
engines: {node: '>=6.9.0'}
dependencies:
- '@babel/code-frame': 7.23.5
- '@babel/generator': 7.23.6
+ '@babel/code-frame': 7.24.2
+ '@babel/generator': 7.24.1
'@babel/helper-environment-visitor': 7.22.20
'@babel/helper-function-name': 7.23.0
'@babel/helper-hoist-variables': 7.22.5
@@ -1959,6 +1985,15 @@ packages:
'@jridgewell/trace-mapping': 0.3.22
dev: true
+ /@jridgewell/[email protected]:
+ resolution: {integrity: sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==}
+ engines: {node: '>=6.0.0'}
+ dependencies:
+ '@jridgewell/set-array': 1.2.1
+ '@jridgewell/sourcemap-codec': 1.4.15
+ '@jridgewell/trace-mapping': 0.3.25
+ dev: true
+
/@jridgewell/[email protected]:
resolution: {integrity: sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==}
engines: {node: '>=6.0.0'}
@@ -1969,6 +2004,11 @@ packages:
engines: {node: '>=6.0.0'}
dev: true
+ /@jridgewell/[email protected]:
+ resolution: {integrity: sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==}
+ engines: {node: '>=6.0.0'}
+ dev: true
+
/@jridgewell/[email protected]:
resolution: {integrity: sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==}
dev: true
@@ -2331,16 +2371,16 @@ packages:
resolution: {integrity: sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==}
dev: true
- /@sindresorhus/[email protected]:
- resolution: {integrity: sha512-t09vSN3MdfsyCHoFcTRCH/iUtG7OJ0CsjzB8cjAmKc/va/kIgeDI/TxsigdncE/4be734m0cvIYwNaV4i2XqAw==}
- engines: {node: '>=10'}
- dev: false
-
/@sindresorhus/[email protected]:
resolution: {integrity: sha512-TV7t8GKYaJWsn00tFDqBw8+Uqmr8A0fRU1tvTQhyZzGv0sJCGRQL3JGMI3ucuKo3XIZdUP+Lx7/gh2t3lewy7g==}
engines: {node: '>=14.16'}
dev: false
+ /@sindresorhus/[email protected]:
+ resolution: {integrity: sha512-yM/IGPkVnYGblhDosFBwq0ZGdnVSBkNV4onUtipGMOjZd4kB6GAu3ys91aftSbyMHh6A2GPdt+KDI5NoWP63MQ==}
+ engines: {node: '>=16'}
+ dev: false
+
/@stylistic/[email protected]([email protected]):
resolution: {integrity: sha512-PN6On/+or63FGnhhMKSQfYcWutRlzOiYlVdLM6yN7lquoBTqUJHYnl4TA4MHwiAt46X5gRxDr1+xPZ1lOLcL+Q==}
engines: {node: ^16.0.0 || >=18.0.0}
@@ -2413,13 +2453,6 @@ packages:
- typescript
dev: true
- /@szmarczak/[email protected]:
- resolution: {integrity: sha512-4BAffykYOgO+5nzBWYwE3W90sBgLJoUPRWWcL8wlyiM8IB8ipJz3UMJ9KXQd1RKQXpKp8Tutn80HZtWsu2u76w==}
- engines: {node: '>=10'}
- dependencies:
- defer-to-connect: 2.0.1
- dev: false
-
/@szmarczak/[email protected]:
resolution: {integrity: sha512-+PmQX0PiAYPMeVYe237LJAYvOMYW1j2rH5YROyS3b4CTVJum34HfRvKvAzozHAQG0TnHNdUfY9nCeUyRAs//cw==}
engines: {node: '>=14.16'}
@@ -2444,15 +2477,6 @@ packages:
resolution: {integrity: sha512-Jhy+MWRlro6UjVi578V/4ZGNfeCOcNCp0YaFNIUGFKlImowqwb1O/22wDVk3FDGMLqxdpOV3qQHD5fPEH4hK6A==}
dev: false
- /@types/[email protected]:
- resolution: {integrity: sha512-IQ3EbTzGxIigb1I3qPZc1rWJnH0BmSKv5QYTalEwweFvyBDLSAe24zP0le/hyi7ecGfZVlIVAg4BZqb8WBwKqw==}
- dependencies:
- '@types/http-cache-semantics': 4.0.4
- '@types/keyv': 3.1.4
- '@types/node': 20.11.30
- '@types/responselike': 1.0.3
- dev: false
-
/@types/[email protected]:
resolution: {integrity: sha512-hWtVTC2q7hc7xZ/RLbxapMvDMgUnDvKvMOpKal4DrMyfGBUfB1oKaZlIRr6mJL+If3bAP6sV/QneGzF6tJjZDg==}
@@ -2545,12 +2569,6 @@ packages:
'@types/node': 20.11.30
dev: true
- /@types/[email protected]:
- resolution: {integrity: sha512-BQ5aZNSCpj7D6K2ksrRCTmKRLEpnPvWDiLPfoGyhZ++8YtiK9d/3DBKPJgry359X/P1PfruyYwvnvwFjuEiEIg==}
- dependencies:
- '@types/node': 20.11.30
- dev: false
-
/@types/[email protected]:
resolution: {integrity: sha512-yg6E+u0/+Zjva+buc3EIb+29XEg4wltq7cSmd4Uc2EE/1nUVmxyzpX6gUXD0V8jIrG0r7YeOGVIbYRkxeooCtw==}
dev: true
@@ -2631,12 +2649,6 @@ packages:
'@types/tough-cookie': 4.0.5
form-data: 2.5.1
- /@types/[email protected]:
- resolution: {integrity: sha512-H/+L+UkTV33uf49PH5pCAUBVPNj2nDBXTN+qS1dOwyyg24l3CcicicCA7ca+HMvJBZcFgl5r8e+RR6elsb4Lyw==}
- dependencies:
- '@types/node': 20.11.30
- dev: false
-
/@types/[email protected]:
resolution: {integrity: sha512-7oxPGNQHXLHE48r/r/qjn7q0hlrs3kL7oZnGj0Wf/h9tj/6ibFyRkNbsDxaBBZ4XUZ0Dx5LGCyDJ04ytSofacQ==}
dependencies:
@@ -3212,38 +3224,38 @@ packages:
resolution: {integrity: sha512-5Tk1HLk6b6ctmjIkAcU/Ujv/1WqiDl0F0JdRCR80VsOcUlHcu7pWeWRlOqQLHfDEsVx9YH/aif5AG4ehoCtTmg==}
dev: false
- /[email protected](@babel/[email protected]):
+ /[email protected](@babel/[email protected]):
resolution: {integrity: sha512-rpIuu//y5OX6jVU+a5BCn1R5RSZYWAl2Nar76iwaOdycqb6JPxediskWFMMl7stfwNJR4b7eiQvh5fB5TEQJTQ==}
peerDependencies:
'@babel/core': ^7.4.0 || ^8.0.0-0 <8.0.0
dependencies:
'@babel/compat-data': 7.24.1
- '@babel/core': 7.23.9
- '@babel/helper-define-polyfill-provider': 0.6.1(@babel/[email protected])
+ '@babel/core': 7.24.3
+ '@babel/helper-define-polyfill-provider': 0.6.1(@babel/[email protected])
semver: 6.3.1
transitivePeerDependencies:
- supports-color
dev: true
- /[email protected](@babel/[email protected]):
+ /[email protected](@babel/[email protected]):
resolution: {integrity: sha512-25J6I8NGfa5YkCDogHRID3fVCadIR8/pGl1/spvCkzb6lVn6SR3ojpx9nOn9iEBcUsjY24AmdKm5khcfKdylcg==}
peerDependencies:
'@babel/core': ^7.4.0 || ^8.0.0-0 <8.0.0
dependencies:
- '@babel/core': 7.23.9
- '@babel/helper-define-polyfill-provider': 0.6.1(@babel/[email protected])
+ '@babel/core': 7.24.3
+ '@babel/helper-define-polyfill-provider': 0.6.1(@babel/[email protected])
core-js-compat: 3.36.1
transitivePeerDependencies:
- supports-color
dev: true
- /[email protected](@babel/[email protected]):
+ /[email protected](@babel/[email protected]):
resolution: {integrity: sha512-JfTApdE++cgcTWjsiCQlLyFBMbTUft9ja17saCc93lgV33h4tuCVj7tlvu//qpLwaG+3yEz7/KhahGrUMkVq9g==}
peerDependencies:
'@babel/core': ^7.4.0 || ^8.0.0-0 <8.0.0
dependencies:
- '@babel/core': 7.23.9
- '@babel/helper-define-polyfill-provider': 0.6.1(@babel/[email protected])
+ '@babel/core': 7.24.3
+ '@babel/helper-define-polyfill-provider': 0.6.1(@babel/[email protected])
transitivePeerDependencies:
- supports-color
dev: true
@@ -3265,8 +3277,8 @@ packages:
dev: false
optional: true
- /[email protected]:
- resolution: {integrity: sha512-5t0nlecX+N2uJqdxe9d18A98cp2u9BETelbjKpiVgQqzzmVNFYWEAjQHqS+2Khgto1vcwhik9cXucaj5ve2WWA==}
+ /[email protected]:
+ resolution: {integrity: sha512-X9IqgvyB0/VA5OZJyb5ZstoN62AzD7YxVGog13kkfYWYqJYcK0kcqLZ6TrmH5qr4/8//ejVcX4x/a0UvaogXmA==}
requiresBuild: true
dependencies:
bare-events: 2.2.0
@@ -3424,11 +3436,6 @@ packages:
engines: {node: '>=8'}
dev: true
- /[email protected]:
- resolution: {integrity: sha512-2/kNscPhpcxrOigMZzbiWF7dz8ilhb/nIHU3EyZiXWXpeq/au8qJ8VhdftMkty3n7Gj6HIGalQG8oiBNB3AJgA==}
- engines: {node: '>=10.6.0'}
- dev: false
-
/[email protected]:
resolution: {integrity: sha512-+qJyx4xiKra8mZrcwhjMRMUhD5NR1R8esPkzIYxX96JiecFoxAXFuz/GpR3+ev4PE1WamHip78wV0vcmPQtp8w==}
engines: {node: '>=14.16'}
@@ -3443,23 +3450,10 @@ packages:
http-cache-semantics: 4.1.1
keyv: 4.5.4
mimic-response: 4.0.0
- normalize-url: 8.0.0
+ normalize-url: 8.0.1
responselike: 3.0.0
dev: false
- /[email protected]:
- resolution: {integrity: sha512-v+p6ongsrp0yTGbJXjgxPow2+DL93DASP4kXCDKb8/bwRtt9OEF3whggkkDkGNzgcWy2XaF4a8nZglC7uElscg==}
- engines: {node: '>=8'}
- dependencies:
- clone-response: 1.0.3
- get-stream: 5.2.0
- http-cache-semantics: 4.1.1
- keyv: 4.5.4
- lowercase-keys: 2.0.0
- normalize-url: 6.1.0
- responselike: 2.0.1
- dev: false
-
/[email protected]:
resolution: {integrity: sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==}
engines: {node: '>= 0.4'}
@@ -3739,12 +3733,6 @@ packages:
shallow-clone: 0.1.2
dev: false
- /[email protected]:
- resolution: {integrity: sha512-ROoL94jJH2dUVML2Y/5PEDNaSHgeOdSDicUyS7izcF63G6sTc/FTjLub4b8Il9S8S0beOfYt0TaA5qvFK+w0wA==}
- dependencies:
- mimic-response: 1.0.1
- dev: false
-
/[email protected]:
resolution: {integrity: sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg==}
engines: {node: '>=0.8'}
@@ -4947,6 +4935,11 @@ packages:
engines: {node: '>= 14.17'}
dev: false
+ /[email protected]:
+ resolution: {integrity: sha512-KQVhvhK8ZkWzxKxOr56CPulAhH3dobtuQ4+hNQ+HekH/Wp5gSOafqRAeTphQUJAIk0GBvHZgJ2ZGRWd5kphMuw==}
+ engines: {node: '>= 18'}
+ dev: false
+
/[email protected]:
resolution: {integrity: sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==}
engines: {node: '>= 0.12'}
@@ -5106,7 +5099,6 @@ packages:
/[email protected]:
resolution: {integrity: sha512-VaUJspBffn/LMCJVoMvSAdmscJyS1auj5Zulnn5UoYcY531UWmdwhRWkcGKnGU93m5HSXP9LP2usOryrBtQowA==}
engines: {node: '>=16'}
- dev: true
/[email protected]:
resolution: {integrity: sha512-wuMsz4leaj5hbGgg4IvDU0bqJagpftG5l5cXIAvo8uZrqn0NJqwtfupTN00VnkQJPcIRrxYrm1Ue24btpCha2A==}
@@ -5237,23 +5229,6 @@ packages:
dependencies:
get-intrinsic: 1.2.4
- /[email protected]:
- resolution: {integrity: sha512-6tfZ91bOr7bOXnK7PRDCGBLa1H4U080YHNaAQ2KsMGlLEzRbk44nsZF2E1IeRc3vtJHPVbKCYgdFbaGO2ljd8g==}
- engines: {node: '>=10.19.0'}
- dependencies:
- '@sindresorhus/is': 4.6.0
- '@szmarczak/http-timer': 4.0.6
- '@types/cacheable-request': 6.0.3
- '@types/responselike': 1.0.3
- cacheable-lookup: 5.0.4
- cacheable-request: 7.0.4
- decompress-response: 6.0.0
- http2-wrapper: 1.0.3
- lowercase-keys: 2.0.0
- p-cancelable: 2.1.1
- responselike: 2.0.1
- dev: false
-
/[email protected]:
resolution: {integrity: sha512-mThBblvlAF1d4O5oqyvN+ZxLAYwIJK7bpMxgYqPD9okW0C3qm5FFn7k811QrcuEBwaogR3ngOFoCfs6mRv7teQ==}
engines: {node: '>=14.16'}
@@ -5271,6 +5246,23 @@ packages:
responselike: 3.0.0
dev: false
+ /[email protected]:
+ resolution: {integrity: sha512-KOaPMremmsvx6l9BLC04LYE6ZFW4x7e4HkTe3LwBmtuYYQwpeS4XKqzhubTIkaQ1Nr+eXxeori0zuwupXMovBQ==}
+ engines: {node: '>=20'}
+ dependencies:
+ '@sindresorhus/is': 6.2.0
+ '@szmarczak/http-timer': 5.0.1
+ cacheable-lookup: 7.0.0
+ cacheable-request: 10.2.14
+ decompress-response: 6.0.0
+ form-data-encoder: 4.0.2
+ get-stream: 8.0.1
+ http2-wrapper: 2.2.1
+ lowercase-keys: 3.0.0
+ p-cancelable: 4.0.1
+ responselike: 3.0.0
+ dev: false
+
/[email protected]:
resolution: {integrity: sha512-6uHUhOPEBgQ24HM+r6b/QwWfZq+yiFcipKFrOFiBEnWdy5sdzYoi+pJeQaPI5qOLRFqWmAXUPQNsielzdLoecA==}
dev: false
@@ -5472,14 +5464,6 @@ packages:
sshpk: 1.18.0
dev: false
- /[email protected]:
- resolution: {integrity: sha512-V+23sDMr12Wnz7iTcDeJr3O6AIxlnvT/bmaAAAP/Xda35C90p9599p0F1eHR/N1KILWSoWVAiOMFjBBXaXSMxg==}
- engines: {node: '>=10.19.0'}
- dependencies:
- quick-lru: 5.1.1
- resolve-alpn: 1.2.1
- dev: false
-
/[email protected]:
resolution: {integrity: sha512-V5nVw1PAOgfI3Lmeaj2Exmeg7fenjhRUgz1lPSezy1CuhPYbgQtbQj4jZfEAEMlaL+vupsvhjqCyjzob0yxsmQ==}
engines: {node: '>=10.19.0'}
@@ -6278,11 +6262,6 @@ packages:
resolution: {integrity: sha512-2Fgx1Ycm599x+WGpIYwJOvsjmXFzTSc34IwDWALRA/8AopUKAVPwfJ+h5+f85BCp0PWmmJcWzEpxOpoXycMpdA==}
dev: false
- /[email protected]:
- resolution: {integrity: sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==}
- engines: {node: '>=8'}
- dev: false
-
/[email protected]:
resolution: {integrity: sha512-ozCC6gdQ+glXOQsveKD0YsDy8DSQFjDTz4zyzEHNV5+JP5D62LmfDZ6o1cycFx9ouG940M5dE8C8CTewdj2YWQ==}
engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0}
@@ -6679,11 +6658,6 @@ packages:
engines: {node: '>=12'}
dev: true
- /[email protected]:
- resolution: {integrity: sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==}
- engines: {node: '>=4'}
- dev: false
-
/[email protected]:
resolution: {integrity: sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==}
engines: {node: '>=10'}
@@ -6877,13 +6851,8 @@ packages:
validate-npm-package-license: 3.0.4
dev: true
- /[email protected]:
- resolution: {integrity: sha512-DlL+XwOy3NxAQ8xuC0okPgK46iuVNAK01YN7RueYBqqFeGsBjV9XmCAzAdgt+667bCl5kPh9EqKKDwnaPG1I7A==}
- engines: {node: '>=10'}
- dev: false
-
- /[email protected]:
- resolution: {integrity: sha512-uVFpKhj5MheNBJRTiMZ9pE/7hD1QTeEvugSJW/OmLzAp78PB5O6adfMNTvmfKhXBkvCzC+rqifWcVYpGFwTjnw==}
+ /[email protected]:
+ resolution: {integrity: sha512-IO9QvjUMWxPQQhs60oOu10CRkWCiZzSUkzbXGGV9pviYl1fXYcvkzQ5jV9z8Y6un8ARoVRl4EtC6v6jNqbaJ/w==}
engines: {node: '>=14.16'}
dev: false
@@ -7039,16 +7008,16 @@ packages:
'@otplib/preset-v11': 12.0.1
dev: false
- /[email protected]:
- resolution: {integrity: sha512-BZOr3nRQHOntUjTrH8+Lh54smKHoHyur8We1V8DSMVrl5A2malOOwuJRnKRDjSnkoeBh4at6BwEnb5I7Jl31wg==}
- engines: {node: '>=8'}
- dev: false
-
/[email protected]:
resolution: {integrity: sha512-mlVgR3PGuzlo0MmTdk4cXqXWlwQDLnONTAg6sm62XkMJEiRxN3GL3SffkYvqwonbkJBcrI7Uvv5Zh9yjvn2iUw==}
engines: {node: '>=12.20'}
dev: false
+ /[email protected]:
+ resolution: {integrity: sha512-wBowNApzd45EIKdO1LaU+LrMBwAcjfPaYtVzV3lmfM3gf8Z4CHZsiIqlM8TZZ8okYvh5A1cP6gTfCRQtwUpaUg==}
+ engines: {node: '>=14.16'}
+ dev: false
+
/[email protected]:
resolution: {integrity: sha512-LICb2p9CB7FS+0eR1oqWnHhp0FljGLZCWBE9aix0Uye9W8LTQPwMTYVGWQWIw9RdQiDg4+epXQODwIYJtSJaow==}
engines: {node: '>=4'}
@@ -7840,12 +7809,6 @@ packages:
path-parse: 1.0.7
supports-preserve-symlinks-flag: 1.0.0
- /[email protected]:
- resolution: {integrity: sha512-4gl03wn3hj1HP3yzgdI7d3lCkF95F21Pz4BPGvKHinyQzALR5CapwC8yIi0Rh58DEMQ/SguC03wFj2k0M/mHhw==}
- dependencies:
- lowercase-keys: 2.0.0
- dev: false
-
/[email protected]:
resolution: {integrity: sha512-40yHxbNcl2+rzXvZuVkrYohathsSJlMTXKryG5y8uciHv1+xDLHQpgjG64JUO9nrEq2jGLH6IZ8BcZyw3wrweg==}
engines: {node: '>=14.16'}
@@ -8443,7 +8406,7 @@ packages:
pump: 3.0.0
tar-stream: 3.1.7
optionalDependencies:
- bare-fs: 2.1.5
+ bare-fs: 2.2.2
bare-path: 2.1.0
dev: false
|
6165caf498a57e231e6dd0c81c73d1eb885830b4
|
2025-01-09 20:32:19
|
Hossein Margani
|
fix(route): Microsoft Artifact Registry route (#18081)
| false
|
Microsoft Artifact Registry route (#18081)
|
fix
|
diff --git a/lib/routes/microsoft/mcr.ts b/lib/routes/microsoft/mcr.ts
index 4d488a8c73d983..da124729163fe9 100644
--- a/lib/routes/microsoft/mcr.ts
+++ b/lib/routes/microsoft/mcr.ts
@@ -28,11 +28,11 @@ async function handler(ctx) {
const product = ctx.req.path.replace('/microsoft/mcr/product/', '');
const { data: details } = await got({
method: 'get',
- url: `https://mcr.microsoft.com/api/v1/catalog/${product}/details`,
+ url: `https://mcr.microsoft.com/api/v1/catalog/${product}/details?reg=mar`,
});
const { data: tags } = await got({
method: 'get',
- url: `https://mcr.microsoft.com/api/v1/catalog/${product}/tags`,
+ url: `https://mcr.microsoft.com/api/v1/catalog/${product}/tags?reg=mar`,
});
return {
|
18948db1d9d1758e8c6a305ec8871423f8a5ea2e
|
2024-06-13 15:03:31
|
dependabot[bot]
|
chore(deps-dev): bump lint-staged from 15.2.6 to 15.2.7 (#15888)
| false
|
bump lint-staged from 15.2.6 to 15.2.7 (#15888)
|
chore
|
diff --git a/package.json b/package.json
index 605711fba0d92c..bf29b6ceee099f 100644
--- a/package.json
+++ b/package.json
@@ -169,7 +169,7 @@
"got": "14.4.1",
"husky": "9.0.11",
"js-beautify": "1.15.1",
- "lint-staged": "15.2.6",
+ "lint-staged": "15.2.7",
"mockdate": "3.0.5",
"msw": "2.3.1",
"prettier": "3.3.2",
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 6f403c9e17f1b0..ac3bf4411d597b 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -361,8 +361,8 @@ importers:
specifier: 1.15.1
version: 1.15.1
lint-staged:
- specifier: 15.2.6
- version: 15.2.6
+ specifier: 15.2.7
+ version: 15.2.7
mockdate:
specifier: 3.0.5
version: 3.0.5
@@ -2102,8 +2102,8 @@ packages:
[email protected]:
resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==}
- [email protected]:
- resolution: {integrity: sha512-sJnSOTVESURZ61XgEleqmP255T6zTYwHPwE4r6SssIh0U9/uDvfpdoJYpVUerJJZH2fueO+CdT8ZT+OC/7aZDA==}
+ [email protected]:
+ resolution: {integrity: sha512-qMKFd2qG/36aA4GwvKq8MxnPgCQAmBWmSyLWsJcbn8v03wvIPQ/hG1Ms8bPzndZxMDoHpxez5VOS+gC9Yi24/Q==}
[email protected]:
resolution: {integrity: sha512-W/Hfxc/6VehXlsgFtbB5B4xFcsCl+pAh30cYhoFyXErf6oGrwjh8SwiPAdHgpmWonKuYpZgGywN0SXt7dgsADA==}
@@ -2229,8 +2229,8 @@ packages:
resolution: {integrity: sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==}
engines: {node: '>=10'}
- [email protected]:
- resolution: {integrity: sha512-udx3o7yHJfUxMLkGohMlVHCvFvWmirKh9JAH/d7WOLPetlH+LTL5cocMZ0t7oZx/mdlOWXti97xLZWc8uURRHg==}
+ [email protected]:
+ resolution: {integrity: sha512-6sT0yf/z5jqf8tISAgpJDrmwOpLsrpnyCdD/lOZKvKkkJK4Dn0X5i7KF7THEZhOq+30bmhwBlNEaqPUiHiKtZg==}
[email protected]:
resolution: {integrity: sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw==}
@@ -2691,8 +2691,8 @@ packages:
engines: {node: '>=14'}
hasBin: true
- [email protected]:
- resolution: {integrity: sha512-3D3DwWkRTzrdEpntY0hMLYwj7SeBk1138CkPE8sBDSj3WzrzOiG2rHm3luw8jucpf+WiyLBCZyU9lMHyQI9M9Q==}
+ [email protected]:
+ resolution: {integrity: sha512-PnlUz15ii38MZMD2/CEsAzyee8tv9vFntX5nhtd2/4tv4HqY7C5q2faUAjmkXS/UFpVooJ/5H6kayRKYWoGMXQ==}
[email protected]:
resolution: {integrity: sha512-5gxbEjcb/Z2n6TTmXZx9wVi3N/DOzE7RXY3Xg9dakDuhX/izwumB9rGjeWUV6dTA0D0+juvo+JonZgNR9sgA5A==}
@@ -3215,8 +3215,8 @@ packages:
[email protected]:
resolution: {integrity: sha512-uHJgbwAMwNFf5mLst7IWLNg14x1CkeqglJb/K3doi4dw6q2IvAAmM/Y81kevy83wP+Sst+nutFTYOGg3d1lsxg==}
- [email protected]:
- resolution: {integrity: sha512-ol+oSa5NbcGdDqA+gZ3G3mev59OHBZksBTxY/tYwjtcp1H/scAFwJfSQU9/1RALoyZ7FslNbke8j4i3ipwlyuQ==}
+ [email protected]:
+ resolution: {integrity: sha512-epX3ww/mNnhl6tL45EQ/oixsY8JLEgUFoT4A5E/5iAR4esld9Kqv6IJGk7EmGuOgDvaarwF95hU2+v7Irql9lw==}
engines: {node: '>=14'}
[email protected]:
@@ -3244,8 +3244,8 @@ packages:
[email protected]:
resolution: {integrity: sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==}
- [email protected]:
- resolution: {integrity: sha512-59LZHPdGZVh695Ud9lRzPBVTtlX9ZCV150Er2W43ro37wVof0ctenSaskPPjN7lVTIN8mSZt8PHUNKZuNQUuxw==}
+ [email protected]:
+ resolution: {integrity: sha512-cvVIBILwuoSyD54U4cF/UXDh5yAobhNV/tPygI4lZhgOIJQE/WLWC4waBRb4I6bDVYb3OVx3lfHbaQOEoUD5sg==}
engines: {node: ^12.22.0 || ^14.16.0 || ^16.0.0 || >=17.0.0}
[email protected]:
@@ -3753,8 +3753,8 @@ packages:
[email protected]:
resolution: {integrity: sha512-5aHCbzQRADcdP+ATqnDuhhJ/MRIqDkZX5pyjFHRRysS8vZ5AbqGEoFIb6pYHPZ+L/OC2Lc+xT8uHVVR5CAK/wQ==}
- [email protected]:
- resolution: {integrity: sha512-M/3PdijFXT/A5lnbSK3EQNLbIIrkE00JZaD39r7t4kfFOqT1Ly9LgSZSMMtvQ3p2/C8Nyj/ou0vkNHmEwqoB8g==}
+ [email protected]:
+ resolution: {integrity: sha512-+FdVbbCZ+yoh7E/RosSdqKJyUM2OEjTciH0TFNkawKgvFp1zbGlEC39RADg+xKBG1R4mhoH2j85myBQZ5wR+lw==}
engines: {node: '>=18.12.0'}
hasBin: true
@@ -4558,6 +4558,7 @@ packages:
[email protected]:
resolution: {integrity: sha512-3GMAJ9adPUSdIHGuYV1b1RqRB6D2UScjnq779uZsvpAP6HOWw2+9ezZiUZaAXVST+Ku7KWsxOjkctEvRasJClA==}
engines: {node: '>=18'}
+ deprecated: < 22.6.4 is no longer supported
hasBin: true
[email protected]:
@@ -4737,8 +4738,8 @@ packages:
[email protected]:
resolution: {integrity: sha512-MjOWxM065+WswwnmNONOT+bD1nXzY9Km6u3kzvnx8F8/HXGZdz3T6e6vZJ8Q/RIMUSp/nxqjH3GwvJDy8ijeQQ==}
- [email protected]:
- resolution: {integrity: sha512-r5a3l5HzYlIC68TpmYKlxWjmOP6wiPJ1vWv2HeLhNsRZMrCkxeqxiHlQ21oXmQ4F3SiryXBHhAD7JZqvOJjFmg==}
+ [email protected]:
+ resolution: {integrity: sha512-q1b3N5QkRUWUl7iyylaaj3kOpIT0N2i9MqIEQXP73GVsN9cw3fdx8X63cEmWhJGi2PPCF23Ijp7ktmd39rawIA==}
[email protected]:
resolution: {integrity: sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==}
@@ -7542,12 +7543,12 @@ snapshots:
[email protected]: {}
- [email protected]:
+ [email protected]:
optional: true
[email protected]:
dependencies:
- bare-events: 2.3.1
+ bare-events: 2.4.2
bare-path: 2.1.3
bare-stream: 2.1.2
optional: true
@@ -7614,8 +7615,8 @@ snapshots:
[email protected]:
dependencies:
- caniuse-lite: 1.0.30001632
- electron-to-chromium: 1.4.799
+ caniuse-lite: 1.0.30001633
+ electron-to-chromium: 1.4.801
node-releases: 2.0.14
update-browserslist-db: 1.0.16([email protected])
@@ -7689,7 +7690,7 @@ snapshots:
[email protected]: {}
- [email protected]: {}
+ [email protected]: {}
[email protected]: {}
@@ -8164,7 +8165,7 @@ snapshots:
minimatch: 9.0.1
semver: 7.6.2
- [email protected]: {}
+ [email protected]: {}
[email protected]: {}
@@ -8824,7 +8825,7 @@ snapshots:
[email protected]: {}
- [email protected]:
+ [email protected]:
dependencies:
base64-js: 1.5.1
ecdsa-sig-formatter: 1.0.11
@@ -8840,7 +8841,7 @@ snapshots:
dependencies:
extend: 3.0.2
gaxios: 6.6.0
- google-auth-library: 9.10.0
+ google-auth-library: 9.11.0
qs: 6.12.1
url-template: 2.0.8
uuid: 9.0.1
@@ -8850,7 +8851,7 @@ snapshots:
[email protected]:
dependencies:
- google-auth-library: 9.10.0
+ google-auth-library: 9.11.0
googleapis-common: 7.2.0
transitivePeerDependencies:
- encoding
@@ -8893,7 +8894,7 @@ snapshots:
[email protected]: {}
- [email protected]: {}
+ [email protected]: {}
[email protected]:
dependencies:
@@ -9426,7 +9427,7 @@ snapshots:
dependencies:
uc.micro: 2.1.0
- [email protected]:
+ [email protected]:
dependencies:
chalk: 5.3.0
commander: 12.1.0
@@ -9447,7 +9448,7 @@ snapshots:
colorette: 2.0.20
eventemitter3: 5.0.1
log-update: 6.0.0
- rfdc: 1.3.1
+ rfdc: 1.4.1
wrap-ansi: 9.0.0
[email protected]:
@@ -9865,7 +9866,7 @@ snapshots:
'@types/cookie': 0.6.0
'@types/statuses': 2.0.5
chalk: 4.1.2
- graphql: 16.8.1
+ graphql: 16.8.2
headers-polyfill: 4.0.3
is-node-process: 1.2.0
outvariant: 1.4.2
@@ -10536,7 +10537,7 @@ snapshots:
[email protected]: {}
- [email protected]: {}
+ [email protected]: {}
[email protected]:
dependencies:
@@ -10775,7 +10776,7 @@ snapshots:
queue-tick: 1.0.1
text-decoder: 1.1.0
optionalDependencies:
- bare-events: 2.3.1
+ bare-events: 2.4.2
[email protected]: {}
|
3f5c016545189da891d603dedb5720c4049588d5
|
2024-03-20 21:34:25
|
frankcwl
|
feat(route): recover priconne-redive (#14871)
| false
|
recover priconne-redive (#14871)
|
feat
|
diff --git a/lib/routes/priconne-redive/news.ts b/lib/routes/priconne-redive/news.ts
index 345f768f8c9630..5c6fe734907a35 100644
--- a/lib/routes/priconne-redive/news.ts
+++ b/lib/routes/priconne-redive/news.ts
@@ -1,13 +1,14 @@
import { Route } from '@/types';
+import { parseDate } from '@/utils/parse-date';
import got from '@/utils/got';
import cache from '@/utils/cache';
import { load } from 'cheerio';
export const route: Route = {
- path: '/news',
+ path: '/news/:location?',
categories: ['game'],
example: '/priconne-redive/news',
- parameters: {},
+ parameters: { location: '区域,默认日服' },
features: {
requireConfig: false,
requirePuppeteer: false,
@@ -21,60 +22,151 @@ export const route: Route = {
source: ['priconne-redive.jp/news'],
},
],
- name: '日服公告',
- maintainers: ['SayaSS'],
+ name: '最新公告',
+ maintainers: ['SayaSS', 'frankcwl'],
handler,
url: 'priconne-redive.jp/news',
+ description: `location
+
+ | 国服 | 台服 | 日服 |
+ | ----- | ----- | ---- |
+ | zh-cn | zh-tw | jp |`,
};
-async function handler() {
- const parseContent = (htmlString) => {
- const $ = load(htmlString);
-
- $('.contents-body h3').remove();
- const time = $('.meta-info .time').text().trim();
- $('.meta-info').remove();
- const content = $('.contents-body');
-
- return {
- description: content.html(),
- pubDate: new Date(time),
- };
- };
-
- const response = await got({
- method: 'get',
- url: 'https://priconne-redive.jp/news/',
- });
- const data = response.data;
- const $ = load(data);
- const list = $('.article_box');
-
- const out = await Promise.all(
- list.map((index, item) => {
- item = $(item);
- const link = item.find('a').first().attr('href');
- return cache.tryGet(link, async () => {
- const rssitem = {
- title: item.find('h4').text(),
- link,
+async function handler(ctx) {
+ const { location = 'jp' } = ctx.req.param();
+
+ switch (location) {
+ case 'jp': {
+ const parseContent = (htmlString) => {
+ const $ = load(htmlString);
+ $('.contents-body h3').remove();
+ const time = $('.meta-info .time').text().trim();
+ $('.meta-info').remove();
+ const content = $('.contents-body');
+
+ return {
+ description: content.html(),
+ pubDate: parseDate(time),
};
+ };
+
+ const response = await got({
+ method: 'get',
+ url: 'https://priconne-redive.jp/news/',
+ });
+ const data = response.data;
+ const $ = load(data);
+ const list = $('.article_box');
- const response = await got(link);
- const result = parseContent(response.data);
+ const out = await Promise.all(
+ list.map((index, item) => {
+ item = $(item);
+ const link = item.find('a').first().attr('href');
+ return cache.tryGet(link, async () => {
+ const rssitem = {
+ title: item.find('h4').text(),
+ link,
+ };
- rssitem.description = result.description;
- rssitem.pubDate = result.pubDate;
+ const response = await got(link);
+ const result = parseContent(response.data);
+
+ rssitem.description = result.description;
+ rssitem.pubDate = result.pubDate;
+
+ return rssitem;
+ });
+ })
+ );
+
+ return {
+ title: '公主链接日服-新闻',
+ link: 'https://priconne-redive.jp/news/',
+ language: 'ja',
+ item: out,
+ };
+ }
+ case 'zh-tw': {
+ const parseContent = (htmlString) => {
+ const $ = load(htmlString);
+ $('.news_con h2 > span').remove();
+ const time = $('.news_con h2').text().trim();
+ $('.news_con section h4').first().remove();
+ const content = $('.news_con section');
+
+ return {
+ description: content.html(),
+ pubDate: parseDate(time),
+ };
+ };
- return rssitem;
+ const response = await got({
+ method: 'get',
+ url: 'http://www.princessconnect.so-net.tw/news',
});
- })
- );
-
- return {
- title: '公主链接日服-新闻',
- link: 'https://priconne-redive.jp/news/',
- language: 'ja',
- item: out,
- };
+ const $ = load(response.data);
+ const list = $('.news_con dl dd').get();
+
+ const items = await Promise.all(
+ list.map((item) => {
+ const $ = load(item);
+ const title = $('a');
+ const link = `http://www.princessconnect.so-net.tw${title.attr('href')}`;
+
+ return cache.tryGet(link, async () => {
+ const rssitem = {
+ title: title.text().trim(),
+ link,
+ };
+
+ const response = await got(link);
+ const result = parseContent(response.data);
+
+ rssitem.description = result.description;
+ rssitem.pubDate = result.pubDate;
+
+ return rssitem;
+ });
+ })
+ );
+
+ return {
+ title: '公主连结台服-最新公告',
+ link: 'http://www.princessconnect.so-net.tw/news',
+ item: items,
+ };
+ }
+ case 'zh-cn': {
+ const response = await got({
+ method: 'get',
+ url: 'https://api.biligame.com/news/list?gameExtensionId=267&positionId=2&typeId=&pageNum=1&pageSize=5',
+ });
+ const list = response.data;
+ const items = await Promise.all(
+ list.data.map((item) => {
+ const link = `https://game.bilibili.com/pcr/news.html#detail=${item.id}`;
+
+ return cache.tryGet(link, async () => {
+ const rssitem = {
+ title: item.title,
+ link,
+ pubDate: parseDate(item.ctime),
+ };
+ const resp = await got({ method: 'get', url: `https://api.biligame.com/news/${item.id}` });
+ rssitem.description = resp.data.data.content;
+ return rssitem;
+ });
+ })
+ );
+
+ return {
+ title: '公主连结国服-最新公告',
+ link: 'https://game.bilibili.com/pcr/news.html',
+ item: items,
+ };
+ }
+ default:
+ // Do nothing
+ }
}
|
0886554822fef1f811ac8d73011edbeb617766eb
|
2024-03-19 03:56:52
|
dependabot[bot]
|
chore(deps-dev): bump eslint-plugin-yml from 1.12.2 to 1.13.0 (#14836)
| false
|
bump eslint-plugin-yml from 1.12.2 to 1.13.0 (#14836)
|
chore
|
diff --git a/package.json b/package.json
index 74c85f058a7ad9..52615204e9567e 100644
--- a/package.json
+++ b/package.json
@@ -158,7 +158,7 @@
"eslint-plugin-n": "16.6.2",
"eslint-plugin-prettier": "5.1.3",
"eslint-plugin-unicorn": "51.0.1",
- "eslint-plugin-yml": "1.12.2",
+ "eslint-plugin-yml": "1.13.0",
"fs-extra": "11.2.0",
"husky": "9.0.11",
"lint-staged": "15.2.2",
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 063dc7ffdc3b73..e01cf3072ead07 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -335,8 +335,8 @@ devDependencies:
specifier: 51.0.1
version: 51.0.1([email protected])
eslint-plugin-yml:
- specifier: 1.12.2
- version: 1.12.2([email protected])
+ specifier: 1.13.0
+ version: 1.13.0([email protected])
fs-extra:
specifier: 11.2.0
version: 11.2.0
@@ -4521,8 +4521,8 @@ packages:
eslint: 8.57.0
dev: true
- /[email protected]([email protected]):
- resolution: {integrity: sha512-5N7ZaJG5pZxUeNNJfUchurLVrunD1xJvyg5kYOIVF8kg1f3ajTikmAu/5fZ9w100omNPOoMjngRszh/Q/uFGMg==}
+ /[email protected]([email protected]):
+ resolution: {integrity: sha512-dc6Y8tzEcSYZMHa+CMPLi/hyo1FzNeonbhJL7Ol0ccuKQkwopJcJBA9YL/xmMTLU1eKigXo9vj9nALElWYSowg==}
engines: {node: '>=12'}
peerDependencies:
eslint: '>=6.0.0'
@@ -4659,15 +4659,15 @@ packages:
- supports-color
dev: true
- /[email protected]([email protected]):
- resolution: {integrity: sha512-hvS9p08FhPT7i/ynwl7/Wt7ke7Rf4P2D6fT8lZlL43peZDTsHtH2A0SIFQ7Kt7+mJ6if6P+FX3iJhMkdnxQwpg==}
+ /[email protected]([email protected]):
+ resolution: {integrity: sha512-B87P32E8ugeeUnFxZvPsn72TyeZauA5ZXe6XmWDf0CKwN+9iLaepi6matyvikMWZf1ZeH9xdKggxQvQzLXlfzw==}
engines: {node: ^14.17.0 || >=16.0.0}
peerDependencies:
eslint: '>=6.0.0'
dependencies:
debug: 4.3.4
eslint: 8.57.0
- eslint-compat-utils: 0.4.1([email protected])
+ eslint-compat-utils: 0.5.0([email protected])
lodash: 4.17.21
natural-compare: 1.4.0
yaml-eslint-parser: 1.2.2
|
be88a822b1f2d703aa591f65b30942af3d30089d
|
2020-10-29 21:24:30
|
XYenon
|
feat: add 哈尔滨市科技局 (#6006)
| false
|
add 哈尔滨市科技局 (#6006)
|
feat
|
diff --git a/docs/government.md b/docs/government.md
index aef1911ee4d6dc..b5f6468956f20e 100644
--- a/docs/government.md
+++ b/docs/government.md
@@ -65,6 +65,12 @@ pageClass: routes
<Route author="y2361547758" example="/gov/nppa/318/45948" path="/gov/nppa/:channel/:content" :paramsDesc="['栏目名id', '文章id']" radar="1" rssbud="1"/>
+## 哈尔滨市科技局
+
+### 政务公开
+
+<Route author="XYenon" example="/gov/harbin/kjj" path="/gov/harbin/kjj"/>
+
## 联合国
### 安理会否决了决议
diff --git a/lib/router.js b/lib/router.js
index 91b5ab1ee60751..6224f0a728def8 100644
--- a/lib/router.js
+++ b/lib/router.js
@@ -3396,4 +3396,7 @@ router.get('/sagawa/:id', require('./routes/sagawa/index'));
// QNAP
router.get('/qnap/release-notes/:id', require('./routes/qnap/release-notes'));
+// 哈尔滨市科技局
+router.get('/gov/harbin/kjj', require('./routes/gov/harbin/kjj'));
+
module.exports = router;
diff --git a/lib/routes/gov/harbin/kjj.js b/lib/routes/gov/harbin/kjj.js
new file mode 100644
index 00000000000000..fef71352889af1
--- /dev/null
+++ b/lib/routes/gov/harbin/kjj.js
@@ -0,0 +1,40 @@
+const got = require('@/utils/got');
+const cheerio = require('cheerio');
+const url = require('url');
+
+const baseUrl = 'http://xxgk.harbin.gov.cn';
+
+module.exports = async (ctx) => {
+ const response = await got({
+ headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
+ method: 'post',
+ url: `${baseUrl}/module/xxgk/search.jsp?infotypeId=&vc_title=&vc_number=&area=002276772`,
+ body: 'infotypeId=0&jdid=2&divid=div11565&vc_title=&vc_number=&currpage=&vc_filenumber=&vc_all=&texttype=&fbtime=&infotypeId=&vc_title=&vc_number=&area=002276772',
+ });
+ const data = response.data;
+
+ const $ = cheerio.load(data);
+ const list = $('.tr_main_value_odd, .tr_main_value_even');
+ let items = list.map((_, e) => ({ title: $('a', e).attr('title'), link: $('a', e).attr('href'), pubDate: $('td:nth-child(3)', e).text() })).get();
+ items = await Promise.all(
+ items.map(
+ async (item) =>
+ await ctx.cache.tryGet(item.link, async () => {
+ const result = await got({ method: 'get', url: item.link });
+ const content = cheerio.load(result.data);
+ item.description = content('.bt_content')
+ .html()
+ .replace(/src="\//g, `src="${url.resolve(baseUrl, '.')}`)
+ .replace(/href="\//g, `href="${url.resolve(baseUrl, '.')}`)
+ .trim();
+ return item;
+ })
+ )
+ );
+
+ ctx.state.data = {
+ title: '哈尔滨市科技局',
+ link: `${baseUrl}/col/col11565/index.html`,
+ item: items,
+ };
+};
|
930f09c17487a032192decd687cbd221bb1df1d4
|
2023-12-17 20:08:44
|
JimenezLi
|
feat(route): add xhu people activities and answers (#14063)
| false
|
add xhu people activities and answers (#14063)
|
feat
|
diff --git a/lib/v2/zhihu/maintainer.js b/lib/v2/zhihu/maintainer.js
index b7071060b10780..8c2cdc42ac062d 100644
--- a/lib/v2/zhihu/maintainer.js
+++ b/lib/v2/zhihu/maintainer.js
@@ -16,6 +16,8 @@ module.exports = {
'/topic/:topicId': ['xyqfer'],
'/weekly': ['LogicJake'],
'/xhu/collection/:id': ['JimenezLi'],
+ '/xhu/people/activities/:hexId': ['JimenezLi'],
+ '/xhu/people/answers/:hexId': ['JimenezLi'],
'/xhu/question/:questionId/:sortBy?': ['JimenezLi'],
'/xhu/topic/:topicId': ['JimenezLi'],
'/xhu/zhuanlan/:id': ['JimenezLi'],
diff --git a/lib/v2/zhihu/radar.js b/lib/v2/zhihu/radar.js
index ed051f7cb117c4..d0833cb803a0b9 100644
--- a/lib/v2/zhihu/radar.js
+++ b/lib/v2/zhihu/radar.js
@@ -80,6 +80,24 @@ module.exports = {
source: '/column/:id',
target: '/zhihu/zhuanlan/:id',
},
+ {
+ title: 'xhu - 用户动态',
+ docs: 'https://docs.rsshub.app/routes/social-media#zhi-hu',
+ source: '/people/:id',
+ target: (params, url, document) => {
+ const hexId = /"id":"(.*?)"/.exec(document.getElementById('js-initialData').innerHTML)[1];
+ return `/zhihu/xhu/people/activities/${hexId}`;
+ },
+ },
+ {
+ title: 'xhu - 用户回答',
+ docs: 'https://docs.rsshub.app/routes/social-media#zhi-hu',
+ source: '/people/:id/answers',
+ target: (params, url, document) => {
+ const hexId = /"id":"(.*?)"/.exec(document.getElementById('js-initialData').innerHTML)[1];
+ return `/zhihu/xhu/people/answers/${hexId}`;
+ },
+ },
{
title: 'xhu - 收藏夹',
docs: 'https://docs.rsshub.app/routes/social-media#zhi-hu',
diff --git a/lib/v2/zhihu/router.js b/lib/v2/zhihu/router.js
index 4e09cd9f79ffaf..bdeea3fe3dba0a 100644
--- a/lib/v2/zhihu/router.js
+++ b/lib/v2/zhihu/router.js
@@ -16,6 +16,8 @@ module.exports = (router) => {
router.get('/topic/:topicId', require('./topic'));
router.get('/weekly', require('./weekly'));
router.get('/xhu/collection/:id', require('./xhu/collection'));
+ router.get('/xhu/people/activities/:hexId', require('./xhu/activities'));
+ router.get('/xhu/people/answers/:hexId', require('./xhu/answers'));
router.get('/xhu/question/:questionId/:sortBy?', require('./xhu/question'));
router.get('/xhu/topic/:topicId', require('./xhu/topic'));
router.get('/xhu/zhuanlan/:id', require('./xhu/zhuanlan'));
diff --git a/lib/v2/zhihu/xhu/activities.js b/lib/v2/zhihu/xhu/activities.js
new file mode 100644
index 00000000000000..4e44f6e7a0d875
--- /dev/null
+++ b/lib/v2/zhihu/xhu/activities.js
@@ -0,0 +1,112 @@
+const got = require('@/utils/got');
+const auth = require('./auth');
+const utils = require('../utils');
+const { parseDate } = require('@/utils/parse-date');
+
+module.exports = async (ctx) => {
+ const xhuCookie = await auth.getCookie(ctx);
+ const { hexId } = ctx.params;
+ const link = `https://www.zhihu.com/people/${hexId}`;
+ const url = `https://api.zhihuvvv.workers.dev/people/${hexId}/activities?before_id=0&limit=20`;
+
+ const response = await got({
+ method: 'get',
+ url,
+ headers: {
+ Referer: 'https://api.zhihuvvv.workers.dev',
+ Cookie: xhuCookie,
+ },
+ });
+ const data = response.data.data;
+
+ ctx.state.data = {
+ title: `${data[0].actor.name}的知乎动态`,
+ link,
+ image: data[0].actor.avatar_url,
+ description: data[0].actor.headline || data[0].actor.description,
+ item: data.map((item) => {
+ const detail = item.target;
+ let title;
+ let description;
+ let url;
+ const images = [];
+ let text = '';
+ let link = '';
+ let author = '';
+
+ switch (item.target.type) {
+ case 'answer':
+ title = detail.question.title;
+ author = detail.author.name;
+ description = utils.ProcessImage(detail.content);
+ url = `https://www.zhihu.com/question/${detail.question.id}/answer/${detail.id}`;
+ break;
+ case 'article':
+ title = detail.title;
+ author = detail.author.name;
+ description = utils.ProcessImage(detail.content);
+ url = `https://zhuanlan.zhihu.com/p/${detail.id}`;
+ break;
+ case 'pin':
+ title = detail.excerpt_title;
+ author = detail.author.name;
+ detail.content.forEach((contentItem) => {
+ if (contentItem.type === 'text') {
+ text = `<p>${contentItem.own_text}</p>`;
+ } else if (contentItem.type === 'image') {
+ images.push(`<p><img src="${contentItem.url.replace('xl', 'r')}"/></p>`);
+ } else if (contentItem.type === 'link') {
+ link = `<p><a href="${contentItem.url}" target="_blank">${contentItem.title}</a></p>`;
+ } else if (contentItem.type === 'video') {
+ link = `<p><video
+ controls="controls"
+ width="${contentItem.playlist[1].width}"
+ height="${contentItem.playlist[1].height}"
+ src="${contentItem.playlist[1].url}"></video></p>`;
+ }
+ });
+ description = `${text}${link}${images.join('')}`;
+ url = `https://www.zhihu.com/pin/${detail.id}`;
+ break;
+ case 'question':
+ title = detail.title;
+ author = detail.author.name;
+ description = utils.ProcessImage(detail.detail);
+ url = `https://www.zhihu.com/question/${detail.id}`;
+ break;
+ case 'collection':
+ title = detail.title;
+ url = `https://www.zhihu.com/collection/${detail.id}`;
+ break;
+ case 'column':
+ title = detail.title;
+ description = `<p>${detail.intro}</p><p><img src="${detail.image_url}"/></p>`;
+ url = `https://zhuanlan.zhihu.com/${detail.id}`;
+ break;
+ case 'topic':
+ title = detail.name;
+ description = `<p>${detail.introduction}</p><p>话题关注者人数:${detail.followers_count}</p>`;
+ url = `https://www.zhihu.com/topic/${detail.id}`;
+ break;
+ case 'live':
+ title = detail.subject;
+ description = detail.description.replace(/\n|\r/g, '<br>');
+ url = `https://www.zhihu.com/lives/${detail.id}`;
+ break;
+ case 'roundtable':
+ title = detail.name;
+ description = detail.description;
+ url = `https://www.zhihu.com/roundtable/${detail.id}`;
+ break;
+ }
+
+ return {
+ title: `${data[0].actor.name}${item.action_text}: ${title}`,
+ author,
+ description,
+ pubDate: parseDate(item.created_time * 1000),
+ link: url,
+ };
+ }),
+ };
+};
diff --git a/lib/v2/zhihu/xhu/answers.js b/lib/v2/zhihu/xhu/answers.js
new file mode 100644
index 00000000000000..d6b6d42d618db9
--- /dev/null
+++ b/lib/v2/zhihu/xhu/answers.js
@@ -0,0 +1,31 @@
+const got = require('@/utils/got');
+const auth = require('./auth');
+const { parseDate } = require('@/utils/parse-date');
+
+module.exports = async (ctx) => {
+ const xhuCookie = await auth.getCookie(ctx);
+ const { hexId } = ctx.params;
+ const link = `https://www.zhihu.com/people/${hexId}/answers`;
+ const url = `https://api.zhihuvvv.workers.dev/people/${hexId}/answers?limit=20&offset=0`;
+
+ const response = await got({
+ method: 'get',
+ url,
+ headers: {
+ Referer: 'https://api.zhihuvvv.workers.dev',
+ Cookie: xhuCookie,
+ },
+ });
+ const data = response.data.data;
+
+ ctx.state.data = {
+ title: `${data[0].author.name}的知乎回答`,
+ link,
+ item: data.map((item) => ({
+ title: item.question.title,
+ description: item.excerpt,
+ pubDate: parseDate(item.created_time * 1000),
+ link: `https://www.zhihu.com/question/${item.question.id}/answer/${item.id}`,
+ })),
+ };
+};
diff --git a/website/docs/routes/social-media.mdx b/website/docs/routes/social-media.mdx
index 1b7bfda507e544..6c6616160220bf 100644
--- a/website/docs/routes/social-media.mdx
+++ b/website/docs/routes/social-media.mdx
@@ -1746,18 +1746,32 @@ YouTube provides official RSS feeds for channels, for instance [https://www.yout
:::
</Route>
-### [xhu](https://github.com/REToys/xhu) - 收藏夹 {#zhi-hu-shou-cang-jia}
+### [xhu](https://github.com/REToys/xhu) - 用户动态 {#zhi-hu-xhu-yong-hu-dong-tai}
-<Route author="JimenezLi" example="/zhihu/xhu/collection/26444956" path="/zhihu/xhu/collection/:id" paramsDesc={['收藏夹 id, 可在收藏夹页面 URL 中找到']} />
+<Route author="JimenezLi" example="/zhihu/xhu/people/activities/246e6cf44e94cefbf4b959cb5042bc91" path="/zhihu/xhu/people/activities/:hexId" paramsDesc={['用户的 16 进制 id,获取方式见下方说明']} radar="1">
+ :::tip
+ 用户的 16 进制 id 获取方式:
+ 1. 可以通过 RSSHub Radar 扩展获取;
+ 2. 或者在用户主页打开 F12 控制台,执行以下代码:`console.log(/"id":"(.*?)"/.exec(document.getElementById("js-initialData").innerHTML)[1]);` 即可获取用户的 16 进制 id。
+ :::
+</Route>
+
+### [xhu](https://github.com/REToys/xhu) - 用户回答{#zhi-hu-xhu-yong-hu-hui-da}
+
+<Route author="JimenezLi" example="/zhihu/xhu/people/answers/246e6cf44e94cefbf4b959cb5042bc91" path="/zhihu/xhu/people/answers/:hexId" paramsDesc={['用户的 16 进制 id,获取方式同 [xhu - 用户动态](#zhi-hu-xhu-yong-hu-dong-tai)']} radar="1" />
+
+### [xhu](https://github.com/REToys/xhu) - 收藏夹 {#zhi-hu-xhu-shou-cang-jia}
+
+<Route author="JimenezLi" example="/zhihu/xhu/collection/26444956" path="/zhihu/xhu/collection/:id" paramsDesc={['收藏夹 id, 可在收藏夹页面 URL 中找到']} radar="1" />
-### [xhu](https://github.com/REToys/xhu) - 专栏 {#zhi-hu-zhuan-lan}
+### [xhu](https://github.com/REToys/xhu) - 专栏 {#zhi-hu-xhu-zhuan-lan}
-<Route author="JimenezLi" example="/zhihu/xhu/zhuanlan/githubdaily" path="/zhihu/xhu/zhuanlan/:id" paramsDesc={['专栏 id, 可在专栏主页 URL 中找到']} />
+<Route author="JimenezLi" example="/zhihu/xhu/zhuanlan/githubdaily" path="/zhihu/xhu/zhuanlan/:id" paramsDesc={['专栏 id, 可在专栏主页 URL 中找到']} radar="1" />
-### [xhu](https://github.com/REToys/xhu) - 问题 {#zhi-hu-wen-ti}
+### [xhu](https://github.com/REToys/xhu) - 问题 {#zhi-hu-xhu-wen-ti}
-<Route author="JimenezLi" example="/zhihu/xhu/question/264051433" path="/zhihu/xhu/question/:questionId/:sortBy?" paramsDesc={['问题 id', '排序方式:`default`, `created`, `updated`。默认为 `default`']} />
+<Route author="JimenezLi" example="/zhihu/xhu/question/264051433" path="/zhihu/xhu/question/:questionId/:sortBy?" paramsDesc={['问题 id', '排序方式:`default`, `created`, `updated`。默认为 `default`']} radar="1" />
-### [xhu](https://github.com/REToys/xhu) - 话题 {#zhi-hu-hua-ti}
+### [xhu](https://github.com/REToys/xhu) - 话题 {#zhi-hu-xhu-hua-ti}
-<Route author="JimenezLi" example="/zhihu/xhu/topic/19566035" path="/zhihu/xhu/topic/:topicId" paramsDesc={['话题ID']} />
+<Route author="JimenezLi" example="/zhihu/xhu/topic/19566035" path="/zhihu/xhu/topic/:topicId" paramsDesc={['话题ID']} radar="1" />
|
05acee4b9ed3d22d1ecca97c805c99e659dde772
|
2024-11-12 18:40:40
|
EsuRt
|
fix(route/mittrchina): update api (#17552)
| false
|
update api (#17552)
|
fix
|
diff --git a/lib/routes/mittrchina/index.ts b/lib/routes/mittrchina/index.ts
index 2fcfb22fe87f1b..fa2d8d14d1c7a4 100644
--- a/lib/routes/mittrchina/index.ts
+++ b/lib/routes/mittrchina/index.ts
@@ -52,7 +52,7 @@ async function handler(ctx) {
const { type = 'index' } = ctx.req.param();
const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit'), 10) : 10;
- const link = `https://apii.mittrchina.com${typeMap[type].apiPath}`;
+ const link = `https://apii.web.mittrchina.com${typeMap[type].apiPath}`;
const { data: response } =
type === 'breaking'
? await got.post(link, {
@@ -95,7 +95,7 @@ async function handler(ctx) {
cache.tryGet(item.link, async () => {
const {
data: { data: details },
- } = await got(`https://apii.mittrchina.com/information/details?id=${item.id}`);
+ } = await got(`https://apii.web.mittrchina.com/information/details?id=${item.id}`);
item.description = details.content;
|
04fee7a546be23562618c73e001f383915eea7c6
|
2022-09-13 02:51:27
|
dependabot[bot]
|
chore(deps-dev): bump eslint from 8.23.0 to 8.23.1 (#10773)
| false
|
bump eslint from 8.23.0 to 8.23.1 (#10773)
|
chore
|
diff --git a/package.json b/package.json
index 423f61175cd257..2b8aa7603f8e0e 100644
--- a/package.json
+++ b/package.json
@@ -49,7 +49,7 @@
"@vuepress/plugin-pwa": "1.9.7",
"@vuepress/shared-utils": "1.9.7",
"cross-env": "7.0.3",
- "eslint": "8.23.0",
+ "eslint": "8.23.1",
"eslint-config-prettier": "8.5.0",
"eslint-plugin-prettier": "4.2.1",
"eslint-plugin-yml": "1.2.0",
diff --git a/yarn.lock b/yarn.lock
index 37e187c46c72fb..6d7cb2001d185e 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -983,10 +983,10 @@
enabled "2.0.x"
kuler "^2.0.0"
-"@eslint/eslintrc@^1.3.1":
- version "1.3.1"
- resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-1.3.1.tgz#de0807bfeffc37b964a7d0400e0c348ce5a2543d"
- integrity sha512-OhSY22oQQdw3zgPOOwdoj01l/Dzl1Z+xyUP33tkSN+aqyEhymJCcPHyXt+ylW8FSe0TfRC2VG+ROQOapD0aZSQ==
+"@eslint/eslintrc@^1.3.2":
+ version "1.3.2"
+ resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-1.3.2.tgz#58b69582f3b7271d8fa67fe5251767a5b38ea356"
+ integrity sha512-AXYd23w1S/bv3fTs3Lz0vjiYemS08jWkI3hYyS9I1ry+0f+Yjs1wm+sU0BS8qDOPrBIkp4qHYC16I8uVtpLajQ==
dependencies:
ajv "^6.12.4"
debug "^4.3.2"
@@ -5748,12 +5748,12 @@ eslint-visitor-keys@^3.0.0, eslint-visitor-keys@^3.3.0:
resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz#f6480fa6b1f30efe2d1968aa8ac745b862469826"
integrity sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA==
[email protected]:
- version "8.23.0"
- resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.23.0.tgz#a184918d288820179c6041bb3ddcc99ce6eea040"
- integrity sha512-pBG/XOn0MsJcKcTRLr27S5HpzQo4kLr+HjLQIyK4EiCsijDl/TB+h5uEuJU6bQ8Edvwz1XWOjpaP2qgnXGpTcA==
[email protected]:
+ version "8.23.1"
+ resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.23.1.tgz#cfd7b3f7fdd07db8d16b4ac0516a29c8d8dca5dc"
+ integrity sha512-w7C1IXCc6fNqjpuYd0yPlcTKKmHlHHktRkzmBPZ+7cvNBQuiNjx0xaMTjAJGCafJhQkrFJooREv0CtrVzmHwqg==
dependencies:
- "@eslint/eslintrc" "^1.3.1"
+ "@eslint/eslintrc" "^1.3.2"
"@humanwhocodes/config-array" "^0.10.4"
"@humanwhocodes/gitignore-to-minimatch" "^1.0.2"
"@humanwhocodes/module-importer" "^1.0.1"
@@ -5772,7 +5772,6 @@ [email protected]:
fast-deep-equal "^3.1.3"
file-entry-cache "^6.0.1"
find-up "^5.0.0"
- functional-red-black-tree "^1.0.1"
glob-parent "^6.0.1"
globals "^13.15.0"
globby "^11.1.0"
@@ -5781,6 +5780,7 @@ [email protected]:
import-fresh "^3.0.0"
imurmurhash "^0.1.4"
is-glob "^4.0.0"
+ js-sdsl "^4.1.4"
js-yaml "^4.1.0"
json-stable-stringify-without-jsonify "^1.0.1"
levn "^0.4.1"
@@ -6535,11 +6535,6 @@ function.prototype.name@^1.1.5:
es-abstract "^1.19.0"
functions-have-names "^1.2.2"
-functional-red-black-tree@^1.0.1:
- version "1.0.1"
- resolved "https://registry.yarnpkg.com/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz#1b0ab3bd553b2a0d6399d29c0e3ea0b252078327"
- integrity sha512-dsKNQNdj6xA3T+QlADDA7mOSlX0qiMINjn0cgr+eGHGsbSHzTabcIogz2+p/iqP1Xs6EP/sS2SbqH+brGTbq0g==
-
functions-have-names@^1.2.2:
version "1.2.3"
resolved "https://registry.yarnpkg.com/functions-have-names/-/functions-have-names-1.2.3.tgz#0404fe4ee2ba2f607f0e0ec3c80bae994133b834"
@@ -8601,6 +8596,11 @@ jquery@^3.4.1:
resolved "https://registry.yarnpkg.com/jquery/-/jquery-3.6.0.tgz#c72a09f15c1bdce142f49dbf1170bdf8adac2470"
integrity sha512-JVzAR/AjBvVt2BmYhxRCSYysDsPcssdmTFnzyLEts9qNwmjmu4JTAMYubEfwVOSwpQ1I1sKKFcxhZCI2buerfw==
+js-sdsl@^4.1.4:
+ version "4.1.4"
+ resolved "https://registry.yarnpkg.com/js-sdsl/-/js-sdsl-4.1.4.tgz#78793c90f80e8430b7d8dc94515b6c77d98a26a6"
+ integrity sha512-Y2/yD55y5jteOAmY50JbUZYwk3CP3wnLPEZnlR1w9oKhITrBEtAxwuWKebFf8hMrPMgbYwFoWK/lH2sBkErELw==
+
js-tokens@^3.0.1:
version "3.0.2"
resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.2.tgz#9866df395102130e38f7f996bceb65443209c25b"
|
0c506b84c831741c3cb0f789dee7e9c9170c58f9
|
2024-11-03 19:45:46
|
DIYgod
|
feat(twitter): double lock time
| false
|
double lock time
|
feat
|
diff --git a/lib/routes/twitter/api/web-api/utils.ts b/lib/routes/twitter/api/web-api/utils.ts
index f75d2eee4ecb62..0f739c63364e2e 100644
--- a/lib/routes/twitter/api/web-api/utils.ts
+++ b/lib/routes/twitter/api/web-api/utils.ts
@@ -168,7 +168,7 @@ export const twitterGot = async (
const resetTime = new Date(Number.parseInt(reset) * 1000);
const delay = (resetTime.getTime() - Date.now()) / 1000;
logger.debug(`twitter debug: twitter rate limit exceeded for token ${auth.token} with status ${response.status}, will unlock after ${delay}s`);
- await cache.set(`${lockPrefix}${auth.token}`, '1', Math.ceil(delay));
+ await cache.set(`${lockPrefix}${auth.token}`, '1', Math.ceil(delay) * 2);
} else if (response.status === 429 || JSON.stringify(response._data?.data) === '{"user":{}}') {
logger.debug(`twitter debug: twitter rate limit exceeded for token ${auth.token} with status ${response.status}`);
await cache.set(`${lockPrefix}${auth.token}`, '1', 2000);
|
37d6cb08a71ecb36e228e37640bf4f19a590bb50
|
2023-10-30 19:35:34
|
Tony
|
fix(route): oschina remove ads (#13655)
| false
|
oschina remove ads (#13655)
|
fix
|
diff --git a/lib/v2/oschina/news.js b/lib/v2/oschina/news.js
index eddbe3a2ce7058..6682bb44cb3e3a 100644
--- a/lib/v2/oschina/news.js
+++ b/lib/v2/oschina/news.js
@@ -66,6 +66,7 @@ module.exports = async (ctx) => {
},
});
const content = cheerio.load(detail.data);
+ content('.ad-wrap').remove();
item.description = content('.article-detail').html();
item.author = content('.article-box__meta .item').first().text();
|
237ba3fb583708dbbb0fda85de01887fc268cae8
|
2019-07-04 14:00:39
|
renovate[bot]
|
chore(deps): update dependency form-data to v2.5.0 (#2554)
| false
|
update dependency form-data to v2.5.0 (#2554)
|
chore
|
diff --git a/package.json b/package.json
index eeee7ad43ad8a9..73bebc1efd5040 100644
--- a/package.json
+++ b/package.json
@@ -57,7 +57,7 @@
"dayjs": "1.8.14",
"dotenv": "8.0.0",
"etag": "1.8.1",
- "form-data": "2.4.0",
+ "form-data": "2.5.0",
"git-rev-sync": "1.12.0",
"googleapis": "40.0.1",
"got": "9.6.0",
diff --git a/yarn.lock b/yarn.lock
index 4a19fc912b3bdb..c18727ba12ee17 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -4193,10 +4193,10 @@ forever-agent@~0.6.1:
resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91"
integrity sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=
[email protected]:
- version "2.4.0"
- resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.4.0.tgz#4902b831b051e0db5612a35e1a098376f7b13ad8"
- integrity sha512-4FinE8RfqYnNim20xDwZZE0V2kOs/AuElIjFUbPuegQSaoZM+vUT5FnwSl10KPugH4voTg1bEQlcbCG9ka75TA==
[email protected]:
+ version "2.5.0"
+ resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.5.0.tgz#094ec359dc4b55e7d62e0db4acd76e89fe874d37"
+ integrity sha512-WXieX3G/8side6VIqx44ablyULoGruSde5PNTxoUyo5CeyAMX6nVWUd0rgist/EuX655cjhUhTo1Fo3tRYqbcA==
dependencies:
asynckit "^0.4.0"
combined-stream "^1.0.6"
|
3fc8ff105c383b969b49f7b19fccbc15d5063065
|
2021-02-04 08:05:46
|
GitHub Action
|
style: auto format
| false
|
auto format
|
style
|
diff --git a/assets/radar-rules.js b/assets/radar-rules.js
index f123e36716a001..fbb173a2a353cd 100644
--- a/assets/radar-rules.js
+++ b/assets/radar-rules.js
@@ -125,14 +125,14 @@
},
'weibo.cn': {
_name: '微博',
- 'm': [
+ m: [
{
title: '博主',
docs: 'https://docs.rsshub.app/social-media.html#wei-bo',
source: ['/u/:uid', '/profile/:uid'],
target: '/weibo/user/:uid',
- }
- ]
+ },
+ ],
},
'pixiv.net': {
_name: 'Pixiv',
|
1076839f7cacc0ea97d3ee8f49bb5e04ace8b807
|
2021-01-11 15:20:07
|
zytomorrow
|
feat: 风之动漫可全文输出漫画内容
| false
|
风之动漫可全文输出漫画内容
|
feat
|
diff --git a/docs/anime.md b/docs/anime.md
index bcc037374d3b0f..cf25578ecba2bd 100644
--- a/docs/anime.md
+++ b/docs/anime.md
@@ -288,7 +288,7 @@ pageClass: routes
### 风之动漫
-<Route author="geeeeoff" path="/fzdm/manhua/:id" example="/fzdm/manhua/39" :paramsDesc="['漫画ID']"/>
+<Route author="geeeeoff zytomorrow" path="/fzdm/manhua/:id/:nums?" example="/fzdm/manhua/39/2" :paramsDesc="['漫画ID', '最新的n话, 默认为最新1话']" anticrawler="1"/>
## 海猫吧
diff --git a/lib/router.js b/lib/router.js
index 2da405237491d0..caf0600ea3dc9c 100644
--- a/lib/router.js
+++ b/lib/router.js
@@ -2931,7 +2931,7 @@ router.get('/grubstreet', require('./routes/grubstreet/index'));
router.get('/manhuadui/manhua/:name/:serial?', require('./routes/manhuadui/manhua'));
// 风之漫画
-router.get('/fzdm/manhua/:id', require('./routes/fzdm/manhua'));
+router.get('/fzdm/manhua/:id/:nums?', require('./routes/fzdm/manhua'));
// Aljazeera 半岛网
router.get('/aljazeera/news', require('./routes/aljazeera/news'));
diff --git a/lib/routes/fzdm/manhua.js b/lib/routes/fzdm/manhua.js
index 8d47d5fe8376c3..949b8f2ae8533a 100644
--- a/lib/routes/fzdm/manhua.js
+++ b/lib/routes/fzdm/manhua.js
@@ -2,8 +2,42 @@ const got = require('@/utils/got');
const host = 'https://manhua.fzdm.com';
const cheerio = require('cheerio');
+const get_pic = (id, chapert, caches) => {
+ const picUrlPattern = RegExp(/var (mhurl1|mhurl)="(.*?)";/);
+ return caches.tryGet(`${host}/${id}/${chapert}/`, async () => {
+ let is_last_page = false;
+ let index = 0;
+ let pic_content = '';
+ while (!is_last_page) {
+ // eslint-disable-next-line no-await-in-loop
+ const response = await got.get(`${host}/${id}/${chapert}/index_${index}.html`, {
+ headers: {
+ 'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.141 Safari/537.36',
+ Host: 'manhua.fzdm.com',
+ 'Accept-Encoding': 'gzip, deflate, br',
+ Connection: 'keep-alive',
+ },
+ });
+ const data = response.data;
+ if (response.data !== undefined) {
+ const picurl = data.match(picUrlPattern);
+ pic_content += `<img src='http://www-mipengine-org.mipcdn.com/i/p5.manhuapan.com/${picurl[picurl.length - 1]}'/><br/>`;
+ } else {
+ pic_content += '';
+ is_last_page = true;
+ }
+ if (data.match('最后一页了') !== null) {
+ is_last_page = true;
+ }
+ index += 1;
+ }
+ return pic_content;
+ });
+};
+
module.exports = async (ctx) => {
const id = ctx.params.id;
+ const nums = ctx.params.nums || 1;
const comicPage = host + `/${id}/`;
const response = await got({
method: 'get',
@@ -13,16 +47,24 @@ module.exports = async (ctx) => {
const $ = cheerio.load(data);
const list = $('div#content > li > a');
const comicTitle = $('div#content > img').attr('alt').replace(/漫画/, '');
+ const chapter_detail = await Promise.all(
+ list.splice(0, nums).map(async (item) => {
+ const pic_content = await get_pic(id, $(item).attr('href').replace('/', ''), ctx.cache);
+ return {
+ title: $(item).text().trim(),
+ description: pic_content,
+ link: item.link,
+ };
+ })
+ );
ctx.state.data = {
title: '风之动漫 - ' + comicTitle,
link: comicPage,
description: '风之动漫',
- item: list
- .map((i, item) => ({
- title: $(item).text().trim(),
- description: $(item).text().trim(),
- link: comicPage + $(item).attr('href'),
- }))
- .get(),
+ item: chapter_detail.map((item) => ({
+ title: item.title,
+ description: item.description,
+ link: item.link,
+ })),
};
};
|
0fc620951e013dc7d14c9a7d682c5cdf38804349
|
2024-08-25 11:06:49
|
hinus
|
feat(route): add Link3 (#16524)
| false
|
add Link3 (#16524)
|
feat
|
diff --git a/lib/routes/link3/events.ts b/lib/routes/link3/events.ts
new file mode 100644
index 00000000000000..00cfcf1bbf2e31
--- /dev/null
+++ b/lib/routes/link3/events.ts
@@ -0,0 +1,86 @@
+import { Route } from '@/types';
+import { parseDate } from '@/utils/parse-date';
+import ofetch from '@/utils/ofetch';
+
+export const route: Route = {
+ path: '/events',
+ name: 'Link3 Events',
+ url: 'link3.to',
+ maintainers: ['cxheng315'],
+ example: '/link3/events',
+ categories: ['other'],
+ features: {
+ requireConfig: false,
+ requirePuppeteer: false,
+ antiCrawler: false,
+ supportBT: false,
+ supportPodcast: false,
+ supportScihub: false,
+ },
+ radar: [
+ {
+ source: ['link3.to/events'],
+ target: '/events',
+ },
+ ],
+ handler,
+};
+
+async function handler() {
+ const url = 'https://api.cyberconnect.dev/profile/';
+
+ const response = await ofetch(url, {
+ method: 'POST',
+ headers: {
+ 'Content-Type': 'application/json',
+ },
+ body: {
+ variables: {
+ order: 'START_TIME_ASC',
+ },
+ query: `
+ query getTrendingEvents($first: Int, $after: String, $order: TrendingEventsRequest_EventOrder, $filter: TrendingEventsRequest_EventFilter) {
+ trendingEvents(first: $first, after: $after, order: $order, filter: $filter) {
+ list {
+ id
+ info
+ title
+ posterUrl
+ startTimestamp
+ endTimestamp
+ organizer {
+ lightInfo {
+ displayName
+ profilePicture
+ profileHandle
+ }
+ }
+ }
+ }
+ }
+
+ `,
+ },
+ });
+
+ const items = response.data.trendingEvents.list.map((event) => ({
+ title: event.title,
+ link: `https://link3.to/e/${event.id}`,
+ description: event.info ?? '',
+ author: event.organizer.lightInfo.displayName,
+ guid: event.id,
+ pubDate: parseDate(event.startTimestamp * 1000),
+ itunes_item_image: event.posterUrl,
+ itunes_duration: event.endTimestamp - event.startTimestamp,
+ }));
+
+ return {
+ title: 'Link3 Events',
+ link: 'https://link3.to/events',
+ description: 'Link3 is a Web3 native social platform built on CyberConnect protocol.',
+ image: 'https://link3.to/logo.svg',
+ logo: 'https://link3.to/logo.svg',
+ author: 'Link3',
+ item: items,
+ };
+}
diff --git a/lib/routes/link3/namespace.ts b/lib/routes/link3/namespace.ts
new file mode 100644
index 00000000000000..a76ca89d86323f
--- /dev/null
+++ b/lib/routes/link3/namespace.ts
@@ -0,0 +1,6 @@
+import type { Namespace } from '@/types';
+
+export const namespace: Namespace = {
+ name: 'Link3',
+ url: 'link3.to',
+};
diff --git a/lib/routes/link3/profile.ts b/lib/routes/link3/profile.ts
new file mode 100644
index 00000000000000..906c810bc7d4d6
--- /dev/null
+++ b/lib/routes/link3/profile.ts
@@ -0,0 +1,143 @@
+import { Route } from '@/types';
+import { parseDate } from '@/utils/parse-date';
+import ofetch from '@/utils/ofetch';
+
+export const route: Route = {
+ path: '/profile/:handle',
+ name: 'Link3 Profile',
+ url: 'link3.to',
+ maintainers: ['cxheng315'],
+ example: '/link3/profile/synfutures_defi',
+ parameters: { handle: 'Profile handle' },
+ categories: ['other'],
+ features: {
+ requireConfig: false,
+ requirePuppeteer: false,
+ antiCrawler: false,
+ supportBT: false,
+ supportPodcast: false,
+ supportScihub: false,
+ },
+ radar: [
+ {
+ source: ['link3.to/:handle'],
+ target: '/:handle',
+ },
+ ],
+ handler,
+};
+
+async function handler(ctx) {
+ const url = 'https://api.cyberconnect.dev/profile/';
+
+ const handle = ctx.req.param('handle');
+
+ const response = await ofetch(url, {
+ method: 'POST',
+ headers: {
+ 'Content-Type': 'application/json',
+ },
+ body: {
+ variables: {
+ handle,
+ },
+ query: `
+ query getProfile($id: ID, $handle: String) {
+ profile(id: $id, handle: $handle) {
+ status
+ data {
+ handle
+ ... on OrgProfile {
+ displayName
+ bio
+ profilePicture
+ backgroundPicture
+ __typename
+ }
+ ... on PerProfile {
+ bio
+ personalDisplayName: displayName {
+ displayName
+ }
+ personalProfilePicture: profilePicture {
+ picture
+ }
+ personalBackgroundPicture: backgroundPicture {
+ picture
+ }
+ __typename
+ }
+ blocks {
+ ... on Block {
+ ... on EventBlock {
+ __typename
+ events {
+ id
+ title
+ info
+ posterUrl
+ startTimestamp
+ endTimestamp
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+
+ `,
+ },
+ });
+
+ const status = response.data.profile.status;
+
+ if (status !== 'SUCCESS') {
+ return {
+ title: 'Error',
+ description: 'Profile not found',
+ items: [
+ {
+ title: 'Error',
+ description: 'Profile not found',
+ link: `https://link3.to/${handle}`,
+ },
+ ],
+ };
+ }
+
+ const profile = response.data.profile.data;
+
+ const items = profile.blocks
+ .filter((block) => block.__typename === 'EventBlock')
+ .flatMap((block) => block.events)
+ .map((event) => ({
+ title: event.title,
+ link: `https://link3.to/e/${event.id}`,
+ description: event.info ?? '',
+ author: profile.handle,
+ guid: event.id,
+ pubDate: event.startTimestamp ? parseDate(event.startTimestamp * 1000) : null,
+ itunes_item_image: event.posterUrl,
+ itunes_duration: event.endTimestamp - event.startTimestamp,
+ }));
+
+ return {
+ title: profile.displayName ?? profile.personalDisplayName.displayName,
+ link: `https://link3.to/${profile.handle}`,
+ description: profile.bio,
+ logo: profile.profilePicture ?? profile.personalProfilePicture.picture,
+ image: profile.profilePicture ?? profile.personalProfilePicture.picture,
+ author: profile.handle,
+ item:
+ items && items.length > 0
+ ? items
+ : [
+ {
+ title: 'No events',
+ description: 'No events',
+ link: `https://link3.to/${handle}`,
+ },
+ ],
+ };
+}
|
8e42a734011e7a4f5da0478ab9d4ce4bbbd9ff35
|
2021-11-27 14:16:42
|
Ethan Shen
|
feat(route): add 北京大学人事处 (#8457)
| false
|
add 北京大学人事处 (#8457)
|
feat
|
diff --git a/docs/university.md b/docs/university.md
index a6d37cf02731ef..19022727e8893c 100644
--- a/docs/university.md
+++ b/docs/university.md
@@ -136,6 +136,20 @@ pageClass: routes
</Route>
+### 人事处
+
+<Route author="nczitzk" example="/pku/hr" path="/pku/hr/:category?" :paramsDesc="['分类,见下方说明,默认为首页最新公告']">
+
+::: tip 提示
+
+分类字段处填写的是对应北京大学人事处分类页网址中介于 **<http://hr.pku.edu.cn/>** 和 **/index.htm** 中间的一段,并将其中的 `/` 修改为 `-`。
+
+如 [北京大学人事处 - 人才招聘 - 教师 - 教学科研人员](https://hr.pku.edu.cn/rczp/js/jxkyry/index.htm) 的网址为 <https://hr.pku.edu.cn/rczp/js/jxkyry/index.htm> 其中介于 **<http://hr.pku.edu.cn/>** 和 **/index.htm** 中间的一段为 `rczp/js/jxkyry`。随后,并将其中的 `/` 修改为 `-`,可以得到 `rczp-js-jxkyry`。所以最终我们的路由为 [`/pku/hr/rczp-js-jxkyry`](https://rsshub.app/pku/hr/rczp-js-jxkyry)
+
+:::
+
+</Route>
+
## 北京航空航天大学
### 北京航空航天大学
diff --git a/lib/v2/pku/hr.js b/lib/v2/pku/hr.js
new file mode 100644
index 00000000000000..a2be6f5f4a3222
--- /dev/null
+++ b/lib/v2/pku/hr.js
@@ -0,0 +1,54 @@
+const got = require('@/utils/got');
+const cheerio = require('cheerio');
+const { parseDate } = require('@/utils/parse-date');
+
+module.exports = async (ctx) => {
+ const category = ctx.params.category?.replace(/-/g, '/') ?? 'zxgg';
+
+ const rootUrl = 'https://hr.pku.edu.cn/';
+ const currentUrl = `${rootUrl}/${category}/index.htm`;
+
+ const response = await got({
+ method: 'get',
+ url: currentUrl,
+ });
+
+ const $ = cheerio.load(response.data);
+
+ const list = $('.item-list li a')
+ .map((_, item) => {
+ item = $(item);
+
+ return {
+ title: item.text().replace(/\d+、/, ''),
+ link: `${rootUrl}/${category}/${item.attr('href')}`,
+ };
+ })
+ .get();
+
+ const items = await Promise.all(
+ list.map((item) =>
+ ctx.cache.tryGet(item.link, async () => {
+ const detailResponse = await got({
+ method: 'get',
+ url: item.link,
+ });
+
+ const content = cheerio.load(detailResponse.data);
+
+ content('.title').remove();
+
+ item.description = content('.article').html();
+ item.pubDate = parseDate(content('#date').text());
+
+ return item;
+ })
+ )
+ );
+
+ ctx.state.data = {
+ title: `${$('h2').text()} - ${$('title').text()}`,
+ link: currentUrl,
+ item: items,
+ };
+};
diff --git a/lib/v2/pku/maintainer.js b/lib/v2/pku/maintainer.js
new file mode 100644
index 00000000000000..de641d1c689011
--- /dev/null
+++ b/lib/v2/pku/maintainer.js
@@ -0,0 +1,3 @@
+module.exports = {
+ '/hr/:category?': ['nczitzk'],
+};
diff --git a/lib/v2/pku/radar.js b/lib/v2/pku/radar.js
new file mode 100644
index 00000000000000..5de8bc529eef37
--- /dev/null
+++ b/lib/v2/pku/radar.js
@@ -0,0 +1,13 @@
+module.exports = {
+ 'pku.edu.cn': {
+ _name: '北京大学',
+ hr: [
+ {
+ title: '人事处',
+ docs: 'https://docs.rsshub.app/university.html#bei-jing-da-xue-ren-shi-chu',
+ source: ['/'],
+ target: '/pku/hr/:category?',
+ },
+ ],
+ },
+};
diff --git a/lib/v2/pku/router.js b/lib/v2/pku/router.js
new file mode 100644
index 00000000000000..6f22cd81e5c6f4
--- /dev/null
+++ b/lib/v2/pku/router.js
@@ -0,0 +1,3 @@
+module.exports = function (router) {
+ router.get('/hr/:category?', require('./hr'));
+};
|
131bc33637f887da8e83e22ba064eae88a90f4ac
|
2024-12-24 14:26:52
|
DIYgod
|
feat: update follow config
| false
|
update follow config
|
feat
|
diff --git a/lib/api/follow/config.ts b/lib/api/follow/config.ts
index e8275f83a5d7bc..6465470dd845be 100644
--- a/lib/api/follow/config.ts
+++ b/lib/api/follow/config.ts
@@ -17,7 +17,7 @@ const handler: RouteHandler<typeof route> = (ctx) =>
ownerUserId: config.follow.ownerUserId,
description: config.follow.description,
price: config.follow.price,
- limit: config.follow.limit,
+ userLimit: config.follow.userLimit,
});
export { route, handler };
diff --git a/lib/config.ts b/lib/config.ts
index c50fa679f3327a..ae084fab5cf184 100644
--- a/lib/config.ts
+++ b/lib/config.ts
@@ -90,7 +90,7 @@ export type Config = {
ownerUserId?: string;
description?: string;
price?: number;
- limit?: number;
+ userLimit?: number;
};
// Route-specific Configurations
@@ -520,7 +520,7 @@ const calculateValue = () => {
ownerUserId: envs.FOLLOW_OWNER_USER_ID,
description: envs.FOLLOW_DESCRIPTION,
price: toInt(envs.FOLLOW_PRICE),
- limit: toInt(envs.FOLLOW_LIMIT),
+ userLimit: toInt(envs.FOLLOW_USER_LIMIT),
},
// Route-specific Configurations
|
f4311e3e015b7a45d668d1cf32760d9a546dc076
|
2020-04-28 17:37:07
|
dependabot-preview[bot]
|
chore(deps): bump puppeteer from 3.0.1 to 3.0.2
| false
|
bump puppeteer from 3.0.1 to 3.0.2
|
chore
|
diff --git a/package.json b/package.json
index c2644b61c3fbc9..8c5ba9538fd6c4 100644
--- a/package.json
+++ b/package.json
@@ -95,7 +95,7 @@
"parse-torrent": "7.1.2",
"pidusage": "2.0.18",
"plist": "3.0.1",
- "puppeteer": "3.0.1",
+ "puppeteer": "3.0.2",
"query-string": "6.12.1",
"redis": "3.0.2",
"require-all": "3.0.0",
diff --git a/yarn.lock b/yarn.lock
index 116bfbf5751c6f..da1fe5c50d1dac 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -9787,10 +9787,10 @@ punycode@^2.1.0, punycode@^2.1.1:
resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec"
integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==
[email protected]:
- version "3.0.1"
- resolved "https://registry.yarnpkg.com/puppeteer/-/puppeteer-3.0.1.tgz#dce04a0b742fbf29f81ff423b2164e84647b4379"
- integrity sha512-DxNnI9n4grVHC+9irUfNK2T6YFuRECJnvG7VzdVolxpVwWC5DQqI5ho9Z0af48K5MQW4sJY5cq3qQ5g6NkAjvw==
[email protected]:
+ version "3.0.2"
+ resolved "https://registry.yarnpkg.com/puppeteer/-/puppeteer-3.0.2.tgz#1d08cdb7c0c2666f5e743221b1cb1946fea493f0"
+ integrity sha512-5jS/POFVDW9fqb76O8o0IBpXOnq+Na8ocGMggYtnjCRBRqmAFvX0csmwgLOHkYnQ/vCBcBPYlOq0Pp60z1850Q==
dependencies:
"@types/mime-types" "^2.1.0"
debug "^4.1.0"
|
5a7fd489930d1ccf1e1d7c632f01779d18353409
|
2019-07-08 20:04:22
|
DIYgod
|
chore(deps): update dependency eslint to v6
| false
|
update dependency eslint to v6
|
chore
|
diff --git a/.eslintrc b/.eslintrc
index 53a25376bebc8a..a85401527e86eb 100644
--- a/.eslintrc
+++ b/.eslintrc
@@ -50,6 +50,8 @@
"no-trailing-spaces": 1,
"no-control-regex": 0,
"prettier/prettier": 0,
- "no-await-in-loop": 1
+ "no-await-in-loop": 1,
+ "require-atomic-updates": 0,
+ "no-prototype-builtins": 0
}
}
diff --git a/lib/routes/weibo/utils.js b/lib/routes/weibo/utils.js
index 080a58c76a4f54..cac7d3d7e7065f 100644
--- a/lib/routes/weibo/utils.js
+++ b/lib/routes/weibo/utils.js
@@ -37,19 +37,18 @@ const weiboUtils = {
}
return temp;
},
- getShowData: (uid, bid) =>
- new Promise(async function(resolve) {
- const link = `https://m.weibo.cn/statuses/show?id=${bid}`;
- const itemResponse = await got.get(link, {
- headers: {
- Referer: `https://m.weibo.cn/u/${uid}`,
- 'MWeibo-Pwa': 1,
- 'X-Requested-With': 'XMLHttpRequest',
- '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',
- },
- });
- resolve(itemResponse.data.data);
- }),
+ getShowData: async (uid, bid) => {
+ const link = `https://m.weibo.cn/statuses/show?id=${bid}`;
+ const itemResponse = await got.get(link, {
+ headers: {
+ Referer: `https://m.weibo.cn/u/${uid}`,
+ 'MWeibo-Pwa': 1,
+ 'X-Requested-With': 'XMLHttpRequest',
+ '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',
+ },
+ });
+ return itemResponse.data.data;
+ },
formatVideo: (itemDesc, status) => {
const pageInfo = status.page_info;
if (pageInfo && pageInfo.type === 'video') {
diff --git a/package.json b/package.json
index e5a16fc3145f64..686ef22ddcb8d8 100644
--- a/package.json
+++ b/package.json
@@ -34,7 +34,7 @@
"@vuepress/plugin-back-to-top": "1.0.2",
"@vuepress/plugin-google-analytics": "1.0.2",
"@vuepress/plugin-pwa": "1.0.2",
- "eslint": "5.16.0",
+ "eslint": "6.0.1",
"eslint-config-prettier": "6.0.0",
"eslint-plugin-prettier": "3.1.0",
"jest": "24.8.0",
diff --git a/yarn.lock b/yarn.lock
index 7029365d6d4b2d..0747459a9b704b 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -1455,6 +1455,16 @@ ajv@^6.1.0, ajv@^6.5.5, ajv@^6.9.1:
json-schema-traverse "^0.4.1"
uri-js "^4.2.2"
+ajv@^6.10.0:
+ version "6.10.1"
+ resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.10.1.tgz#ebf8d3af22552df9dd049bfbe50cc2390e823593"
+ integrity sha512-w1YQaVGNC6t2UCPjEawK/vo/dG8OOrVtUmhBT1uJJYxbl5kU2Tj3v6LGqBcsysN1yhuCStJCCA3GqdvKY8sqXQ==
+ dependencies:
+ fast-deep-equal "^2.0.1"
+ fast-json-stable-stringify "^2.0.0"
+ json-schema-traverse "^0.4.1"
+ uri-js "^4.2.2"
+
algoliasearch@^3.24.5:
version "3.33.0"
resolved "https://registry.yarnpkg.com/algoliasearch/-/algoliasearch-3.33.0.tgz#83b541124ebb0db54643009d4e660866b3177cdf"
@@ -3670,13 +3680,13 @@ eslint-visitor-keys@^1.0.0:
resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz#3f3180fb2e291017716acb4c9d6d5b5c34a6a81d"
integrity sha512-qzm/XxIbxm/FHyH341ZrbnMUpe+5Bocte9xkmFMzPMjRaZMcXww+MpBptFvtU+79L362nqiLhekCxCxDPaUMBQ==
[email protected]:
- version "5.16.0"
- resolved "https://registry.yarnpkg.com/eslint/-/eslint-5.16.0.tgz#a1e3ac1aae4a3fbd8296fcf8f7ab7314cbb6abea"
- integrity sha512-S3Rz11i7c8AA5JPv7xAH+dOyq/Cu/VXHiHXBPOU1k/JAM5dXqQPt3qcrhpHSorXmrpu2g0gkIBVXAqCpzfoZIg==
[email protected]:
+ version "6.0.1"
+ resolved "https://registry.yarnpkg.com/eslint/-/eslint-6.0.1.tgz#4a32181d72cb999d6f54151df7d337131f81cda7"
+ integrity sha512-DyQRaMmORQ+JsWShYsSg4OPTjY56u1nCjAmICrE8vLWqyLKxhFXOthwMj1SA8xwfrv0CofLNVnqbfyhwCkaO0w==
dependencies:
"@babel/code-frame" "^7.0.0"
- ajv "^6.9.1"
+ ajv "^6.10.0"
chalk "^2.1.0"
cross-spawn "^6.0.5"
debug "^4.0.1"
@@ -3684,18 +3694,19 @@ [email protected]:
eslint-scope "^4.0.3"
eslint-utils "^1.3.1"
eslint-visitor-keys "^1.0.0"
- espree "^5.0.1"
+ espree "^6.0.0"
esquery "^1.0.1"
esutils "^2.0.2"
file-entry-cache "^5.0.1"
functional-red-black-tree "^1.0.1"
- glob "^7.1.2"
+ glob-parent "^3.1.0"
globals "^11.7.0"
ignore "^4.0.6"
import-fresh "^3.0.0"
imurmurhash "^0.1.4"
inquirer "^6.2.2"
- js-yaml "^3.13.0"
+ is-glob "^4.0.0"
+ js-yaml "^3.13.1"
json-stable-stringify-without-jsonify "^1.0.1"
levn "^0.3.0"
lodash "^4.17.11"
@@ -3703,7 +3714,6 @@ [email protected]:
mkdirp "^0.5.1"
natural-compare "^1.4.0"
optionator "^0.8.2"
- path-is-inside "^1.0.2"
progress "^2.0.0"
regexpp "^2.0.1"
semver "^5.5.1"
@@ -3712,10 +3722,10 @@ [email protected]:
table "^5.2.3"
text-table "^0.2.0"
-espree@^5.0.1:
- version "5.0.1"
- resolved "https://registry.yarnpkg.com/espree/-/espree-5.0.1.tgz#5d6526fa4fc7f0788a5cf75b15f30323e2f81f7a"
- integrity sha512-qWAZcWh4XE/RwzLJejfcofscgMc9CamR6Tn1+XRXNzrvUSSbiAjGOI/fggztjIi7y9VLPqnICMIPiGyr8JaZ0A==
+espree@^6.0.0:
+ version "6.0.0"
+ resolved "https://registry.yarnpkg.com/espree/-/espree-6.0.0.tgz#716fc1f5a245ef5b9a7fdb1d7b0d3f02322e75f6"
+ integrity sha512-lJvCS6YbCn3ImT3yKkPe0+tJ+mH6ljhGNjHQH9mRtiO6gjhVAOhVXW1yjnwqGwTkK3bGbye+hb00nFNmu0l/1Q==
dependencies:
acorn "^6.0.7"
acorn-jsx "^5.0.0"
@@ -5888,7 +5898,7 @@ js-tokens@^3.0.1:
resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.2.tgz#9866df395102130e38f7f996bceb65443209c25b"
integrity sha1-mGbfOVECEw449/mWvOtlRDIJwls=
-js-yaml@^3.11.0, js-yaml@^3.13.0, js-yaml@^3.13.1, js-yaml@^3.9.0:
+js-yaml@^3.11.0, js-yaml@^3.13.1, js-yaml@^3.9.0:
version "3.13.1"
resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.13.1.tgz#aff151b30bfdfa8e49e05da22e7415e9dfa37847"
integrity sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==
|
d3d784548a7ce0c0a09c0f2ebbabb0fa116e7296
|
2019-11-19 15:35:47
|
hoilc
|
fix: 果壳网科学人图片修复 (#3443)
| false
|
果壳网科学人图片修复 (#3443)
|
fix
|
diff --git a/lib/routes/guokr/scientific.js b/lib/routes/guokr/scientific.js
index 9c8e4a8558954c..9c80137563a73b 100644
--- a/lib/routes/guokr/scientific.js
+++ b/lib/routes/guokr/scientific.js
@@ -11,7 +11,7 @@ module.exports = async (ctx) => {
description: '果壳网 科学人',
item: result.map((item) => ({
title: item.title,
- description: `${item.summary}<br><img src="${item.image_info.url}">`,
+ description: `${item.summary}<br><img src="${item.image_info ? item.image_info.url : item.small_image}">`,
pubDate: item.date_published,
link: item.url,
author: item.author.nickname,
|
e7c81ccead473fcc77f957de42f90c9239b9b5cf
|
2023-09-13 03:57:47
|
dependabot[bot]
|
chore(deps-dev): bump @types/request-promise-native from 1.0.9 to 1.0.18 (#13278)
| false
|
bump @types/request-promise-native from 1.0.9 to 1.0.18 (#13278)
|
chore
|
diff --git a/package.json b/package.json
index e6657aa9e21b89..95a4c08baa271d 100644
--- a/package.json
+++ b/package.json
@@ -173,7 +173,7 @@
"@types/nodemon": "1.19.2",
"@types/pidusage": "2.0.2",
"@types/plist": "3.0.2",
- "@types/request-promise-native": "1.0.9",
+ "@types/request-promise-native": "1.0.18",
"@types/require-all": "3.0.0",
"@types/showdown": "2.0.1",
"@types/string-width": "4.0.1",
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index aea25c7a5cded2..7c1ca211ebda5f 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -272,8 +272,8 @@ devDependencies:
specifier: 3.0.2
version: 3.0.2
'@types/request-promise-native':
- specifier: 1.0.9
- version: 1.0.9
+ specifier: 1.0.18
+ version: 1.0.18
'@types/require-all':
specifier: 3.0.0
version: 3.0.0
@@ -1700,8 +1700,8 @@ packages:
resolution: {integrity: sha512-EEhsLsD6UsDM1yFhAvy0Cjr6VwmpMWqFBCb9w07wVugF7w9nfajxLuVmngTIpgS6svCnm6Vaw+MZhoDCKnOfsw==}
dev: true
- /@types/[email protected]:
- resolution: {integrity: sha512-3/pSG5/qGyutmSwxTGvHSzh6Dgqa505Czy7JC+MXEgi5zmgaCgUQwGvDEjhytuKgfLldQrKWnd4tEqtDYKvGDw==}
+ /@types/[email protected]:
+ resolution: {integrity: sha512-tPnODeISFc/c1LjWyLuZUY+Z0uLB3+IMfNoQyDEi395+j6kTFTTRAqjENjoPJUid4vHRGEozoTrcTrfZM+AcbA==}
dependencies:
'@types/request': 2.48.8
dev: true
|
39680b12d2e90ba7cd77307f61f2519758fcab7c
|
2019-09-05 10:48:47
|
f00bar
|
feat: add GitHub user starred repositories (#2999)
| false
|
add GitHub user starred repositories (#2999)
|
feat
|
diff --git a/assets/radar-rules.js b/assets/radar-rules.js
index bb91073d0a7093..bcde96474fc49d 100644
--- a/assets/radar-rules.js
+++ b/assets/radar-rules.js
@@ -197,6 +197,12 @@
source: '/:user/:repo/blob/:branch/*filepath',
target: '/github/file/:user/:repo/:branch/:filepath',
},
+ {
+ title: '用户 Starred Repositories',
+ docs: 'https://docs.rsshub.app/programming.html#github',
+ source: '/:user',
+ target: '/github/starred_repos/:user',
+ },
],
},
'zhihu.com': {
diff --git a/docs/programming.md b/docs/programming.md
index c8d2a6ceabf901..c473cb8d51d828 100644
--- a/docs/programming.md
+++ b/docs/programming.md
@@ -111,6 +111,10 @@ GitHub 官方也提供了一些 RSS:
| 根据 fork 数量排序 | forks |
| 根据更新时间排序 | updated |
+### 用户 Starred Repositories
+
+<Route author="LanceZhu" example="/github/starred_repos/DIYgod" path="/github/starred_repos/:user" :paramsDesc="['用户名']" radar="1"/>
+
## GitLab
### Explore
diff --git a/lib/router.js b/lib/router.js
index d4fde28212c328..f30406903e39eb 100644
--- a/lib/router.js
+++ b/lib/router.js
@@ -232,6 +232,7 @@ router.get('/github/stars/:user/:repo', require('./routes/github/star'));
router.get('/github/search/:query/:sort?/:order?', require('./routes/github/search'));
router.get('/github/branches/:user/:repo', require('./routes/github/branches'));
router.get('/github/file/:user/:repo/:branch/:filepath+', require('./routes/github/file'));
+router.get('/github/starred_repos/:user', require('./routes/github/starred_repos'));
// f-droid
router.get('/fdroid/apprelease/:app', require('./routes/fdroid/apprelease'));
diff --git a/lib/routes/github/starred_repos.js b/lib/routes/github/starred_repos.js
new file mode 100644
index 00000000000000..be771ee97d7c20
--- /dev/null
+++ b/lib/routes/github/starred_repos.js
@@ -0,0 +1,60 @@
+const got = require('@/utils/got');
+const config = require('@/config');
+
+module.exports = async (ctx) => {
+ if (!config.github || !config.github.access_token) {
+ throw 'GitHub star RSS is disabled due to the lack of <a href="https://docs.rsshub.app/install/#%E9%83%A8%E5%88%86-rss-%E6%A8%A1%E5%9D%97%E9%85%8D%E7%BD%AE">relevant config</a>';
+ }
+ const user = ctx.params.user;
+
+ const host = `https://github.com/${user}?tab=stars`;
+ const url = 'https://api.github.com/graphql';
+
+ const response = await got({
+ method: 'post',
+ url,
+ headers: {
+ Authorization: `bearer ${config.github.access_token}`,
+ },
+ json: true,
+ data: {
+ query: `
+ {
+ user(login: "${user}") {
+ starredRepositories(first: 10, orderBy: {direction: DESC, field: STARRED_AT}) {
+ edges {
+ starredAt
+ node {
+ name
+ description
+ url
+ openGraphImageUrl
+ primaryLanguage {
+ name
+ }
+ stargazers {
+ totalCount
+ }
+ }
+ }
+ }
+ }
+ }
+ `,
+ },
+ });
+
+ const data = response.data.data.user.starredRepositories.edges;
+
+ ctx.state.data = {
+ title: `${user}’s starred repositories`,
+ link: host,
+ description: `${user}’s starred repositories`,
+ item: data.map((repo) => ({
+ title: `${user} starred ${repo.node.name}`,
+ description: `${repo.node.description} <br> primary language: ${repo.node.primaryLanguage.name} <br> stargazers: ${repo.node.stargazers.totalCount} <br> <img sytle="width:50px;" src='${repo.node.openGraphImageUrl}'>`,
+ pubDate: new Date(`${repo.starredAt}`).toUTCString(),
+ link: `${repo.node.url}`,
+ })),
+ };
+};
|
a694450eab5606d2d5e99c9c431a0009f560292e
|
2020-12-04 21:19:11
|
Ethan Shen
|
feat: add deepmind blog (#6310)
| false
|
add deepmind blog (#6310)
|
feat
|
diff --git a/docs/en/new-media.md b/docs/en/new-media.md
index 42e43500fc03a2..4ac06416bd4c9b 100644
--- a/docs/en/new-media.md
+++ b/docs/en/new-media.md
@@ -57,6 +57,18 @@ Compared to the official one, the RSS feed generated by RSSHub not only has more
<RouteEn author="nczitzk" example="/cgtn/top" path="/cgtn/top"/>
+## DeepMind
+
+### Blog
+
+<RouteEn author="nczitzk" example="/deepmind/blog" path="/deepmind/blog/:category?" :paramsDesc="['Category, see below']">
+
+| All | Podcasts | Research | News |
+| --- | -------- | -------- | ---- |
+| | Podcasts | Research | News |
+
+</RouteEn>
+
## Deutsche Welle
<RouteEn author="nczitzk" example="/dw/en" path="/dw/:lang?/:caty?" :paramsDesc="['Language, can be found in the URL of the corresponding language version page, German by default', 'Category, all by default']">
diff --git a/docs/new-media.md b/docs/new-media.md
index a8b4b0cd02d381..304803dc071d84 100644
--- a/docs/new-media.md
+++ b/docs/new-media.md
@@ -118,6 +118,18 @@ pageClass: routes
<Route author="kt286" example="/cnbeta" path="/cnbeta"/>
+## DeepMind
+
+### Blog
+
+<Route author="nczitzk" example="/deepmind/blog" path="/deepmind/blog/:category?" :paramsDesc="['分类,见下表']">
+
+| All | Podcasts | Research | News |
+| --- | -------- | -------- | ---- |
+| | Podcasts | Research | News |
+
+</Route>
+
## DeepL
### Blog
diff --git a/lib/router.js b/lib/router.js
index 8827ce34f17393..5eaeef162874e7 100644
--- a/lib/router.js
+++ b/lib/router.js
@@ -3517,6 +3517,9 @@ router.get('/uisdc/news', require('./routes/uisdc/news'));
router.get('/uisdc/zt/:title?', require('./routes/uisdc/zt'));
router.get('/uisdc/topic/:title?/:sort?', require('./routes/uisdc/topic'));
+// DeepMind
+router.get('/deepmind/blog/:category?', require('./routes/deepmind/blog'));
+
// 东西智库
router.get('/dx2025/:type?/:category?', require('./routes/dx2025/index'));
diff --git a/lib/routes/deepmind/blog.js b/lib/routes/deepmind/blog.js
new file mode 100644
index 00000000000000..df0a0b3d62b79f
--- /dev/null
+++ b/lib/routes/deepmind/blog.js
@@ -0,0 +1,44 @@
+const got = require('@/utils/got');
+const cheerio = require('cheerio');
+
+module.exports = async (ctx) => {
+ const category = ctx.params.category || '';
+
+ const rootUrl = 'https://deepmind.com';
+ const currentUrl = `${rootUrl}/api/search/?content_type=blog&filters=${category === '' ? '' : `{"category":["${category}"]}`}&page=1&pagelen=21&q=&sort=relevance`;
+ const response = await got({
+ method: 'get',
+ url: currentUrl,
+ });
+
+ const data = JSON.parse(response.data.substr(5, response.data.length - 5));
+
+ const list = data.results.slice(0, 10).map((item) => ({
+ title: item.title,
+ link: `${rootUrl}${item.link.internal_page}`,
+ pubDate: new Date(item.date).toUTCString(),
+ }));
+
+ const items = await Promise.all(
+ list.map(
+ async (item) =>
+ await ctx.cache.tryGet(item.link, async () => {
+ const detailResponse = await got({
+ method: 'get',
+ url: item.link,
+ });
+ const content = cheerio.load(detailResponse.data);
+
+ item.description = content('.user-content').html();
+
+ return item;
+ })
+ )
+ );
+
+ ctx.state.data = {
+ title: `${category === '' ? 'Blog' : category} | DeepMind`,
+ link: `${rootUrl}/blog?filters=${category === '' ? '' : `{"category":["${category}"]}`}`,
+ item: items,
+ };
+};
|
3fafb3cc27c0f29ddb860989d4601e57d5462eb2
|
2024-06-18 15:23:31
|
dependabot[bot]
|
chore(deps): bump proxy-chain from 2.4.0 to 2.4.1 (#15936)
| false
|
bump proxy-chain from 2.4.0 to 2.4.1 (#15936)
|
chore
|
diff --git a/package.json b/package.json
index f4c885460221bf..e871fc7baeb640 100644
--- a/package.json
+++ b/package.json
@@ -97,7 +97,7 @@
"ofetch": "1.3.4",
"otplib": "12.0.1",
"pac-proxy-agent": "7.0.1",
- "proxy-chain": "2.4.0",
+ "proxy-chain": "2.4.1",
"puppeteer": "22.6.2",
"puppeteer-extra": "3.3.6",
"puppeteer-extra-plugin-stealth": "2.11.2",
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 2426ae58bce500..0215484536c10a 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -150,8 +150,8 @@ importers:
specifier: 7.0.1
version: 7.0.1
proxy-chain:
- specifier: 2.4.0
- version: 2.4.0
+ specifier: 2.4.1
+ version: 2.4.1
puppeteer:
specifier: 22.6.2
version: 22.6.2([email protected])([email protected])([email protected])
@@ -4334,8 +4334,8 @@ packages:
resolution: {integrity: sha512-u0piLU+nCOHMgGjRbimiXmA9kM/L9EHh3zL81xCdp7m+Y2pHIsnmbdDoEDoAz5geaonNR6q6+yOPQs6n4T6sBQ==}
engines: {node: '>= 14'}
- [email protected]:
- resolution: {integrity: sha512-fbFfzJDxWcLYYvI+yx0VXjTgJPfXsGdhFnCJN4rq/5GZSgn9CQpRgm1KC2iEJfhL8gkeZCWJYBAllmGMT356cg==}
+ [email protected]:
+ resolution: {integrity: sha512-s3cb4cXMqyfINLhohN+BHGxhq5vGxx0Z48f0SbuYnge2wEoKxS1xeHATVXG2lkUvrDnSaQ8JhwuEWkKlrO23Gg==}
engines: {node: '>=14'}
[email protected]:
@@ -10041,7 +10041,7 @@ snapshots:
transitivePeerDependencies:
- supports-color
- [email protected]:
+ [email protected]:
dependencies:
tslib: 2.6.3
|
616ad78c881b67303f70ea8de9d948ac8ba75bec
|
2022-05-01 01:44:07
|
Rongrong
|
fix(core/utils/anti-hotlink): invalid HTML output (#9669)
| false
|
invalid HTML output (#9669)
|
fix
|
diff --git a/lib/middleware/anti-hotlink.js b/lib/middleware/anti-hotlink.js
index ffb53bea512533..945f4b1eec0b04 100644
--- a/lib/middleware/anti-hotlink.js
+++ b/lib/middleware/anti-hotlink.js
@@ -16,7 +16,13 @@ const parseUrl = (str) => {
return url;
};
const replaceUrls = (body, template) => {
- const $ = cheerio.load(body, { decodeEntities: false, xmlMode: true });
+ // const $ = cheerio.load(body, { decodeEntities: false, xmlMode: true });
+ // `<br><img><hr><video><source>abc</video>` => `<br><img><hr><video><source>abc</source></video></hr></img></br>`
+ // so awful...
+ // "In HTML, using a closing tag on an empty element is usually invalid."
+ // https://developer.mozilla.org/en-US/docs/Glossary/Empty_element
+ // I guess it is just a workaround to drop `<html><head></head><body>`, so this is what we exactly need:
+ const $ = cheerio.load(body, null, false);
$('img').each(function () {
const old_src = $(this).attr('src');
const url = parseUrl(old_src);
@@ -35,7 +41,7 @@ module.exports = async (ctx, next) => {
const template = config.hotlink.template;
// Assume that only description include image link
// and here we will only check them in description.
- // Use Cherrio to load the description as html and filter all
+ // Use Cheerio to load the description as html and filter all
// image link
if (template) {
if (ctx.state.data) {
diff --git a/test/middleware/anti-hotlink.js b/test/middleware/anti-hotlink.js
index 23a02ff7852f7a..6fd54f2e4bdb9b 100644
--- a/test/middleware/anti-hotlink.js
+++ b/test/middleware/anti-hotlink.js
@@ -15,6 +15,13 @@ afterEach(() => {
});
describe('anti-hotlink', () => {
+ // First-time require is really, really slow.
+ // If someone merely runs this test unit instead of the whole suite and this stage does not exist,
+ // the next one will sometimes time out, so we need to firstly require it once.
+ it('server-require', () => {
+ server = require('../../lib/index');
+ });
+
it('template', async () => {
process.env.HOTLINK_TEMPLATE = 'https://i3.wp.com/${host}${pathname}';
server = require('../../lib/index');
@@ -23,62 +30,52 @@ describe('anti-hotlink', () => {
const response = await request.get('/test/complicated');
const parsed = await parser.parseString(response.text);
expect(parsed.items[0].content).toBe(
- `<a href="https://mock.com/DIYgod/RSSHub"/>
+ `<a href="https://mock.com/DIYgod/RSSHub"></a>
<img src="https://i3.wp.com/mock.com/DIYgod/RSSHub.jpg" referrerpolicy="no-referrer">
-<a href="http://mock.com/DIYgod/RSSHub"/>
+<a href="http://mock.com/DIYgod/RSSHub"></a>
<img src="https://i3.wp.com/mock.com/DIYgod/RSSHub.jpg" data-src="/DIYgod/RSSHub0.jpg" referrerpolicy="no-referrer">
<img data-src="/DIYgod/RSSHub.jpg" src="https://i3.wp.com/mock.com/DIYgod/RSSHub.jpg" referrerpolicy="no-referrer">
<img data-mock="/DIYgod/RSSHub.png" src="https://i3.wp.com/mock.com/DIYgod/RSSHub.png" referrerpolicy="no-referrer">
<img mock="/DIYgod/RSSHub.gif" src="https://i3.wp.com/mock.com/DIYgod/RSSHub.gif" referrerpolicy="no-referrer">
<img src="https://i3.wp.com/mock.com/DIYgod/DIYgod/RSSHub" referrerpolicy="no-referrer">
-<img src="https://i3.wp.com/mock.com/DIYgod/RSSHub.jpg" referrerpolicy="no-referrer"/></img></img></img></img></img></img>`
+<img src="https://i3.wp.com/mock.com/DIYgod/RSSHub.jpg" referrerpolicy="no-referrer">`
);
- expect(parsed.items[1].content).toBe(`<a href="https://mock.com/DIYgod/RSSHub"/>
-<img src="https://i3.wp.com/mock.com/DIYgod/RSSHub.jpg" referrerpolicy="no-referrer"/>`);
+ expect(parsed.items[1].content).toBe(`<a href="https://mock.com/DIYgod/RSSHub"></a>
+<img src="https://i3.wp.com/mock.com/DIYgod/RSSHub.jpg" referrerpolicy="no-referrer">`);
});
- it('url', async () => {
- process.env.HOTLINK_TEMPLATE = '${protocol}//${host}${pathname}';
- server = require('../../lib/index');
- const request = supertest(server);
- const response = await request.get('/test/complicated');
- const parsed = await parser.parseString(response.text);
- expect(parsed.items[0].content).toBe(
- `<a href="https://mock.com/DIYgod/RSSHub"/>
+ const origin1 = `<a href="https://mock.com/DIYgod/RSSHub"></a>
<img src="https://mock.com/DIYgod/RSSHub.jpg" referrerpolicy="no-referrer">
-<a href="http://mock.com/DIYgod/RSSHub"/>
+<a href="http://mock.com/DIYgod/RSSHub"></a>
<img src="https://mock.com/DIYgod/RSSHub.jpg" data-src="/DIYgod/RSSHub0.jpg" referrerpolicy="no-referrer">
<img data-src="/DIYgod/RSSHub.jpg" src="https://mock.com/DIYgod/RSSHub.jpg" referrerpolicy="no-referrer">
<img data-mock="/DIYgod/RSSHub.png" src="https://mock.com/DIYgod/RSSHub.png" referrerpolicy="no-referrer">
<img mock="/DIYgod/RSSHub.gif" src="https://mock.com/DIYgod/RSSHub.gif" referrerpolicy="no-referrer">
<img src="http://mock.com/DIYgod/DIYgod/RSSHub" referrerpolicy="no-referrer">
-<img src="https://mock.com/DIYgod/RSSHub.jpg" referrerpolicy="no-referrer"/></img></img></img></img></img></img>`
- );
- expect(parsed.items[1].content).toBe(`<a href="https://mock.com/DIYgod/RSSHub"/>
-<img src="https://mock.com/DIYgod/RSSHub.jpg" referrerpolicy="no-referrer"/>`);
- });
- it('no-template', async () => {
- process.env.HOTLINK_TEMPLATE = '';
+<img src="https://mock.com/DIYgod/RSSHub.jpg" referrerpolicy="no-referrer">`;
+
+ const origin2 = `<a href="https://mock.com/DIYgod/RSSHub"></a>
+<img src="https://mock.com/DIYgod/RSSHub.jpg" referrerpolicy="no-referrer">`;
+
+ const testOrigin = async () => {
server = require('../../lib/index');
const request = supertest(server);
const response = await request.get('/test/complicated');
const parsed = await parser.parseString(response.text);
- expect(parsed.items[0].content).toBe(
- `<a href="https://mock.com/DIYgod/RSSHub"></a>
-<img src="https://mock.com/DIYgod/RSSHub.jpg" referrerpolicy="no-referrer">
+ expect(parsed.items[0].content).toBe(origin1);
+ expect(parsed.items[1].content).toBe(origin2);
+ };
-<a href="http://mock.com/DIYgod/RSSHub"></a>
-<img src="https://mock.com/DIYgod/RSSHub.jpg" data-src="/DIYgod/RSSHub0.jpg" referrerpolicy="no-referrer">
-<img data-src="/DIYgod/RSSHub.jpg" src="https://mock.com/DIYgod/RSSHub.jpg" referrerpolicy="no-referrer">
-<img data-mock="/DIYgod/RSSHub.png" src="https://mock.com/DIYgod/RSSHub.png" referrerpolicy="no-referrer">
-<img mock="/DIYgod/RSSHub.gif" src="https://mock.com/DIYgod/RSSHub.gif" referrerpolicy="no-referrer">
-<img src="http://mock.com/DIYgod/DIYgod/RSSHub" referrerpolicy="no-referrer">
-<img src="https://mock.com/DIYgod/RSSHub.jpg" referrerpolicy="no-referrer">`
- );
- expect(parsed.items[1].content).toBe(`<a href="https://mock.com/DIYgod/RSSHub"></a>
-<img src="https://mock.com/DIYgod/RSSHub.jpg" referrerpolicy="no-referrer">`);
+ it('url', async () => {
+ process.env.HOTLINK_TEMPLATE = '${protocol}//${host}${pathname}';
+ await testOrigin();
+ });
+
+ it('no-template', async () => {
+ process.env.HOTLINK_TEMPLATE = '';
+ await testOrigin();
});
});
|
bfa5a70ff005a5987afe48d248212046e27ea3da
|
2019-07-12 09:25:59
|
renovate[bot]
|
chore(deps): update dependency googleapis to v41 (#2609)
| false
|
update dependency googleapis to v41 (#2609)
|
chore
|
diff --git a/package.json b/package.json
index 5dc4755d3701cd..35533a052962ef 100644
--- a/package.json
+++ b/package.json
@@ -60,7 +60,7 @@
"etag": "1.8.1",
"form-data": "2.5.0",
"git-rev-sync": "1.12.0",
- "googleapis": "40.0.1",
+ "googleapis": "41.0.0",
"got": "9.6.0",
"he": "1.2.0",
"iconv-lite": "0.5.0",
diff --git a/yarn.lock b/yarn.lock
index 489e0edbf0239f..e07c8512c33f65 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -4566,10 +4566,10 @@ googleapis-common@^2.0.2:
url-template "^2.0.8"
uuid "^3.3.2"
[email protected]:
- version "40.0.1"
- resolved "https://registry.yarnpkg.com/googleapis/-/googleapis-40.0.1.tgz#a5cdd2c6257e04fa9d4848526a2799c309b97d56"
- integrity sha512-B6qZVCautOOspEhru9GZ814I+ztkGWyA4ZEUfaXwXHBruX/HAWqedbsuUEx1w3nCECywK/FLTNUdcbH9zpaMaw==
[email protected]:
+ version "41.0.0"
+ resolved "https://registry.yarnpkg.com/googleapis/-/googleapis-41.0.0.tgz#88460459c9b478a4b3df012c43743e0945fa4e0d"
+ integrity sha512-SdLIKUTwJAhwdnghlsFRZ7xtBESUs+pAIieRAQXVCXbFPih8dn1hhiZuM7SX5nNP6utb6S8nCwAcDLt5BIB2BA==
dependencies:
google-auth-library "^4.0.0"
googleapis-common "^2.0.2"
|
361cb60d0b5fcf7b251a905c8026e279ba49e53c
|
2021-08-21 20:55:40
|
D
|
docs(install): add heroku usage limit notice (#8060)
| false
|
add heroku usage limit notice (#8060)
|
docs
|
diff --git a/docs/en/install/README.md b/docs/en/install/README.md
index e73f58715b9357..eb58b8c2a52d01 100644
--- a/docs/en/install/README.md
+++ b/docs/en/install/README.md
@@ -242,6 +242,10 @@ in pkgs.stdenv.mkDerivation {
## Deploy to Heroku
+### Notice:
+
+Heroku accounts with unverified payment methods have only 550 hours of credit per month (about 23 days), and up to 1,000 hours per month with verified payment methods.
+
### Instant deploy (without automatic update)
[](https://heroku.com/deploy?template=https%3A%2F%2Fgithub.com%2FDIYgod%2FRSSHub)
|
49c8c5dcfd3e31f835ca85a8a04b2c992d2b5456
|
2022-10-11 02:49:04
|
dependabot[bot]
|
chore(deps): bump @sentry/node from 7.14.2 to 7.15.0 (#11053)
| false
|
bump @sentry/node from 7.14.2 to 7.15.0 (#11053)
|
chore
|
diff --git a/package.json b/package.json
index 7268801003d9bc..cc4bb17646905c 100644
--- a/package.json
+++ b/package.json
@@ -91,7 +91,7 @@
"dependencies": {
"@koa/router": "12.0.0",
"@postlight/parser": "2.2.2",
- "@sentry/node": "7.14.2",
+ "@sentry/node": "7.15.0",
"aes-js": "3.1.2",
"art-template": "4.13.2",
"bbcodejs": "0.0.4",
diff --git a/yarn.lock b/yarn.lock
index 13e9c17ed5e276..42ff11d1311a33 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -1544,50 +1544,39 @@
domhandler "^4.2.0"
selderee "^0.6.0"
-"@sentry/[email protected]":
- version "7.14.2"
- resolved "https://registry.yarnpkg.com/@sentry/core/-/core-7.14.2.tgz#47262aad43d94d8c5fb73b668a7e8e9c4b91c98f"
- integrity sha512-AXcH6nROugziO5KsKSQ9TmAXq6HJa8Fn+kDqAL/sNY65w6YYlHifMO2xHkSXVJxGw7vx9DYh/5SF+KnLn6NDNA==
- dependencies:
- "@sentry/hub" "7.14.2"
- "@sentry/types" "7.14.2"
- "@sentry/utils" "7.14.2"
- tslib "^1.9.3"
-
-"@sentry/[email protected]":
- version "7.14.2"
- resolved "https://registry.yarnpkg.com/@sentry/hub/-/hub-7.14.2.tgz#b7b4d6e5002cd5abe9a829a84db5f4270689c666"
- integrity sha512-18cuSesTn9VAF0JC107flLmtCRt/6DBn38uz0G9cPThKtTSNwjGvGZ/ag4J1iq+IDjVS5MA6iTncXOsSpVP2Wg==
+"@sentry/[email protected]":
+ version "7.15.0"
+ resolved "https://registry.yarnpkg.com/@sentry/core/-/core-7.15.0.tgz#983e08326afdb8ddb10494372cd22b3886d683c9"
+ integrity sha512-W8d44g04GShBn4Z9VBTUhf1T9LTMfzUnETEx237zzUucv0kkyj3LsWQsJapWchMbmwr1V/CdnNDN+lGDm8iXQA==
dependencies:
- "@sentry/types" "7.14.2"
- "@sentry/utils" "7.14.2"
+ "@sentry/types" "7.15.0"
+ "@sentry/utils" "7.15.0"
tslib "^1.9.3"
-"@sentry/[email protected]":
- version "7.14.2"
- resolved "https://registry.yarnpkg.com/@sentry/node/-/node-7.14.2.tgz#9d599cd7b3ad790cacd56fe9320ee88f87a8f462"
- integrity sha512-k2MsbF+ddEE8qoweRgrLh5853RqHN1a8MNlgsq8ibr8CKREbMzBvq14oVnvL61F/aojMlSMK2E6Z+SXBs7M6BA==
+"@sentry/[email protected]":
+ version "7.15.0"
+ resolved "https://registry.yarnpkg.com/@sentry/node/-/node-7.15.0.tgz#8784a747d9b933754b29bba954b22f0d54c3b614"
+ integrity sha512-gfyo6YTo4Sw5pdKWCzs7trqZpBm5D/ArR4vylQrQayfImiYyNY6yaOK1R7g4rM34MXUu91pfVJLUpXvjk/NsHw==
dependencies:
- "@sentry/core" "7.14.2"
- "@sentry/hub" "7.14.2"
- "@sentry/types" "7.14.2"
- "@sentry/utils" "7.14.2"
+ "@sentry/core" "7.15.0"
+ "@sentry/types" "7.15.0"
+ "@sentry/utils" "7.15.0"
cookie "^0.4.1"
https-proxy-agent "^5.0.0"
lru_map "^0.3.3"
tslib "^1.9.3"
-"@sentry/[email protected]":
- version "7.14.2"
- resolved "https://registry.yarnpkg.com/@sentry/types/-/types-7.14.2.tgz#78e2e2632d1ee10092549ba32efbe2bc288cbf6f"
- integrity sha512-JzkOtenArOXmJBAk/FBbxKKX7XC650HqkhGL4ugT/f+RyxfiDZ0X1TAYMrvKIe+qpn5Nh7JUBfR+BARKAiu2wQ==
+"@sentry/[email protected]":
+ version "7.15.0"
+ resolved "https://registry.yarnpkg.com/@sentry/types/-/types-7.15.0.tgz#50c57c924993d4dd16b43172d310c66384d17463"
+ integrity sha512-MN9haDRh9ZOsTotoDTHu2BT3sT8Vs1F0alhizUpDyjN2YgBCqR6JV+AbAE1XNHwS2+5zbppch1PwJUVeE58URQ==
-"@sentry/[email protected]":
- version "7.14.2"
- resolved "https://registry.yarnpkg.com/@sentry/utils/-/utils-7.14.2.tgz#5af245fc2d72211490cb9aeaf2098e048739120a"
- integrity sha512-vpZolN+k1IoxWXhKyOVcRl7V1bgww+96gHqTJdcMzOB83x/ofels7L0kqxb03WukKTYcnc7Ep+yBiKi/OYX9og==
+"@sentry/[email protected]":
+ version "7.15.0"
+ resolved "https://registry.yarnpkg.com/@sentry/utils/-/utils-7.15.0.tgz#cda642a353a58fd6631979c1e5986788e6db6c43"
+ integrity sha512-akic22/6xa/RG5Mj7UN6pLc23VnX9zQlKM53L/q3yIr0juckSVthJiiFNdgdqrX03S1tHYlBgPeShKFFTHpkjA==
dependencies:
- "@sentry/types" "7.14.2"
+ "@sentry/types" "7.15.0"
tslib "^1.9.3"
"@sinclair/typebox@^0.24.1":
|
b27218c2d2a49974e8181528ab3706562ff12d95
|
2024-12-19 22:55:33
|
Ethan Shen
|
feat(route): add 艾瑞咨询研究图表 (#17940)
| false
|
add 艾瑞咨询研究图表 (#17940)
|
feat
|
diff --git a/lib/routes/iresearch/chart.ts b/lib/routes/iresearch/chart.ts
new file mode 100644
index 00000000000000..0dd82a878652d5
--- /dev/null
+++ b/lib/routes/iresearch/chart.ts
@@ -0,0 +1,375 @@
+import path from 'node:path';
+
+import { type CheerioAPI, load } from 'cheerio';
+import { type Context } from 'hono';
+
+import { type DataItem, type Route, type Data, ViewType } from '@/types';
+
+import { art } from '@/utils/render';
+import { getCurrentPath } from '@/utils/helpers';
+import ofetch from '@/utils/ofetch';
+import { parseDate } from '@/utils/parse-date';
+import timezone from '@/utils/timezone';
+
+const __dirname = getCurrentPath(import.meta.url);
+
+const categoryMap = {
+ 媒体文娱: 59,
+ 广告营销: 89,
+ 游戏行业: 90,
+ 视频媒体: 91,
+ 消费电商: 69,
+ 电子商务: 86,
+ 消费者洞察: 87,
+ 旅游行业: 88,
+ 汽车行业: 80,
+ 教育行业: 63,
+ 企业服务: 60,
+ 网络服务: 84,
+ 应用服务: 85,
+ AI大数据: 65,
+ 人工智能: 83,
+ 物流行业: 75,
+ 金融行业: 70,
+ 支付行业: 82,
+ 房产行业: 68,
+ 医疗健康: 62,
+ 先进制造: 61,
+ 能源环保: 77,
+ 区块链: 76,
+ 其他: 81,
+};
+
+export const handler = async (ctx: Context): Promise<Data> => {
+ const { category: categoryName } = ctx.req.param();
+ const limit: number = Number.parseInt(ctx.req.query('limit') ?? '100', 10);
+
+ const rootUrl: string = 'https://www.iresearch.com.cn';
+ const apiUrl = new URL('api/products/getdatasapi', rootUrl).href;
+
+ const category = categoryMap[categoryName] || undefined;
+
+ const targetUrl: string = new URL(`report.shtml?type=4${category ? `&classId=${category}` : ''}`, rootUrl).href;
+
+ const response = await ofetch(apiUrl, {
+ query: {
+ rootId: 14,
+ channelId: category ?? '',
+ userId: '',
+ lastId: '',
+ pageSize: limit,
+ },
+ });
+
+ const targetResponse = await ofetch(targetUrl);
+ const $: CheerioAPI = load(targetResponse);
+ const language: string = $('html').prop('lang') ?? 'zh-cn';
+
+ const items: DataItem[] = response.List.slice(0, limit).map((item) => ({
+ title: `${item.Title} - ${item.sTitle}`,
+ link: new URL(`chart/detail?id=${item.Id}`, rootUrl).href,
+ description: art(path.join(__dirname, 'templates/chart.art'), {
+ images: [
+ {
+ src: item.SmallImg,
+ alt: item.Title,
+ },
+ {
+ src: item.BigImg,
+ alt: item.sTitle,
+ },
+ ],
+ newsId: item.NewsId,
+ }),
+ author: item.Author,
+ category: [...new Set([item.sTitle, item.industry, ...item.Keyword])].filter(Boolean),
+ guid: `iresearch.${item.Id}`,
+ pubDate: timezone(parseDate(item.Uptime), +8),
+ }));
+
+ const author = $('title').text();
+
+ return {
+ title: `${author} | 研究图表${category ? ` - ${categoryName}` : ''}`,
+ description: $('meta[property="og:description"]').prop('content'),
+ link: targetUrl,
+ item: items,
+ allowEmpty: true,
+ author,
+ language,
+ id: targetUrl,
+ };
+};
+
+export const route: Route = {
+ path: '/chart/:category?',
+ name: '研究图表',
+ url: 'www.iresearch.com.cn',
+ maintainers: ['nczitzk'],
+ handler,
+ example: '/iresearch/chart',
+ parameters: {
+ category: '分类,见下表',
+ },
+ description: `
+| 媒体文娱 | 广告营销 | 游戏行业 | 视频媒体 | 消费电商 |
+| -------- | ---------- | -------- | --------- | -------- |
+| 电子商务 | 消费者洞察 | 旅游行业 | 汽车行业 | 教育行业 |
+| 企业服务 | 网络服务 | 应用服务 | AI 大数据 | 人工智能 |
+| 物流行业 | 金融行业 | 支付行业 | 房产行业 | 医疗健康 |
+| 先进制造 | 新能源 | 区块链 | 其他 | |
+`,
+ categories: ['new-media'],
+ features: {
+ requireConfig: false,
+ requirePuppeteer: false,
+ antiCrawler: false,
+ supportRadar: true,
+ supportBT: false,
+ supportPodcast: false,
+ supportScihub: false,
+ },
+ radar: [
+ {
+ title: '研究图表 - 媒体文娱',
+ source: ['https://www.iresearch.com.cn/report.shtml'],
+ target: (_, url) => {
+ const urlObj = new URL(url);
+ const isChart = urlObj.searchParams.get('type') === '4';
+
+ return isChart ? '/iresearch/chart/媒体文娱' : '';
+ },
+ },
+ {
+ title: '研究图表 - 广告营销',
+ source: ['https://www.iresearch.com.cn/report.shtml'],
+ target: (_, url) => {
+ const urlObj = new URL(url);
+ const isChart = urlObj.searchParams.get('type') === '4';
+
+ return isChart ? '/iresearch/chart/广告营销' : '';
+ },
+ },
+ {
+ title: '研究图表 - 游戏行业',
+ source: ['https://www.iresearch.com.cn/report.shtml'],
+ target: (_, url) => {
+ const urlObj = new URL(url);
+ const isChart = urlObj.searchParams.get('type') === '4';
+
+ return isChart ? '/iresearch/chart/游戏行业' : '';
+ },
+ },
+ {
+ title: '研究图表 - 视频媒体',
+ source: ['https://www.iresearch.com.cn/report.shtml'],
+ target: (_, url) => {
+ const urlObj = new URL(url);
+ const isChart = urlObj.searchParams.get('type') === '4';
+
+ return isChart ? '/iresearch/chart/视频媒体' : '';
+ },
+ },
+ {
+ title: '研究图表 - 消费电商',
+ source: ['https://www.iresearch.com.cn/report.shtml'],
+ target: (_, url) => {
+ const urlObj = new URL(url);
+ const isChart = urlObj.searchParams.get('type') === '4';
+
+ return isChart ? '/iresearch/chart/消费电商' : '';
+ },
+ },
+ {
+ title: '研究图表 - 电子商务',
+ source: ['https://www.iresearch.com.cn/report.shtml'],
+ target: (_, url) => {
+ const urlObj = new URL(url);
+ const isChart = urlObj.searchParams.get('type') === '4';
+
+ return isChart ? '/iresearch/chart/电子商务' : '';
+ },
+ },
+ {
+ title: '研究图表 - 消费者洞察',
+ source: ['https://www.iresearch.com.cn/report.shtml'],
+ target: (_, url) => {
+ const urlObj = new URL(url);
+ const isChart = urlObj.searchParams.get('type') === '4';
+
+ return isChart ? '/iresearch/chart/消费者洞察' : '';
+ },
+ },
+ {
+ title: '研究图表 - 旅游行业',
+ source: ['https://www.iresearch.com.cn/report.shtml'],
+ target: (_, url) => {
+ const urlObj = new URL(url);
+ const isChart = urlObj.searchParams.get('type') === '4';
+
+ return isChart ? '/iresearch/chart/旅游行业' : '';
+ },
+ },
+ {
+ title: '研究图表 - 汽车行业',
+ source: ['https://www.iresearch.com.cn/report.shtml'],
+ target: (_, url) => {
+ const urlObj = new URL(url);
+ const isChart = urlObj.searchParams.get('type') === '4';
+
+ return isChart ? '/iresearch/chart/汽车行业' : '';
+ },
+ },
+ {
+ title: '研究图表 - 教育行业',
+ source: ['https://www.iresearch.com.cn/report.shtml'],
+ target: (_, url) => {
+ const urlObj = new URL(url);
+ const isChart = urlObj.searchParams.get('type') === '4';
+
+ return isChart ? '/iresearch/chart/教育行业' : '';
+ },
+ },
+ {
+ title: '研究图表 - 企业服务',
+ source: ['https://www.iresearch.com.cn/report.shtml'],
+ target: (_, url) => {
+ const urlObj = new URL(url);
+ const isChart = urlObj.searchParams.get('type') === '4';
+
+ return isChart ? '/iresearch/chart/企业服务' : '';
+ },
+ },
+ {
+ title: '研究图表 - 网络服务',
+ source: ['https://www.iresearch.com.cn/report.shtml'],
+ target: (_, url) => {
+ const urlObj = new URL(url);
+ const isChart = urlObj.searchParams.get('type') === '4';
+
+ return isChart ? '/iresearch/chart/网络服务' : '';
+ },
+ },
+ {
+ title: '研究图表 - 应用服务',
+ source: ['https://www.iresearch.com.cn/report.shtml'],
+ target: (_, url) => {
+ const urlObj = new URL(url);
+ const isChart = urlObj.searchParams.get('type') === '4';
+
+ return isChart ? '/iresearch/chart/应用服务' : '';
+ },
+ },
+ {
+ title: '研究图表 - AI大数据',
+ source: ['https://www.iresearch.com.cn/report.shtml'],
+ target: (_, url) => {
+ const urlObj = new URL(url);
+ const isChart = urlObj.searchParams.get('type') === '4';
+
+ return isChart ? '/iresearch/chart/AI大数据' : '';
+ },
+ },
+ {
+ title: '研究图表 - 人工智能',
+ source: ['https://www.iresearch.com.cn/report.shtml'],
+ target: (_, url) => {
+ const urlObj = new URL(url);
+ const isChart = urlObj.searchParams.get('type') === '4';
+
+ return isChart ? '/iresearch/chart/人工智能' : '';
+ },
+ },
+ {
+ title: '研究图表 - 物流行业',
+ source: ['https://www.iresearch.com.cn/report.shtml'],
+ target: (_, url) => {
+ const urlObj = new URL(url);
+ const isChart = urlObj.searchParams.get('type') === '4';
+
+ return isChart ? '/iresearch/chart/物流行业' : '';
+ },
+ },
+ {
+ title: '研究图表 - 金融行业',
+ source: ['https://www.iresearch.com.cn/report.shtml'],
+ target: (_, url) => {
+ const urlObj = new URL(url);
+ const isChart = urlObj.searchParams.get('type') === '4';
+
+ return isChart ? '/iresearch/chart/金融行业' : '';
+ },
+ },
+ {
+ title: '研究图表 - 支付行业',
+ source: ['https://www.iresearch.com.cn/report.shtml'],
+ target: (_, url) => {
+ const urlObj = new URL(url);
+ const isChart = urlObj.searchParams.get('type') === '4';
+
+ return isChart ? '/iresearch/chart/支付行业' : '';
+ },
+ },
+ {
+ title: '研究图表 - 房产行业',
+ source: ['https://www.iresearch.com.cn/report.shtml'],
+ target: (_, url) => {
+ const urlObj = new URL(url);
+ const isChart = urlObj.searchParams.get('type') === '4';
+
+ return isChart ? '/iresearch/chart/房产行业' : '';
+ },
+ },
+ {
+ title: '研究图表 - 医疗健康',
+ source: ['https://www.iresearch.com.cn/report.shtml'],
+ target: (_, url) => {
+ const urlObj = new URL(url);
+ const isChart = urlObj.searchParams.get('type') === '4';
+
+ return isChart ? '/iresearch/chart/医疗健康' : '';
+ },
+ },
+ {
+ title: '研究图表 - 先进制造',
+ source: ['https://www.iresearch.com.cn/report.shtml'],
+ target: (_, url) => {
+ const urlObj = new URL(url);
+ const isChart = urlObj.searchParams.get('type') === '4';
+
+ return isChart ? '/iresearch/chart/先进制造' : '';
+ },
+ },
+ {
+ title: '研究图表 - 新能源',
+ source: ['https://www.iresearch.com.cn/report.shtml'],
+ target: (_, url) => {
+ const urlObj = new URL(url);
+ const isChart = urlObj.searchParams.get('type') === '4';
+
+ return isChart ? '/iresearch/chart/新能源' : '';
+ },
+ },
+ {
+ title: '研究图表 - 区块链',
+ source: ['https://www.iresearch.com.cn/report.shtml'],
+ target: (_, url) => {
+ const urlObj = new URL(url);
+ const isChart = urlObj.searchParams.get('type') === '4';
+
+ return isChart ? '/iresearch/chart/区块链' : '';
+ },
+ },
+ {
+ title: '研究图表 - 其他',
+ source: ['https://www.iresearch.com.cn/report.shtml'],
+ target: (_, url) => {
+ const urlObj = new URL(url);
+ const isChart = urlObj.searchParams.get('type') === '4';
+
+ return isChart ? '/iresearch/chart/其他' : '';
+ },
+ },
+ ],
+ view: ViewType.Articles,
+};
diff --git a/lib/routes/iresearch/templates/chart.art b/lib/routes/iresearch/templates/chart.art
new file mode 100644
index 00000000000000..fcff8356dfc6e0
--- /dev/null
+++ b/lib/routes/iresearch/templates/chart.art
@@ -0,0 +1,13 @@
+{{ if newsId }}
+ <a href="/Detail/report?id={{ newsId }}&isfree=0" target="_blank">查看报告</a>
+{{ /if }}
+
+{{ if images }}
+ {{ each images image }}
+ {{ if image?.src }}
+ <figure>
+ <img src="{{ image.src }}">
+ </figure>
+ {{ /if }}
+ {{ /each }}
+{{ /if }}
\ No newline at end of file
|
924f68d3a821a8c8658c185559cddb5e964a3f23
|
2020-12-06 23:44:27
|
Ethan Shen
|
feat: add china labour bulletin commentary and analysis (#6360)
| false
|
add china labour bulletin commentary and analysis (#6360)
|
feat
|
diff --git a/docs/en/new-media.md b/docs/en/new-media.md
index 3fb15e4017b20f..e32a195702687b 100644
--- a/docs/en/new-media.md
+++ b/docs/en/new-media.md
@@ -57,6 +57,12 @@ Compared to the official one, the RSS feed generated by RSSHub not only has more
<RouteEn author="nczitzk" example="/cgtn/top" path="/cgtn/top"/>
+## China Labour Bulletin
+
+### Commentary and Analysis
+
+<RouteEn author="nczitzk" example="/clb/commentary" path="/clb/commentary/:lang?" :paramsDesc="['Language, Simplified Chinese by default, or `en` as English']"/>
+
## DeepMind
### Blog
diff --git a/docs/new-media.md b/docs/new-media.md
index bd0a5884b16c22..156a10aa2b7b64 100644
--- a/docs/new-media.md
+++ b/docs/new-media.md
@@ -1896,3 +1896,9 @@ QueryString:
### 全文
<Route author="HenryQW" example="/zzz" path="/zzz/index"/>
+
+## 中国劳工通讯
+
+### 评论与特写
+
+<Route author="nczitzk" example="/clb/commentary" path="/clb/commentary/:lang?" :paramsDesc="['语言,默认为简体中文,可选 `en` 即英文']"/>
diff --git a/lib/router.js b/lib/router.js
index 27cb86d79da180..0ee95feba5413a 100644
--- a/lib/router.js
+++ b/lib/router.js
@@ -3518,6 +3518,9 @@ router.get('/uisdc/news', require('./routes/uisdc/news'));
router.get('/uisdc/zt/:title?', require('./routes/uisdc/zt'));
router.get('/uisdc/topic/:title?/:sort?', require('./routes/uisdc/topic'));
+// 中国劳工通讯
+router.get('/clb/commentary/:lang?', require('./routes/clb/commentary'));
+
// 国际教育研究所
router.get('/iie/blog', require('./routes/iie/blog'));
diff --git a/lib/routes/clb/commentary.js b/lib/routes/clb/commentary.js
new file mode 100644
index 00000000000000..639ff9431c92d1
--- /dev/null
+++ b/lib/routes/clb/commentary.js
@@ -0,0 +1,49 @@
+const got = require('@/utils/got');
+const cheerio = require('cheerio');
+
+module.exports = async (ctx) => {
+ const lang = ctx.params.lang || '';
+
+ const rootUrl = 'https://clb.org.hk';
+ const currentUrl = `${rootUrl}/${lang === '' ? '/zh-hans/section/%E8%AF%84%E8%AE%BA%E4%B8%8E%E7%89%B9%E5%86%99' : 'commentary-and-analysis'}`;
+ const response = await got({
+ method: 'get',
+ url: currentUrl,
+ });
+ const $ = cheerio.load(response.data);
+
+ const list = $('.field-content a')
+ .slice(0, 10)
+ .map((_, item) => {
+ item = $(item);
+ return {
+ title: item.text(),
+ link: `${rootUrl}${item.attr('href')}`,
+ };
+ })
+ .get();
+
+ const items = await Promise.all(
+ list.map(
+ async (item) =>
+ await ctx.cache.tryGet(item.link, async () => {
+ const detailResponse = await got({
+ method: 'get',
+ url: item.link,
+ });
+ const content = cheerio.load(detailResponse.data);
+
+ item.description = content('.field-name-body').html();
+ item.pubDate = new Date(content('meta[property="article:published_time"]').attr('content')).toUTCString();
+
+ return item;
+ })
+ )
+ );
+
+ ctx.state.data = {
+ title: $('title').text(),
+ link: currentUrl,
+ item: items,
+ };
+};
|
b0b7adf382574eebe1f3b36bc1c105e64e727b65
|
2024-05-10 01:17:21
|
Tony
|
fix(template): redis-backed instances always show ttl 1 (#15536)
| false
|
redis-backed instances always show ttl 1 (#15536)
|
fix
|
diff --git a/lib/middleware/template.tsx b/lib/middleware/template.tsx
index 4262b9716e4bb4..c89d02c4d7c11a 100644
--- a/lib/middleware/template.tsx
+++ b/lib/middleware/template.tsx
@@ -4,14 +4,14 @@ import { collapseWhitespace, convertDateToISO8601 } from '@/utils/common-utils';
import type { MiddlewareHandler } from 'hono';
import { Data } from '@/types';
-// Set RSS <ttl> (minute) according to the availability of cache
-// * available: max(config.cache.routeExpire / 60, 1)
-// * unavailable: 1
-// The minimum <ttl> is limited to 1 minute to prevent potential misuse
import cacheModule from '@/utils/cache/index';
-const ttl = (cacheModule.status.available && Math.trunc(config.cache.routeExpire / 60)) || 1;
const middleware: MiddlewareHandler = async (ctx, next) => {
+ // Set RSS <ttl> (minute) according to the availability of cache
+ // * available: max(config.cache.routeExpire / 60, 1)
+ // * unavailable: 1
+ // The minimum <ttl> is limited to 1 minute to prevent potential misuse
+ const ttl = (cacheModule.status.available && Math.trunc(config.cache.routeExpire / 60)) || 1;
await next();
const data: Data = ctx.get('data');
|
310515b969fb0f0f4e9d6ddeff42eab2292e75b7
|
2024-12-02 04:58:51
|
Ethan Shen
|
feat(route): add 趣集盐选故事 (#17761)
| false
|
add 趣集盐选故事 (#17761)
|
feat
|
diff --git a/lib/routes/ifun/n/category.ts b/lib/routes/ifun/n/category.ts
new file mode 100644
index 00000000000000..b7f78de1fabeaa
--- /dev/null
+++ b/lib/routes/ifun/n/category.ts
@@ -0,0 +1,102 @@
+import { type Context } from 'hono';
+
+import { type DataItem, type Route, type Data, ViewType } from '@/types';
+
+import ofetch from '@/utils/ofetch';
+
+import { author, language, rootUrl, processItems } from './util';
+
+export const handler = async (ctx: Context): Promise<Data> => {
+ const { id } = ctx.req.param();
+ const limit: number = Number.parseInt(ctx.req.query('limit') ?? '30', 10);
+
+ const targetUrl: string = rootUrl;
+ const apiUrl: string = new URL(`api/articles/${id ? 'categoryId' : 'all'}`, rootUrl).href;
+ const apiCategoryUrl: string = new URL('api/categories/all', rootUrl).href;
+
+ const apiResponse = await ofetch(apiUrl, {
+ query: {
+ datasrc: id ? 'categoriesall' : 'articles',
+ current: 1,
+ size: limit,
+ categoryId: id,
+ },
+ });
+
+ const apiCategoryResponse = await ofetch(apiCategoryUrl, {
+ query: {
+ datasrc: 'categories',
+ },
+ });
+
+ const categoryName: string = apiCategoryResponse.data.find((item) => item.categoryid === id)?.category;
+
+ const items: DataItem[] = processItems(apiResponse.data.records, limit);
+
+ return {
+ title: `${author}${categoryName ? ` - ${categoryName}` : ''}`,
+ description: categoryName,
+ link: targetUrl,
+ item: items,
+ allowEmpty: true,
+ author,
+ language,
+ };
+};
+
+export const route: Route = {
+ path: '/n/category/:id?',
+ name: '盐选故事分类',
+ url: 'n.ifun.cool',
+ maintainers: ['nczitzk'],
+ handler,
+ example: '/ifun/n/category',
+ parameters: {
+ id: '分类 id,默认为空,即全部,见下表',
+ },
+ description: `
+| 名称 | ID |
+| -------- | --- |
+| 全部 | |
+| 通告 | 1 |
+| 故事盐选 | 2 |
+| 趣集精选 | 3 |
+ `,
+ categories: ['new-media'],
+ features: {
+ requireConfig: false,
+ requirePuppeteer: false,
+ antiCrawler: false,
+ supportRadar: true,
+ supportBT: false,
+ supportPodcast: false,
+ supportScihub: false,
+ },
+ radar: [
+ {
+ source: ['n.ifun.cool'],
+ target: '/n/category/:id?',
+ },
+ {
+ title: '全部',
+ source: ['n.ifun.cool'],
+ target: '/n/category',
+ },
+ {
+ title: '通告',
+ source: ['n.ifun.cool'],
+ target: '/n/category/1',
+ },
+ {
+ title: '盐选故事',
+ source: ['n.ifun.cool'],
+ target: '/n/category/2',
+ },
+ {
+ title: '趣集精选',
+ source: ['n.ifun.cool'],
+ target: '/n/category/3',
+ },
+ ],
+ view: ViewType.Articles,
+};
diff --git a/lib/routes/ifun/n/search.ts b/lib/routes/ifun/n/search.ts
new file mode 100644
index 00000000000000..035855c2aa8a6d
--- /dev/null
+++ b/lib/routes/ifun/n/search.ts
@@ -0,0 +1,73 @@
+import { type Context } from 'hono';
+
+import { type DataItem, type Route, type Data, ViewType } from '@/types';
+
+import ofetch from '@/utils/ofetch';
+
+import { author, language, rootUrl, processItems } from './util';
+
+export const handler = async (ctx: Context): Promise<Data> => {
+ const { keywords } = ctx.req.param();
+ const limit: number = Number.parseInt(ctx.req.query('limit') ?? '30', 10);
+
+ const targetUrl: string = new URL(`search-result/?s=${keywords}`, rootUrl).href;
+ const apiUrl: string = new URL('api/articles/searchkeywords', rootUrl).href;
+
+ const apiResponse = await ofetch(apiUrl, {
+ query: {
+ keywords,
+ current: 1,
+ size: limit,
+ },
+ });
+
+ const items: DataItem[] = processItems(apiResponse.data.records, limit);
+
+ return {
+ title: `${author} - ${keywords}`,
+ description: keywords,
+ link: targetUrl,
+ item: items,
+ allowEmpty: true,
+ author,
+ language,
+ };
+};
+
+export const route: Route = {
+ path: '/n/search/:keywords',
+ name: '盐选故事搜索',
+ url: 'n.ifun.cool',
+ maintainers: ['nczitzk'],
+ handler,
+ example: '/ifun/n/search/NPC',
+ parameters: {
+ keywords: '搜索关键字',
+ },
+ description: `:::tip
+若订阅 [关键词:NPC](https://n.ifun.cool/search-result/?s=NPC),网址为 \`https://n.ifun.cool/search-result/?s=NPC\`,请截取 \`s\` 的值 \`NPC\` 作为 \`keywords\` 参数填入,此时目标路由为 [\`/ifun/n/search/NPC\`](https://rsshub.app/ifun/n/search/NPC)。
+:::
+ `,
+ categories: ['new-media'],
+ features: {
+ requireConfig: false,
+ requirePuppeteer: false,
+ antiCrawler: false,
+ supportRadar: true,
+ supportBT: false,
+ supportPodcast: false,
+ supportScihub: false,
+ },
+ radar: [
+ {
+ source: ['n.ifun.cool/search-result'],
+ target: (_, url) => {
+ const urlObj = new URL(url);
+ const keywords = urlObj.searchParams.get('s');
+
+ return `/ifun/n/search/${keywords}`;
+ },
+ },
+ ],
+ view: ViewType.Articles,
+};
diff --git a/lib/routes/ifun/n/tag.ts b/lib/routes/ifun/n/tag.ts
new file mode 100644
index 00000000000000..122cc34ce21d4f
--- /dev/null
+++ b/lib/routes/ifun/n/tag.ts
@@ -0,0 +1,76 @@
+import { type Context } from 'hono';
+
+import { type DataItem, type Route, type Data, ViewType } from '@/types';
+
+import ofetch from '@/utils/ofetch';
+
+import { author, language, rootUrl, processItems } from './util';
+
+export const handler = async (ctx: Context): Promise<Data> => {
+ const { name } = ctx.req.param();
+ const limit: number = Number.parseInt(ctx.req.query('limit') ?? '30', 10);
+
+ const targetUrl: string = new URL(`article-list/1?tagName=${name}`, rootUrl).href;
+ const apiUrl: string = new URL('api/articles/tagId', rootUrl).href;
+
+ const apiResponse = await ofetch(apiUrl, {
+ query: {
+ datasrc: 'tagid',
+ tagname: name,
+ current: 1,
+ size: limit,
+ },
+ });
+
+ const items: DataItem[] = processItems(apiResponse.data.records, limit);
+
+ return {
+ title: `${author} - ${name}`,
+ description: name,
+ link: targetUrl,
+ item: items,
+ allowEmpty: true,
+ author,
+ language,
+ };
+};
+
+export const route: Route = {
+ path: '/n/tag/:name',
+ name: '盐选故事专栏',
+ url: 'n.ifun.cool',
+ maintainers: ['nczitzk'],
+ handler,
+ example: '/ifun/n/tag/zhihu',
+ parameters: {
+ name: '专栏 id,可在对应专栏页 URL 中找到',
+ },
+ description: `:::tip
+若订阅 [zhihu](https://n.ifun.cool/article-list/2?tagName=zhihu),网址为 \`https://n.ifun.cool/article-list/2?tagName=zhihu\`,请截取 \`tagName\` 的值 \`zhihu\` 作为 \`name\` 参数填入,此时目标路由为 [\`/ifun/n/tag/zhihu\`](https://rsshub.app/ifun/n/tag/zhihu)。
+
+更多专栏请见 [盐选故事专栏](https://n.ifun.cool/tags)。
+:::
+ `,
+ categories: ['new-media'],
+ features: {
+ requireConfig: false,
+ requirePuppeteer: false,
+ antiCrawler: false,
+ supportRadar: true,
+ supportBT: false,
+ supportPodcast: false,
+ supportScihub: false,
+ },
+ radar: [
+ {
+ source: ['n.ifun.cool/article-list/1'],
+ target: (_, url) => {
+ const urlObj = new URL(url);
+ const name = urlObj.searchParams.get('tagName');
+
+ return `/ifun/n/tag/${name}`;
+ },
+ },
+ ],
+ view: ViewType.Articles,
+};
diff --git a/lib/routes/ifun/n/util.ts b/lib/routes/ifun/n/util.ts
new file mode 100644
index 00000000000000..5f1bfa14d85913
--- /dev/null
+++ b/lib/routes/ifun/n/util.ts
@@ -0,0 +1,34 @@
+import { type DataItem } from '@/types';
+
+import { parseDate } from '@/utils/parse-date';
+
+const author: string = '趣集';
+const language: string = 'zh-CN';
+const rootUrl: string = 'https://n.ifun.cool';
+
+const processItems: (items: any[], limit: number) => DataItem[] = (items: any[], limit: number) =>
+ items.slice(0, limit).map((item): DataItem => {
+ const title: string = item.title;
+ const description: string = item.content;
+ const guid: string = `ifun-n-${item.id}`;
+
+ const author: DataItem['author'] = item.author;
+
+ return {
+ title,
+ description,
+ pubDate: parseDate(item.createtime),
+ link: item.id ? new URL(`articles/${item.id}`, rootUrl).href : undefined,
+ category: [...new Set([item.category, item.tag].filter(Boolean))],
+ author,
+ guid,
+ id: guid,
+ content: {
+ html: description,
+ text: description,
+ },
+ language,
+ };
+ });
+
+export { author, language, rootUrl, processItems };
diff --git a/lib/routes/ifun/namespace.ts b/lib/routes/ifun/namespace.ts
new file mode 100644
index 00000000000000..2fa5dca071e641
--- /dev/null
+++ b/lib/routes/ifun/namespace.ts
@@ -0,0 +1,9 @@
+import type { Namespace } from '@/types';
+
+export const namespace: Namespace = {
+ name: '趣集',
+ url: 'ifun.cool',
+ categories: ['new-media'],
+ description: '全面的找书、学习资源导航平台,它整合了电子书和科研文档的搜索功能,方便用户进行学习资料的检索和分享,为用户提供一站式的读书学习体验。',
+ lang: 'zh-CN',
+};
|
cda1aa0fbf4092b23957243694cf659a29398c68
|
2024-04-24 03:57:27
|
dependabot[bot]
|
chore(deps): bump undici from 6.14.0 to 6.14.1 (#15353)
| false
|
bump undici from 6.14.0 to 6.14.1 (#15353)
|
chore
|
diff --git a/package.json b/package.json
index e201f37f1da2a7..baf6f1aa01a7ba 100644
--- a/package.json
+++ b/package.json
@@ -117,7 +117,7 @@
"tough-cookie": "4.1.3",
"tsx": "4.7.2",
"twitter-api-v2": "1.16.3",
- "undici": "6.14.0",
+ "undici": "6.14.1",
"uuid": "9.0.1",
"winston": "3.13.0",
"xxhash-wasm": "1.0.2",
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 191c40e59e1f5d..30ed121ba500e1 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -207,8 +207,8 @@ dependencies:
specifier: 1.16.3
version: 1.16.3
undici:
- specifier: 6.14.0
- version: 6.14.0
+ specifier: 6.14.1
+ version: 6.14.1
uuid:
specifier: 9.0.1
version: 9.0.1
@@ -9368,8 +9368,8 @@ packages:
/[email protected]:
resolution: {integrity: sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==}
- /[email protected]:
- resolution: {integrity: sha512-esJ/x2QU5boTG6thdA0o4qP3cv/oPx9mcQGcp8TAHI+ZBTa0EvM9Jiyp0ILdPGLGxs5HATTKrJqAK+YhrSFicg==}
+ /[email protected]:
+ resolution: {integrity: sha512-mAel3i4BsYhkeVPXeIPXVGPJKeBzqCieZYoFsbWfUzd68JmHByhc1Plit5WlylxXFaGpgkZB8mExlxnt+Q1p7A==}
engines: {node: '>=18.17'}
dev: false
|
a62667f07fb6153ec007149c3165bd70a380bb4e
|
2024-07-29 18:35:16
|
CaoMeiYouRen
|
feat(route): 新增 掘金用户动态 路由 (#16276)
| false
|
新增 掘金用户动态 路由 (#16276)
|
feat
|
diff --git a/lib/routes/juejin/dynamic.ts b/lib/routes/juejin/dynamic.ts
new file mode 100644
index 00000000000000..6c7bf26c0ce999
--- /dev/null
+++ b/lib/routes/juejin/dynamic.ts
@@ -0,0 +1,114 @@
+import { Route } from '@/types';
+import got from '@/utils/got';
+import { parseDate } from '@/utils/parse-date';
+
+export const route: Route = {
+ path: '/dynamic/:id',
+ categories: ['programming'],
+ example: '/juejin/dynamic/3051900006845944',
+ parameters: { id: '用户 id, 可在用户页 URL 中找到' },
+ features: {
+ requireConfig: false,
+ requirePuppeteer: false,
+ antiCrawler: false,
+ supportBT: false,
+ supportPodcast: false,
+ supportScihub: false,
+ },
+ radar: [
+ {
+ source: ['juejin.cn/user/:id'],
+ },
+ ],
+ name: '用户动态',
+ maintainers: ['CaoMeiYouRen'],
+ handler,
+};
+
+async function handler(ctx) {
+ const id = ctx.req.param('id');
+
+ const response = await got({
+ method: 'get',
+ url: 'https://api.juejin.cn/user_api/v1/user/dynamic',
+ searchParams: {
+ user_id: id,
+ cursor: 0,
+ },
+ });
+ const list = response.data.data.list;
+
+ const username = list[0].user.user_name;
+
+ const items = list.map((e) => {
+ const { target_type, target_data, action, time } = e; // action: 0.发布文章;1.点赞文章;2.发布沸点;3.点赞沸点;4.关注用户
+ let title: string | undefined;
+ let description: string | undefined;
+ let pubDate: Date | undefined;
+ let author: string | undefined;
+ let link: string | undefined;
+ let category: string[] | undefined;
+ switch (target_type) {
+ case 'short_msg': {
+ // 沸点/点赞等
+ const { msg_Info, author_user_info, msg_id, topic } = target_data;
+ const { content, pic_list, ctime } = msg_Info;
+ title = content;
+ const imgs = pic_list.map((img) => `<img src="${img}"><br>`).join('');
+ description = `${content.replaceAll('\n', '<br>')}<br>${imgs}`;
+ pubDate = parseDate(Number(ctime) * 1000);
+ author = author_user_info.user_name;
+ link = `https://juejin.cn/pin/${msg_id}`;
+ category = topic.title;
+ if (action === 3) {
+ title = `${username} 赞了这篇沸点//@${author}:${title}`;
+ description = `${username} 赞了这篇沸点//@${author}:${description}`;
+ }
+ break;
+ }
+ case 'article': {
+ // 文章
+ const { article_id, article_info, author_user_info, tags } = target_data;
+ const { ctime, brief_content } = article_info;
+ title = article_info.title;
+ description = brief_content;
+ pubDate = parseDate(Number(ctime) * 1000);
+ author = author_user_info.user_name;
+ link = `https://juejin.cn/post/${article_id}`;
+ category = [...new Set([target_data.category.category_name, ...tags.map((t) => t.tag_name)])];
+ if (action === 1) {
+ title = `${username} 赞了这篇文章//@${author}:${title}`;
+ }
+ break;
+ }
+ case 'user': {
+ // 关注用户
+ const { user_name, user_id } = target_data;
+ title = `${username} 关注了 ${user_name}`;
+ description = `${user_name}<br>简介:${target_data.description}`;
+ author = user_name;
+ link = `https://juejin.cn/user/${user_id}`;
+ pubDate = parseDate(time * 1000);
+ break;
+ }
+ default:
+ break;
+ }
+ return {
+ title,
+ description,
+ pubDate,
+ author,
+ link,
+ category,
+ guid: link,
+ };
+ });
+ return {
+ title: `掘金用户动态-${username}`,
+ link: `https://juejin.cn/user/${id}/`,
+ description: `掘金用户动态-${username}`,
+ item: items,
+ author: username,
+ };
+}
|
65754737c6d691bdd49b9ec9ca1fd6c5fb36db8b
|
2025-03-10 00:09:03
|
Ethan Shen
|
feat(route): add 证券时报网 (#18551)
| false
|
add 证券时报网 (#18551)
|
feat
|
diff --git a/lib/routes/stcn/index.ts b/lib/routes/stcn/index.ts
index ab80116a59fad9..86c058bf07f36e 100644
--- a/lib/routes/stcn/index.ts
+++ b/lib/routes/stcn/index.ts
@@ -1,159 +1,264 @@
-import { Route, ViewType } from '@/types';
+import { type Data, type DataItem, type Route, ViewType } from '@/types';
+
import cache from '@/utils/cache';
-import got from '@/utils/got';
-import { load } from 'cheerio';
-import timezone from '@/utils/timezone';
+import ofetch from '@/utils/ofetch';
import { parseDate } from '@/utils/parse-date';
+import timezone from '@/utils/timezone';
-export const route: Route = {
- path: '/:id?',
- categories: ['finance', 'popular'],
- view: ViewType.Articles,
- example: '/stcn/yw',
- parameters: {
- id: {
- description: '栏目 id',
- options: [
- { value: 'kx', label: '快讯' },
- { value: 'yw', label: '要闻' },
- { value: 'gs', label: '股市' },
- { value: 'company', label: '公司' },
- { value: 'data', label: '数据' },
- { value: 'fund', label: '基金' },
- { value: 'finance', label: '金融' },
- { value: 'comment', label: '评论' },
- { value: 'cj', label: '产经' },
- { value: 'ct', label: '创投' },
- { value: 'kcb', label: '科创板' },
- { value: 'xsb', label: '新三板' },
- { value: 'tj', label: '投教' },
- { value: 'zk', label: 'ESG' },
- { value: 'gd', label: '滚动' },
- { value: 'gsyl', label: '股市一览' },
- { value: 'djjd', label: '独家解读' },
- { value: 'gsxw', label: '公司新闻' },
- { value: 'gsdt', label: '公司动态' },
- { value: 'djsj', label: '独家数据' },
- { value: 'kd', label: '看点数据' },
- { value: 'zj', label: '资金流向' },
- { value: 'sj_kcb', label: '科创板' },
- { value: 'hq', label: '行情总貌' },
- { value: 'zl', label: '专栏' },
- { value: 'author', label: '作者' },
- { value: 'cjhy', label: '行业' },
- { value: 'cjqc', label: '汽车' },
- { value: 'tjkt', label: '投教课堂' },
- { value: 'zczs', label: '政策知识' },
- { value: 'tjdt', label: '投教动态' },
- { value: 'zthd', label: '专题活动' },
- ],
- default: 'yw',
- },
- },
- features: {
- requireConfig: false,
- requirePuppeteer: false,
- antiCrawler: false,
- supportBT: false,
- supportPodcast: false,
- supportScihub: false,
- },
- name: '栏目',
- maintainers: ['nczitzk'],
- handler,
- description: `| 快讯 | 要闻 | 股市 | 公司 | 数据 |
-| ---- | ---- | ---- | ------- | ---- |
-| kx | yw | gs | company | data |
-
-| 基金 | 金融 | 评论 | 产经 | 创投 |
-| ---- | ------- | ------- | ---- | ---- |
-| fund | finance | comment | cj | ct |
-
-| 科创板 | 新三板 | 投教 | ESG | 滚动 |
-| ------ | ------ | ---- | --- | ---- |
-| kcb | xsb | tj | zk | gd |
-
-| 股市一览 | 独家解读 |
-| -------- | -------- |
-| gsyl | djjd |
+import { type CheerioAPI, type Cheerio, type Element, load } from 'cheerio';
+import { type Context } from 'hono';
-| 公司新闻 | 公司动态 |
-| -------- | -------- |
-| gsxw | gsdt |
+export const handler = async (ctx: Context): Promise<Data> => {
+ const { id = 'yw' } = ctx.req.param();
+ const limit: number = Number.parseInt(ctx.req.query('limit') ?? '30', 10);
-| 独家数据 | 看点数据 | 资金流向 | 科创板 | 行情总貌 |
-| -------- | -------- | -------- | ------- | -------- |
-| djsj | kd | zj | sj\_kcb | hq |
+ const baseUrl: string = 'https://www.stcn.com';
+ const targetUrl: string = new URL(`article/list/${id}.html`, baseUrl).href;
-| 专栏 | 作者 |
-| ---- | ------ |
-| zl | author |
+ const response = await ofetch(targetUrl);
+ const $: CheerioAPI = load(response);
+ const language = $('html').attr('lang') ?? 'zh-CN';
-| 行业 | 汽车 |
-| ---- | ---- |
-| cjhy | cjqc |
+ let items: DataItem[] = [];
-| 投教课堂 | 政策知识 | 投教动态 | 专题活动 |
-| -------- | -------- | -------- | -------- |
-| tjkt | zczs | tjdt | zthd |`,
-};
+ items = $('ul.infinite-list li')
+ .slice(0, limit)
+ .toArray()
+ .map((el): Element => {
+ const $el: Cheerio<Element> = $(el);
-async function handler(ctx) {
- const id = ctx.req.param('id') ?? 'yw';
+ const $aEl: Cheerio<Element> = $el.find('div.tt a');
- const rootUrl = 'https://www.stcn.com';
- const currentUrl = `${rootUrl}/article/list/${id}.html`;
- const apiUrl = `${rootUrl}/article/list.html?type=${id}`;
+ const title: string = $aEl.text();
+ const description: string = $el.find('div.text').html();
+ const pubDateStr: string | undefined = $el.find('div.info span').last().text().trim();
+ const linkUrl: string | undefined = $aEl.attr('href');
+ const categoryEls: Element[] = $el.find('div.tags span').toArray();
+ const categories: string[] = [...new Set(categoryEls.map((el) => $(el).text()).filter(Boolean))];
+ const authors: DataItem['author'] = $el.find('div.info span').first().text();
+ const image: string | undefined = $el.find('div.side a img').attr('src');
+ const upDatedStr: string | undefined = pubDateStr;
- const response = await got({
- method: 'get',
- url: apiUrl,
- });
+ const processedItem: DataItem = {
+ title,
+ description,
+ pubDate: pubDateStr ? timezone(parseDate(pubDateStr, ['HH:mm', 'MM-DD HH:mm', 'YYYY-MM-DD HH:mm']), +8) : undefined,
+ link: linkUrl ? new URL(linkUrl, baseUrl).href : undefined,
+ category: categories,
+ author: authors,
+ content: {
+ html: description,
+ text: description,
+ },
+ image,
+ banner: image,
+ updated: upDatedStr ? timezone(parseDate(upDatedStr, ['HH:mm', 'MM-DD HH:mm', 'YYYY-MM-DD HH:mm']), +8) : undefined,
+ language,
+ };
- const $ = load(response.data);
+ return processedItem;
+ });
- let items = $('.t, .tt, .title')
- .find('a')
- .toArray()
- .map((item) => {
- item = $(item);
+ items = (
+ await Promise.all(
+ items.map((item) => {
+ if (!item.link) {
+ return item;
+ }
- const link = item.attr('href');
+ return cache.tryGet(item.link, async (): Promise<DataItem> => {
+ const detailResponse = await ofetch(item.link);
+ const $$: CheerioAPI = load(detailResponse);
- return {
- title: item.text().replaceAll(/(^【|】$)/g, ''),
- link: link.startsWith('http') ? link : `${rootUrl}${link}`,
- };
- });
+ const title: string = $$('div.detail-title').text();
+ const description: string = $$('div.detail-content').html() ?? '';
+ const pubDateStr: string | undefined = $$('div.detail-info span').last().text().trim();
+ const categories: string[] = $$('meta[name="keywords"]').attr('content')?.split(/,/) ?? [];
+ const authors: DataItem['author'] = $$('div.detail-info span').first().text().split(/:/).pop();
+ const upDatedStr: string | undefined = pubDateStr;
- items = await Promise.all(
- items.map((item) =>
- cache.tryGet(item.link, async () => {
- if (/\.html$/.test(item.link)) {
- const detailResponse = await got({
- method: 'get',
- url: item.link,
- });
-
- const content = load(detailResponse.data);
-
- item.title = content('.detail-title').text();
- item.author = content('.detail-info span').first().text().split(':').pop();
- item.pubDate = timezone(parseDate(content('.detail-info span').last().text()), +8);
- item.category = content('.detail-content-tags div')
- .toArray()
- .map((t) => content(t).text());
- item.description = content('.detail-content').html();
- }
+ const processedItem: DataItem = {
+ title,
+ description,
+ pubDate: pubDateStr ? timezone(parseDate(pubDateStr), +8) : item.pubDate,
+ category: categories,
+ author: authors,
+ content: {
+ html: description,
+ text: description,
+ },
+ updated: upDatedStr ? timezone(parseDate(upDatedStr), +8) : item.updated,
+ language,
+ };
- return item;
+ return {
+ ...item,
+ ...processedItem,
+ };
+ });
})
)
- );
+ ).filter((_): _ is DataItem => true);
return {
- title: `证券时报网 - ${$('.breadcrumb a').last().text()}`,
- link: currentUrl,
+ title: $('title').text(),
+ description: $('meta[name="description"]').attr('content'),
+ link: targetUrl,
item: items,
+ allowEmpty: true,
+ image: $('img.stcn-logo').attr('src'),
+ author: $('meta[name="keywords"]').attr('content')?.split(/,/)[0],
+ language,
+ id: targetUrl,
};
-}
+};
+
+export const route: Route = {
+ path: '/article/list/:id?',
+ name: '列表',
+ url: 'www.stcn.com',
+ maintainers: ['nczitzk'],
+ handler,
+ example: '/stcn/article/list/yw',
+ parameters: {
+ category: {
+ description: '分类,默认为 `yw`,即要闻,可在对应分类页 URL 中找到',
+ options: [
+ {
+ label: '要闻',
+ value: 'yw',
+ },
+ {
+ label: '股市',
+ value: 'gs',
+ },
+ {
+ label: '公司',
+ value: 'company',
+ },
+ {
+ label: '基金',
+ value: 'fund',
+ },
+ {
+ label: '金融',
+ value: 'finance',
+ },
+ {
+ label: '评论',
+ value: 'comment',
+ },
+ {
+ label: '产经',
+ value: 'cj',
+ },
+ {
+ label: '科创板',
+ value: 'kcb',
+ },
+ {
+ label: '新三板',
+ value: 'xsb',
+ },
+ {
+ label: 'ESG',
+ value: 'zk',
+ },
+ {
+ label: '滚动',
+ value: 'gd',
+ },
+ ],
+ },
+ },
+ description: `:::tip
+若订阅 [要闻](https://www.stcn.com/article/list/yw.html),网址为 \`https://www.stcn.com/article/list/yw.html\`,请截取 \`https://www.stcn.com/article/list/\` 到末尾 \`.html\` 的部分 \`yw\` 作为 \`id\` 参数填入,此时目标路由为 [\`/stcn/article/list/yw\`](https://rsshub.app/stcn/article/list/yw)。
+
+:::
+
+| 要闻 | 股市 | 公司 | 基金 | 金融 | 评论 |
+| ---- | ---- | ------- | ---- | ------- | ------- |
+| yw | gs | company | fund | finance | comment |
+
+| 产经 | 科创板 | 新三板 | ESG | 滚动 |
+| ---- | ------ | ------ | --- | ---- |
+| cj | kcb | xsb | zk | gd |
+`,
+ categories: ['finance'],
+ features: {
+ requireConfig: false,
+ requirePuppeteer: false,
+ antiCrawler: false,
+ supportRadar: true,
+ supportBT: false,
+ supportPodcast: false,
+ supportScihub: false,
+ },
+ radar: [
+ {
+ source: ['www.stcn.com/article/list.html', 'www.stcn.com/article/list/:id'],
+ target: (params, url) => {
+ const urlObj: URL = new URL(url);
+ const id: string | undefined = urlObj.searchParams.get('type') ?? params.id;
+
+ return `/stcn/article/list${id ? `/${id}` : ''}`;
+ },
+ },
+ {
+ title: '要闻',
+ source: ['www.stcn.com/article/list.html', 'www.stcn.com/article/list/yw.html'],
+ target: '/article/list/yw',
+ },
+ {
+ title: '股市',
+ source: ['www.stcn.com/article/list.html', 'www.stcn.com/article/list/gs.html'],
+ target: '/article/list/gs',
+ },
+ {
+ title: '公司',
+ source: ['www.stcn.com/article/list.html', 'www.stcn.com/article/list/company.html'],
+ target: '/article/list/company',
+ },
+ {
+ title: '基金',
+ source: ['www.stcn.com/article/list.html', 'www.stcn.com/article/list/fund.html'],
+ target: '/article/list/fund',
+ },
+ {
+ title: '金融',
+ source: ['www.stcn.com/article/list.html', 'www.stcn.com/article/list/finance.html'],
+ target: '/article/list/finance',
+ },
+ {
+ title: '评论',
+ source: ['www.stcn.com/article/list.html', 'www.stcn.com/article/list/comment.html'],
+ target: '/article/list/comment',
+ },
+ {
+ title: '产经',
+ source: ['www.stcn.com/article/list.html', 'www.stcn.com/article/list/cj.html'],
+ target: '/article/list/cj',
+ },
+ {
+ title: '科创板',
+ source: ['www.stcn.com/article/list.html', 'www.stcn.com/article/list/kcb.html'],
+ target: '/article/list/kcb',
+ },
+ {
+ title: '新三板',
+ source: ['www.stcn.com/article/list.html', 'www.stcn.com/article/list/xsb.html'],
+ target: '/article/list/xsb',
+ },
+ {
+ title: 'ESG',
+ source: ['www.stcn.com/article/list.html', 'www.stcn.com/article/list/zk.html'],
+ target: '/article/list/zk',
+ },
+ {
+ title: '滚动',
+ source: ['www.stcn.com/article/list.html', 'www.stcn.com/article/list/gd.html'],
+ target: '/article/list/gd',
+ },
+ ],
+ view: ViewType.Articles,
+};
diff --git a/lib/routes/stcn/kx.ts b/lib/routes/stcn/kx.ts
new file mode 100644
index 00000000000000..2697e4a632db63
--- /dev/null
+++ b/lib/routes/stcn/kx.ts
@@ -0,0 +1,144 @@
+import { type Data, type DataItem, type Route, ViewType } from '@/types';
+
+import cache from '@/utils/cache';
+import ofetch from '@/utils/ofetch';
+import { parseDate } from '@/utils/parse-date';
+import timezone from '@/utils/timezone';
+
+import { type CheerioAPI, load } from 'cheerio';
+import { type Context } from 'hono';
+
+export const handler = async (ctx: Context): Promise<Data> => {
+ const limit: number = Number.parseInt(ctx.req.query('limit') ?? '30', 10);
+
+ const baseUrl: string = 'https://www.stcn.com';
+ const targetUrl: string = new URL('article/list/kx.html', baseUrl).href;
+ const apiUrl: string = new URL('article/list.html', baseUrl).href;
+
+ const targetResponse = await ofetch(targetUrl);
+
+ const response = await ofetch(apiUrl, {
+ headers: {
+ 'x-requested-with': 'XMLHttpRequest',
+ },
+ query: {
+ type: 'kx',
+ },
+ });
+
+ const $: CheerioAPI = load(targetResponse);
+ const language = $('html').attr('lang') ?? 'zh-CN';
+
+ let items: DataItem[] = [];
+
+ items = response.data.slice(0, limit).map((item): DataItem => {
+ const title: string = item.title;
+ const description: string = item.content;
+ const pubDate: number | string = item.time;
+ const linkUrl: string | undefined = item.url;
+ const categories: string[] = item.tags ? item.tags.map((c) => c.name) : [];
+ const authors: DataItem['author'] = item.source;
+ const image: string | undefined = item.share?.image;
+ const updated: number | string = pubDate;
+
+ const processedItem: DataItem = {
+ title,
+ description,
+ pubDate: pubDate ? parseDate(pubDate, 'X') : undefined,
+ link: linkUrl ? new URL(linkUrl, baseUrl).href : undefined,
+ category: categories,
+ author: authors,
+ content: {
+ html: description,
+ text: item.content ?? description,
+ },
+ image,
+ banner: image,
+ updated: updated ? parseDate(updated, 'X') : undefined,
+ language,
+ };
+
+ return processedItem;
+ });
+
+ items = (
+ await Promise.all(
+ items.map((item) => {
+ if (!item.link) {
+ return item;
+ }
+
+ return cache.tryGet(item.link, async (): Promise<DataItem> => {
+ const detailResponse = await ofetch(item.link);
+ const $$: CheerioAPI = load(detailResponse);
+
+ const title: string = $$('div.detail-title').text();
+ const description: string = $$('div.detail-content').html() ?? '';
+ const pubDateStr: string | undefined = $$('div.detail-info span').last().text().trim();
+ const categories: string[] = [...new Set([...(item.category as string[]), ...($$('meta[name="keywords"]').attr('content')?.split(/,/) ?? [])])];
+ const authors: DataItem['author'] = $$('div.detail-info span').first().text().split(/:/).pop();
+ const upDatedStr: string | undefined = pubDateStr;
+
+ const processedItem: DataItem = {
+ title,
+ description,
+ pubDate: pubDateStr ? timezone(parseDate(pubDateStr), +8) : item.pubDate,
+ category: categories,
+ author: authors,
+ content: {
+ html: description,
+ text: description,
+ },
+ updated: upDatedStr ? timezone(parseDate(upDatedStr), +8) : item.updated,
+ language,
+ };
+
+ return {
+ ...item,
+ ...processedItem,
+ };
+ });
+ })
+ )
+ ).filter((_): _ is DataItem => true);
+
+ return {
+ title: $('title').text(),
+ description: $('meta[name="description"]').attr('content'),
+ link: targetUrl,
+ item: items,
+ allowEmpty: true,
+ image: $('img.stcn-logo').attr('src'),
+ author: $('meta[name="keywords"]').attr('content')?.split(/,/)[0],
+ language,
+ id: targetUrl,
+ };
+};
+
+export const route: Route = {
+ path: '/article/list/kx',
+ name: '快讯',
+ url: 'www.stcn.com',
+ maintainers: ['nczitzk'],
+ handler,
+ example: '/stcn/article/list/kx',
+ parameters: undefined,
+ description: undefined,
+ categories: ['finance'],
+ features: {
+ requireConfig: false,
+ requirePuppeteer: false,
+ antiCrawler: false,
+ supportRadar: true,
+ supportBT: false,
+ supportPodcast: false,
+ supportScihub: false,
+ },
+ radar: [
+ {
+ source: ['www.stcn.com/article/list/kx.html'],
+ target: '/article/list/kx',
+ },
+ ],
+ view: ViewType.Articles,
+};
|
21dbeba12fbaeae91dfded523eefb02742383284
|
2022-03-28 20:46:17
|
Fatpandac
|
feat(route): 华硕 固件 (#9403)
| false
|
华硕 固件 (#9403)
|
feat
|
diff --git a/docs/program-update.md b/docs/program-update.md
index 3be81420650643..3423f36b2e1bab 100644
--- a/docs/program-update.md
+++ b/docs/program-update.md
@@ -502,6 +502,12 @@ pageClass: routes
见 [#怪物猎人世界](/game.html#guai-wu-lie-ren-shi-jie)
+## 华硕
+
+### 固件
+
+<Route author="Fatpandac" example="/asus/bios/RT-AX88U" path="/asus/bios/:model" :paramsDesc="['产品型号,可在产品页面找到']"/>
+
## 蒲公英应用分发
### app 更新
diff --git a/lib/v2/asus/bios.js b/lib/v2/asus/bios.js
new file mode 100644
index 00000000000000..bb343e55184163
--- /dev/null
+++ b/lib/v2/asus/bios.js
@@ -0,0 +1,38 @@
+const got = require('@/utils/got');
+const { parseDate } = require('@/utils/parse-date');
+const { art } = require('@/utils/render');
+const path = require('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`;
+ const response = await got(searchAPI);
+
+ return {
+ productID: response.data.Result[0].Content[0].DataId,
+ url: response.data.Result[0].Content[0].Url,
+ };
+};
+
+module.exports = async (ctx) => {
+ const model = ctx.params.model;
+ const { productID, url } = await getProductID(model);
+ const biosAPI = `https://www.asus.com.cn/support/api/product.asmx/GetPDBIOS?website=cn&model=${model}&pdid=${productID}&sitelang=cn`;
+
+ const response = await got(biosAPI);
+ const biosList = response.data.Result.Obj[0].Files;
+
+ const items = biosList.map((item) => ({
+ title: item.Title,
+ description: art(path.join(__dirname, 'templates/bios.art'), {
+ item,
+ }),
+ pubDate: parseDate(item.ReleaseDate, 'YYYY/MM/DD'),
+ link: url,
+ }));
+
+ ctx.state.data = {
+ title: `${model} BIOS`,
+ link: url,
+ item: items,
+ };
+};
diff --git a/lib/v2/asus/maintainer.js b/lib/v2/asus/maintainer.js
new file mode 100644
index 00000000000000..45440b15a762cf
--- /dev/null
+++ b/lib/v2/asus/maintainer.js
@@ -0,0 +1,3 @@
+module.exports = {
+ '/bios/:model': ['Fatpandac'],
+};
diff --git a/lib/v2/asus/radar.js b/lib/v2/asus/radar.js
new file mode 100644
index 00000000000000..636df00acde6b8
--- /dev/null
+++ b/lib/v2/asus/radar.js
@@ -0,0 +1,13 @@
+module.exports = {
+ 'asus.com.cn': {
+ _name: 'Asus 华硕',
+ '.': [
+ {
+ title: '固件',
+ docs: 'https://docs.rsshub.app/program-update.html#hua-shuo',
+ source: ['/'],
+ target: '/bios/:model',
+ },
+ ],
+ },
+};
diff --git a/lib/v2/asus/router.js b/lib/v2/asus/router.js
new file mode 100644
index 00000000000000..e95103000df735
--- /dev/null
+++ b/lib/v2/asus/router.js
@@ -0,0 +1,3 @@
+module.exports = function (router) {
+ router.get('/bios/:model', require('./bios'));
+};
diff --git a/lib/v2/asus/templates/bios.art b/lib/v2/asus/templates/bios.art
new file mode 100644
index 00000000000000..08bcee2ea332c9
--- /dev/null
+++ b/lib/v2/asus/templates/bios.art
@@ -0,0 +1,6 @@
+<p>更新信息:</p>
+{{@ item.Description}}
+<p>版本: {{item.Version}}</p>
+<p>大小: {{item.FileSize}}</p>
+<p>更新日期: {{item.ReleaseDate}}</p>
+<p>下载链接: <a href="{{item.DownloadUrl.China}}">中国下载</a> | <a href="{{item.DownloadUrl.Global}}">全球下载</a></p>
|
d8e7d67419aec8846cfc8cf60420dd0120df9aac
|
2024-04-04 07:08:08
|
dependabot[bot]
|
chore(deps): bump telegram from 2.20.2 to 2.20.10 (#15089)
| false
|
bump telegram from 2.20.2 to 2.20.10 (#15089)
|
chore
|
diff --git a/package.json b/package.json
index 8b858304a5830e..9c112a9fbdab51 100644
--- a/package.json
+++ b/package.json
@@ -110,7 +110,7 @@
"simplecc-wasm": "0.1.5",
"socks-proxy-agent": "8.0.3",
"source-map": "0.7.4",
- "telegram": "2.20.2",
+ "telegram": "2.20.10",
"tiny-async-pool": "2.1.0",
"title": "3.5.3",
"tldts": "6.1.16",
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index dbd8376f898a84..37f3508e0d6136 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -186,8 +186,8 @@ dependencies:
specifier: 0.7.4
version: 0.7.4
telegram:
- specifier: 2.20.2
- version: 2.20.2
+ specifier: 2.20.10
+ version: 2.20.10
tiny-async-pool:
specifier: 2.1.0
version: 2.1.0
@@ -1682,6 +1682,17 @@ packages:
kuler: 2.0.0
dev: false
+ /@deno/[email protected]:
+ resolution: {integrity: sha512-oYWcD7CpERZy/TXMTM9Tgh1HD/POHlbY9WpzmAk+5H8DohcxG415Qws8yLGlim3EaKBT2v3lJv01x4G0BosnaQ==}
+ dev: false
+
+ /@deno/[email protected]:
+ resolution: {integrity: sha512-s9v0kzF5bm/o9TgdwvsraHx6QNllYrXXmKzgOG2lh4LFXnVMr2gpjK/c/ve6EflQn1MqImcWmVD8HAv5ahuuZQ==}
+ dependencies:
+ '@deno/shim-deno-test': 0.4.0
+ which: 2.0.2
+ dev: false
+
/@esbuild/[email protected]:
resolution: {integrity: sha512-bmoCYyWdEL3wDQIVbcyzRyeKLgk2WtWLTWz1ZIAZF/EGbNOwSA6ew3PftJ1PqMiOOGu0OyFMzG53L0zqIpPeNA==}
engines: {node: '>=12'}
@@ -1903,6 +1914,23 @@ packages:
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
dev: true
+ /@grammyjs/[email protected]([email protected]):
+ resolution: {integrity: sha512-d06nGFPlcea4UqjOcxCm5rwiV74bZQVUWQl3YVQp5TwC0oCHNK+PXgqaKkVgkfcYSMyx3dADRBuBkcGt+yiyDA==}
+ engines: {node: ^12.20.0 || >=14.13.1}
+ peerDependencies:
+ grammy: ^1.20.1
+ dependencies:
+ debug: 4.3.4
+ grammy: 1.22.4
+ o-son: 1.0.4
+ transitivePeerDependencies:
+ - supports-color
+ dev: false
+
+ /@grammyjs/[email protected]:
+ resolution: {integrity: sha512-7OswNRPN72qFUWhysNrY96+5LKBQXgxqw0iNbleYV7G8GB6ZPVdkwFMIZn1Fda2iRKMYT6S6Sxuel0465VGtHQ==}
+ dev: false
+
/@hono/[email protected]:
resolution: {integrity: sha512-XBru0xbtRlTZJyAiFJLn7XDKbCVXBaRhVQAQhB9TwND2gwj8jf9SDWIj/7VxVtNAjURJf7Ofcz58DRA6DPYiWA==}
engines: {node: '>=18.14.1'}
@@ -3176,6 +3204,11 @@ packages:
json-schema-traverse: 0.4.1
uri-js: 4.4.1
+ /[email protected]:
+ resolution: {integrity: sha512-wiXutNjDUlNEDWHcYH3jtZUhd3c4/VojassD8zHdHCY13xbZy2XbW+NKQwA0tWGBVzDA9qEzYwfoSsWmviidhw==}
+ engines: {node: '>=0.10.0'}
+ dev: false
+
/[email protected]:
resolution: {integrity: sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==}
engines: {node: '>=8'}
@@ -3193,7 +3226,6 @@ packages:
/[email protected]:
resolution: {integrity: sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA==}
engines: {node: '>=0.10.0'}
- dev: true
/[email protected]:
resolution: {integrity: sha512-ILlv4k/3f6vfQ4OoP2AGvirOktlQ98ZEL1k9FaQjxa3L1abBgbuTDAdPOpvbGncC0BTVQrl+OM8xZGK6tWXt7g==}
@@ -3212,7 +3244,6 @@ packages:
/[email protected]:
resolution: {integrity: sha512-kmCevFghRiWM7HB5zTPULl4r9bVFSWjz62MhqizDGUrq2NWuNMQyuv4tHHoKJHs69M/MF64lEcHdYIocrdWQYA==}
engines: {node: '>=0.10.0'}
- dev: true
/[email protected]:
resolution: {integrity: sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==}
@@ -3379,6 +3410,13 @@ packages:
- supports-color
dev: true
+ /[email protected]:
+ resolution: {integrity: sha512-ITKNuq2wKlW1fJg9sSW52eepoYgZBggvOAHC0u/CYu/qxQ9EVzThCgR69BnSXLHjy2f7SY5zaQ4yt7H9ZVxY2g==}
+ dependencies:
+ core-js: 2.6.12
+ regenerator-runtime: 0.11.1
+ dev: false
+
/[email protected]:
resolution: {integrity: sha512-0xO6mYd7JB2YesxDKplafRpsiOzPt9V02ddPCLbY1xYGPOX24NTyN50qnUxgCPcSoYMhKpAuBTjQoRZCAkUDRw==}
dev: true
@@ -3638,7 +3676,6 @@ packages:
has-ansi: 2.0.0
strip-ansi: 3.0.1
supports-color: 2.0.0
- dev: true
/[email protected]:
resolution: {integrity: sha512-Az5zJR2CBujap2rqXGaJKaPHyJ0IrUimvYNX+ncCy8PJP4ltOGTrHUIo097ZaL2zMeKYpiCdqDvS6zdrTFok3Q==}
@@ -3786,6 +3823,13 @@ packages:
escape-string-regexp: 1.0.5
dev: true
+ /[email protected]:
+ resolution: {integrity: sha512-25tABq090YNKkF6JH7lcwO0zFJTRke4Jcq9iX2nr/Sz0Cjjv4gckmwlW6Ty/aoyFd6z3ysR2hMGC2GFugmBo6A==}
+ engines: {node: '>=0.10.0'}
+ dependencies:
+ restore-cursor: 1.0.1
+ dev: false
+
/[email protected]:
resolution: {integrity: sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==}
engines: {node: '>=8'}
@@ -3813,6 +3857,10 @@ packages:
string-width: 7.1.0
dev: true
+ /[email protected]:
+ resolution: {integrity: sha512-GRMWDxpOB6Dgk2E5Uo+3eEBvtOOlimMmpbFiKuLFnQzYDavtLFY3K5ona41jgN/WdRZtG7utuVSVTL4HbZHGkw==}
+ dev: false
+
/[email protected]:
resolution: {integrity: sha512-FxqpkPPwu1HjuN93Omfm4h8uIanXofW0RxVEW3k5RKx+mJJYSthzNhp32Kzxxy3YAEZ/Dc/EWN1vZRY0+kOhbw==}
engines: {node: '>= 10'}
@@ -3860,6 +3908,11 @@ packages:
engines: {node: '>=0.10.0'}
dev: false
+ /[email protected]:
+ resolution: {integrity: sha512-RpAVKQA5T63xEj6/giIbUEtZwJ4UFIc3ZtvEkiaUERylqe8xb5IvqcgOurZLahv93CLKfxcw5YI+DZcUBRyLXA==}
+ engines: {node: '>=0.10.0'}
+ dev: false
+
/[email protected]:
resolution: {integrity: sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==}
dependencies:
@@ -4891,6 +4944,11 @@ packages:
strip-final-newline: 3.0.0
dev: true
+ /[email protected]:
+ resolution: {integrity: sha512-MsG3prOVw1WtLXAZbM3KiYtooKR1LvxHh3VHsVtIy0uiUu8usxgB/94DP2HxtD/661lLdB6yzQ09lGJSQr6nkg==}
+ engines: {node: '>=0.10.0'}
+ dev: false
+
/[email protected]:
resolution: {integrity: sha512-6hxeJYaL110a9b5TEJSj0gojyHQAmA2ch5Os+ySCiA1QGdS697XWY1pzsrSjqA9LDEEgdB/KypIlR59RcLuHYw==}
dependencies:
@@ -4995,6 +5053,14 @@ packages:
resolution: {integrity: sha512-OP2IUU6HeYKJi3i0z4A19kHMQoLVs4Hc+DPqqxI2h/DPZHTm/vjsfC6P0b4jCMy14XizLBqvndQ+UilD7707Jw==}
dev: false
+ /[email protected]:
+ resolution: {integrity: sha512-UxKlfCRuCBxSXU4C6t9scbDyWZ4VlaFFdojKtzJuSkuOBQ5CNFum+zZXFwHjo+CxBC1t6zlYPgHIgFjL8ggoEQ==}
+ engines: {node: '>=0.10.0'}
+ dependencies:
+ escape-string-regexp: 1.0.5
+ object-assign: 4.1.1
+ dev: false
+
/[email protected]:
resolution: {integrity: sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==}
engines: {node: '>=8'}
@@ -5431,6 +5497,19 @@ packages:
/[email protected]:
resolution: {integrity: sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==}
+ /[email protected]:
+ resolution: {integrity: sha512-7EIdixo4kV/lJWyKswyi5n3AJ2U/2731rPf8a3SKoXQ0tiHdCTvdgc2atdN2b10g8o6wJ2SXTf0xQX3Dqm1buA==}
+ engines: {node: ^12.20.0 || >=14.13.1}
+ dependencies:
+ '@grammyjs/types': 3.6.2
+ abort-controller: 3.0.0
+ debug: 4.3.4
+ node-fetch: 2.7.0
+ transitivePeerDependencies:
+ - encoding
+ - supports-color
+ dev: false
+
/[email protected]:
resolution: {integrity: sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==}
dev: true
@@ -5470,7 +5549,6 @@ packages:
engines: {node: '>=0.10.0'}
dependencies:
ansi-regex: 2.1.1
- dev: true
/[email protected]:
resolution: {integrity: sha512-P+1n3MnwjR/Epg9BBo1KT8qbye2g2Ou4sFumihwt6I4tsUX7jnLcX4BTOSKg/B1ZrIYMN9FcEnG4x5a7NB8Eng==}
@@ -5747,6 +5825,34 @@ packages:
resolution: {integrity: sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==}
dev: true
+ /[email protected]:
+ resolution: {integrity: sha512-5DKQKQ7Nm/CaPGYKF74uUvk5ftC3S04fLYWcDrNG2rOVhhRgB4E2J8JNb7AAh+RlQ/954ukas4bEbrRQ3/kPGA==}
+ engines: {node: '>=0.12'}
+ dependencies:
+ babel-runtime: 6.26.0
+ chalk: 1.1.3
+ inquirer: 0.12.0
+ lodash: 4.17.21
+ dev: false
+
+ /[email protected]:
+ resolution: {integrity: sha512-bOetEz5+/WpgaW4D1NYOk1aD+JCqRjqu/FwRFgnIfiP7FC/zinsrfyO1vlS3nyH/R7S0IH3BIHBu4DBIDSqiGQ==}
+ dependencies:
+ ansi-escapes: 1.4.0
+ ansi-regex: 2.1.1
+ chalk: 1.1.3
+ cli-cursor: 1.0.2
+ cli-width: 2.2.1
+ figures: 1.7.0
+ lodash: 4.17.21
+ readline2: 1.0.1
+ run-async: 0.1.0
+ rx-lite: 3.1.2
+ string-width: 1.0.2
+ strip-ansi: 3.0.1
+ through: 2.3.8
+ dev: false
+
/[email protected]:
resolution: {integrity: sha512-M1WuAmb7pn9zdFRtQYk26ZBoY043Sse0wVDdk4Bppr+JOXyQYybdtvK+l9wUibhtjdjvtoiNy8tk+EgsYIUqKg==}
engines: {node: '>=12.0.0'}
@@ -5871,6 +5977,13 @@ packages:
engines: {node: '>=0.10.0'}
dev: true
+ /[email protected]:
+ resolution: {integrity: sha512-1pqUqRjkhPJ9miNq9SwMfdvi6lBJcd6eFxvfaivQhaH3SgisfiuudvFntdKOmxuee/77l+FPjKrQjWvmPjWrRw==}
+ engines: {node: '>=0.10.0'}
+ dependencies:
+ number-is-nan: 1.0.1
+ dev: false
+
/[email protected]:
resolution: {integrity: sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==}
engines: {node: '>=8'}
@@ -6982,6 +7095,10 @@ packages:
yargs: 17.7.2
dev: true
+ /[email protected]:
+ resolution: {integrity: sha512-EbrziT4s8cWPmzr47eYVW3wimS4HsvlnV5ri1xw1aR6JQo/OrJX5rkl32K/QQHdxeabJETtfeaROGhd8W7uBgg==}
+ dev: false
+
/[email protected]:
resolution: {integrity: sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==}
dev: true
@@ -7129,9 +7246,20 @@ packages:
boolbase: 1.0.0
dev: false
+ /[email protected]:
+ resolution: {integrity: sha512-4jbtZXNAsfZbAHiiqjLPBiCl16dES1zI4Hpzzxw61Tk+loF+sBDBKx1ICKKKwIqQ7M0mFn1TmkN7euSncWgHiQ==}
+ engines: {node: '>=0.10.0'}
+ dev: false
+
/[email protected]:
resolution: {integrity: sha512-ub5E4+FBPKwAZx0UwIQOjYWGHTEq5sPqHQNRN8Z9e4A7u3Tj1weLJsL59yH9vmvqEtBHaOmT6cYQKIZOxp35FQ==}
+ /[email protected]:
+ resolution: {integrity: sha512-tdGKxZgiTexSv97/igC2m8Y6FljgwvwHW/Zy3ql3Jx6MPKrPKaBDLhV7rz8uuLjcDPw6Pxa2PVsnWwen59MmnQ==}
+ dependencies:
+ '@deno/shim-deno': 0.16.1
+ dev: false
+
/[email protected]:
resolution: {integrity: sha512-6bkxv3N4Gu5lty4viIcIAnq5GbxECviMBeKR3WX/q87SPQ8E8aursPZUtsXDnxCs787af09WPRBLqYrf/lwoYQ==}
dev: false
@@ -7143,7 +7271,6 @@ packages:
/[email protected]:
resolution: {integrity: sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==}
engines: {node: '>=0.10.0'}
- dev: true
/[email protected]:
resolution: {integrity: sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ==}
@@ -7172,6 +7299,11 @@ packages:
fn.name: 1.1.0
dev: false
+ /[email protected]:
+ resolution: {integrity: sha512-GZ+g4jayMqzCRMgB2sol7GiCLjKfS1PINkjmx8spcKce1LiVqcbQreXwqs2YAFXC6R03VIG28ZS31t8M866v6A==}
+ engines: {node: '>=0.10.0'}
+ dev: false
+
/[email protected]:
resolution: {integrity: sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==}
engines: {node: '>=6'}
@@ -7872,6 +8004,14 @@ packages:
string_decoder: 1.3.0
dev: false
+ /[email protected]:
+ resolution: {integrity: sha512-8/td4MmwUB6PkZUbV25uKz7dfrmjYWxsW8DVfibWdlHRk/l/DfHKn4pU+dfcoGLFgWOdyGCzINRQD7jn+Bv+/g==}
+ dependencies:
+ code-point-at: 1.1.0
+ is-fullwidth-code-point: 1.0.0
+ mute-stream: 0.0.5
+ dev: false
+
/[email protected]:
resolution: {integrity: sha512-FYhmx1FVSgoPRjneoTjh+EKZcNb8ijl/dyatTzase5eujYhVrLNDOiIY6AgQq7GU1kOoLgEd9jLVbhFg8k8dOQ==}
dev: false
@@ -7908,6 +8048,10 @@ packages:
resolution: {integrity: sha512-zrceR/XhGYU/d/opr2EKO7aRHUeiBI8qjtfHqADTwZd6Szfy16la6kqD0MIUs5z5hx6AaKa+PixpPrR289+I0A==}
dev: true
+ /[email protected]:
+ resolution: {integrity: sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg==}
+ dev: false
+
/[email protected]:
resolution: {integrity: sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==}
@@ -8057,6 +8201,14 @@ packages:
dependencies:
lowercase-keys: 3.0.0
+ /[email protected]:
+ resolution: {integrity: sha512-reSjH4HuiFlxlaBaFCiS6O76ZGG2ygKoSlCsipKdaZuKSPx/+bt9mULkn4l0asVzbEfQQmXRg6Wp6gv6m0wElw==}
+ engines: {node: '>=0.10.0'}
+ dependencies:
+ exit-hook: 1.1.1
+ onetime: 1.1.0
+ dev: false
+
/[email protected]:
resolution: {integrity: sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==}
engines: {node: '>=8'}
@@ -8125,6 +8277,12 @@ packages:
xml2js: 0.5.0
dev: false
+ /[email protected]:
+ resolution: {integrity: sha512-qOX+w+IxFgpUpJfkv2oGN0+ExPs68F4sZHfaRRx4dDexAQkG83atugKVEylyT5ARees3HBbfmuvnjbrd8j9Wjw==}
+ dependencies:
+ once: 1.4.0
+ dev: false
+
/[email protected]:
resolution: {integrity: sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ==}
engines: {node: '>=0.12.0'}
@@ -8136,6 +8294,10 @@ packages:
queue-microtask: 1.2.3
dev: true
+ /[email protected]:
+ resolution: {integrity: sha512-1I1+G2gteLB8Tkt8YI1sJvSIfa0lWuRtC8GjvtyPBcLSF5jBCCJJqKrpER5JU5r6Bhe+i9/pK3VMuUcXu0kdwQ==}
+ dev: false
+
/[email protected]:
resolution: {integrity: sha512-hTdwr+7yYNIT5n4AMYp85KA6yw2Va0FLa3Rguvbpa4W3I5xynaBZo41cM3XM+4Q6fRMj3sBYIR1VAmZMXYJvRQ==}
engines: {npm: '>=2.0.0'}
@@ -8484,6 +8646,15 @@ packages:
resolution: {integrity: sha512-NJHQRg6GlOEMLA6jEAlSy21KaXvJDNoAid/v6fBAJbqdvOEIiPpCrIPTHnl4636wUF/IGyktX5A9eddmETb1Cw==}
dev: false
+ /[email protected]:
+ resolution: {integrity: sha512-0XsVpQLnVCXHJfyEs8tC0zpTVIr5PKKsQtkT29IwupnPTjtPmQ3xT/4yCREF9hYkV/3M3kzcUTSAZT6a6h81tw==}
+ engines: {node: '>=0.10.0'}
+ dependencies:
+ code-point-at: 1.1.0
+ is-fullwidth-code-point: 1.0.0
+ strip-ansi: 3.0.1
+ dev: false
+
/[email protected]:
resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==}
engines: {node: '>=8'}
@@ -8520,7 +8691,6 @@ packages:
engines: {node: '>=0.10.0'}
dependencies:
ansi-regex: 2.1.1
- dev: true
/[email protected]:
resolution: {integrity: sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==}
@@ -8601,7 +8771,6 @@ packages:
/[email protected]:
resolution: {integrity: sha512-KKNVtd6pCYgPIKU4cp2733HWYCpplQhddZLBUryaAHou723x+FRzQ5Df824Fj+IyyuiQTRoub4SnIFfIcrp70g==}
engines: {node: '>=0.8.0'}
- dev: true
/[email protected]:
resolution: {integrity: sha512-ycQR/UbvI9xIlEdQT1TQqwoXtEldExbCEAJgRo5YXlmSKjv6ThHnP9/vwGa1gr19Gfw+LkFd7KqYMhzrRC5JYw==}
@@ -8669,14 +8838,17 @@ packages:
yallist: 4.0.0
dev: true
- /[email protected]:
- resolution: {integrity: sha512-pvJ9tjyTRkQqQS0efkOOzLzCpgNBrtLu/FduzFpXocSZ/ivDDPNJt1B8yDwWicGK2GVLjEUgsmp9fPTScwFA1g==}
+ /[email protected]:
+ resolution: {integrity: sha512-QGVwpxYX60jVfvO/2KtujV5uKPb1ihWDgaGDuiOQAQFdlHwLhovDUTZvek5SnWvRp7Aob86TphnSP8aLTLMsJA==}
dependencies:
'@cryptography/aes': 0.1.1
+ '@grammyjs/conversations': 1.2.0([email protected])
async-mutex: 0.3.2
big-integer: 1.6.52
buffer: 6.0.3
+ grammy: 1.22.4
htmlparser2: 6.1.0
+ input: 1.0.1
mime: 3.0.0
node-localstorage: 2.2.1
pako: 2.1.0
@@ -8690,6 +8862,7 @@ packages:
bufferutil: 4.0.8
utf-8-validate: 5.0.10
transitivePeerDependencies:
+ - encoding
- supports-color
dev: false
|
27ce86ccf675bddfeda549dbe02c5f2cc5214208
|
2023-04-16 12:13:28
|
Tony
|
chore: label on failed docker build
| false
|
label on failed docker build
|
chore
|
diff --git a/.github/workflows/docker-test.yml b/.github/workflows/docker-test.yml
index ce438a156e35cb..d2a9227c36761a 100644
--- a/.github/workflows/docker-test.yml
+++ b/.github/workflows/docker-test.yml
@@ -56,11 +56,15 @@ jobs:
cache-from: |
type=registry,ref=${{ secrets.DOCKER_USERNAME }}/rsshub:chromium-bundled
type=gha,scope=docker-release
- # ! build on amd64 is fast enough, and cache between PRs never hit, so never waste the 10GB cache limit !
- # cache-from: |
- # type=gha,scope=docker-test
- # type=gha,scope=docker-release
- # cache-to: type=gha,mode=max,scope=docker-test
+
+ - name: Pull Request Labeler
+ if: ${{ failure() }}
+ uses: actions-cool/issues-helper@v3
+ with:
+ actions: 'add-labels'
+ token: ${{ secrets.GITHUB_TOKEN }}
+ issue-number: ${{ github.event.issue.number }}
+ labels: 'Route Test: Failed'
- name: Test Docker image
run: bash scripts/docker/test-docker.sh
|
d24db95f06fb41543a4d9e00e785a5142589e9ce
|
2021-11-27 14:12:45
|
Ethan Shen
|
feat(route): add 北京邮电大学人才招聘 (#8438)
| false
|
add 北京邮电大学人才招聘 (#8438)
|
feat
|
diff --git a/docs/university.md b/docs/university.md
index cbb03e4aa48edf..a937d0f7f53f20 100644
--- a/docs/university.md
+++ b/docs/university.md
@@ -283,6 +283,10 @@ pageClass: routes
:::
+### 人才招聘
+
+<Route author="nczitzk" example="/bupt/rczp" path="/bupt/rczp" />
+
## 常州大学
### 教务处
diff --git a/lib/v2/bupt/maintainer.js b/lib/v2/bupt/maintainer.js
new file mode 100644
index 00000000000000..1a48219f75e1da
--- /dev/null
+++ b/lib/v2/bupt/maintainer.js
@@ -0,0 +1,3 @@
+module.exports = {
+ '/rczp': ['nczitzk'],
+};
diff --git a/lib/v2/bupt/radar.js b/lib/v2/bupt/radar.js
new file mode 100644
index 00000000000000..0a9c2df635849d
--- /dev/null
+++ b/lib/v2/bupt/radar.js
@@ -0,0 +1,13 @@
+module.exports = {
+ 'bupt.edu.cn': {
+ _name: '北京邮电大学',
+ '.': [
+ {
+ title: '人才招聘',
+ docs: 'https://docs.rsshub.app/university.html#bei-jing-you-dian-da-xue-ren-cai-zhao-pin',
+ source: ['/'],
+ target: '/bupt/rczp',
+ },
+ ],
+ },
+};
diff --git a/lib/v2/bupt/rczp.js b/lib/v2/bupt/rczp.js
new file mode 100644
index 00000000000000..017115538589e9
--- /dev/null
+++ b/lib/v2/bupt/rczp.js
@@ -0,0 +1,51 @@
+const got = require('@/utils/got');
+const cheerio = require('cheerio');
+const timezone = require('@/utils/timezone');
+const { parseDate } = require('@/utils/parse-date');
+
+module.exports = async (ctx) => {
+ const rootUrl = 'https://www.bupt.edu.cn';
+ const currentUrl = `${rootUrl}/rczp.htm`;
+
+ const response = await got({
+ method: 'get',
+ url: currentUrl,
+ });
+
+ const $ = cheerio.load(response.data);
+
+ const list = $('.date-block')
+ .map((_, item) => {
+ item = $(item);
+
+ return {
+ title: item.next().text(),
+ link: `${rootUrl}/${item.next().attr('href')}`,
+ };
+ })
+ .get();
+
+ const items = await Promise.all(
+ list.map((item) =>
+ ctx.cache.tryGet(item.link, async () => {
+ const detailResponse = await got({
+ method: 'get',
+ url: item.link,
+ });
+
+ const content = cheerio.load(detailResponse.data);
+
+ item.description = content('.v_news_content').html();
+ item.pubDate = timezone(parseDate(content('.info span').first().text().replace('发布时间 : ', '')), +8);
+
+ return item;
+ })
+ )
+ );
+
+ ctx.state.data = {
+ title: $('title').text(),
+ link: currentUrl,
+ item: items,
+ };
+};
diff --git a/lib/v2/bupt/router.js b/lib/v2/bupt/router.js
new file mode 100644
index 00000000000000..44d7284615416f
--- /dev/null
+++ b/lib/v2/bupt/router.js
@@ -0,0 +1,3 @@
+module.exports = function (router) {
+ router.get('/rczp', require('./rczp'));
+};
|
769e6835561540a2ef3e288b772791aa4ffaa73f
|
2024-08-01 17:39:26
|
dependabot[bot]
|
chore(deps): bump tsx from 4.16.3 to 4.16.5 (#16332)
| false
|
bump tsx from 4.16.3 to 4.16.5 (#16332)
|
chore
|
diff --git a/package.json b/package.json
index 9ff1ece7cbc9ab..cf14fe7df585d3 100644
--- a/package.json
+++ b/package.json
@@ -125,7 +125,7 @@
"tldts": "6.1.37",
"tosource": "2.0.0-alpha.3",
"tough-cookie": "4.1.4",
- "tsx": "4.16.3",
+ "tsx": "4.16.5",
"twitter-api-v2": "1.17.2",
"undici": "6.19.5",
"uuid": "10.0.0",
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index aa4ce1717d83b9..47e5eb19bf9c00 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -234,8 +234,8 @@ importers:
specifier: 4.1.4
version: 4.1.4
tsx:
- specifier: 4.16.3
- version: 4.16.3
+ specifier: 4.16.5
+ version: 4.16.5
twitter-api-v2:
specifier: 1.17.2
version: 1.17.2
@@ -6615,8 +6615,8 @@ packages:
[email protected]:
resolution: {integrity: sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==}
- [email protected]:
- resolution: {integrity: sha512-MP8AEUxVnboD2rCC6kDLxnpDBNWN9k3BSVU/0/nNxgm70bPBnfn+yCKcnOsIVPQwdkbKYoFOlKjjWZWJ2XCXUg==}
+ [email protected]:
+ resolution: {integrity: sha512-ArsiAQHEW2iGaqZ8fTA1nX0a+lN5mNTyuGRRO6OW3H/Yno1y9/t1f9YOI1Cfoqz63VAthn++ZYcbDP7jPflc+A==}
engines: {node: '>=18.0.0'}
hasBin: true
@@ -14651,7 +14651,7 @@ snapshots:
[email protected]: {}
- [email protected]:
+ [email protected]:
dependencies:
esbuild: 0.21.5
get-tsconfig: 4.7.6
|
1e86e2a8fc554d350aa51081df6073d302d9a134
|
2020-06-28 08:55:11
|
Ethan Shen
|
feat: add Amazfit Watch Faces (#5037)
| false
|
add Amazfit Watch Faces (#5037)
|
feat
|
diff --git a/docs/other.md b/docs/other.md
index d5f6e8559e62ce..eda29a377c4ab4 100644
--- a/docs/other.md
+++ b/docs/other.md
@@ -9,6 +9,31 @@ pageClass: routes
### 新闻
<Route author="cc798461" example="/acwifi" path="/acwifi"/>
+
+## Amazfit Watch Faces
+
+手表型号可在网站中选择后到地址栏查看
+
+| Amazfit Bip | Amazfit Cor | Amazfit GTR | Amazfit GTS | Amazfit Stratos | Amazfit T-Rex | Amazfit Verge | Amazfit Verge Lite | Honor Band 5 | Honor Watch Magic | Huawei Watch GT | Xiaomi Mi Band 4 |
+| ----------- | ----------- | ----------- | ----------- | --------------- | ------------- | ------------- | ------------------ | ------------ | ----------------- | --------------- | ---------------- |
+| bip | cor | gtr | gts | pace | t-rex | verge | verge-lite | honor-band-5 | honor-watch-magic | huawei-watch-gt | mi-band-4 |
+
+### 新品上架
+
+<Route author="nczitzk" example="/amazfitwatchfaces/fresh/bip/Bip/zh" path="/amazfitwatchfaces/fresh/:model/:type?/:lang?" :paramsDesc="['手表型号', '手表款式,款式代码可在目标网站选择后到地址栏查看,`all` 指 全部款式', '表盘语言,语言代码可在目标网站选择后到地址栏查看,如 `zh` 指 中文']"/>
+
+### 最近更新
+
+<Route author="nczitzk" example="/amazfitwatchfaces/updated/bip/Bip/zh" path="/amazfitwatchfaces/updated/:model/:type?/:lang?" :paramsDesc="['手表型号', '手表款式,款式代码可在目标网站选择后到地址栏查看,`all` 指 全部款式', '表盘语言,语言代码可在目标网站选择后到地址栏查看,如 `zh` 指 中文']"/>
+
+### 排行榜
+
+<Route author="nczitzk" example="/amazfitwatchfaces/top/bip/Bip/month/views/zh" path="/amazfitwatchfaces/top/:model/:type?/:time?/:sortBy?/:lang?" :paramsDesc="['手表型号', '手表款式,款式代码可在目标网站选择后到地址栏查看,`all` 指 全部款式', '统计时间,`week` 指 上周,`month` 指 上月,`alltime` 指 全部时间', '排序参数,`download` 指 下载量,`views` 指 查看量,`fav` 指 收藏数', '表盘语言,语言代码可在目标网站选择后到地址栏查看,如 `zh` 指 中文']"/>
+
+### 搜索结果
+
+<Route author="nczitzk" example="/amazfitwatchfaces/search/bip/battery" path="/amazfitwatchfaces/search/:model/:keyword?/:sortBy?" :paramsDesc="['手表型号', '关键词,多个关键词用半角逗号隔开', '排序参数,`fresh` 指 新品上架,`updated` 指 已更新的,`views` 指 查看量,`download` 指 下载量,`fav` 指 收藏数']"/>
+
## Apple
### 更换和维修扩展计划
diff --git a/lib/router.js b/lib/router.js
index 0ca7e7f69646d6..b8cf14f712eff9 100644
--- a/lib/router.js
+++ b/lib/router.js
@@ -2871,6 +2871,12 @@ router.get('/changku', require('./routes/changku/index'));
// 上海市生态环境局
router.get('/gov/shanghai/sthj', require('./routes/gov/shanghai/sthj'));
+// Amazfit Watch Faces
+router.get('/amazfitwatchfaces/fresh/:model/:type?/:lang?', require('./routes/amazfitwatchfaces/fresh'));
+router.get('/amazfitwatchfaces/updated/:model/:type?/:lang?', require('./routes/amazfitwatchfaces/updated'));
+router.get('/amazfitwatchfaces/top/:model/:type?/:time?/:sortBy?/:lang?', require('./routes/amazfitwatchfaces/top'));
+router.get('/amazfitwatchfaces/search/:model/:keyword?/:sortBy?', require('./routes/amazfitwatchfaces/search'));
+
// 猫耳FM
router.get('/missevan/drama/:id', require('./routes/missevan/drama'));
diff --git a/lib/routes/amazfitwatchfaces/fresh.js b/lib/routes/amazfitwatchfaces/fresh.js
new file mode 100644
index 00000000000000..82667343400eb9
--- /dev/null
+++ b/lib/routes/amazfitwatchfaces/fresh.js
@@ -0,0 +1,7 @@
+const utils = require('./utils');
+
+module.exports = async (ctx) => {
+ const currentUrl = `${ctx.params.model}/fresh?${ctx.params.lang ? 'lang=' + ctx.params.lang : ''}${ctx.params.type ? '&compatible=' + ctx.params.type : ''}`;
+
+ ctx.state.data = await utils(ctx, currentUrl);
+};
diff --git a/lib/routes/amazfitwatchfaces/search.js b/lib/routes/amazfitwatchfaces/search.js
new file mode 100644
index 00000000000000..a37ad328c20d15
--- /dev/null
+++ b/lib/routes/amazfitwatchfaces/search.js
@@ -0,0 +1,7 @@
+const utils = require('./utils');
+
+module.exports = async (ctx) => {
+ const currentUrl = `search/${ctx.params.model}/tags/${ctx.params.keyword ? ctx.params.keyword : ''}${ctx.params.sortBy ? '?sortby=' + ctx.params.sortBy : ''}`;
+
+ ctx.state.data = await utils(ctx, currentUrl);
+};
diff --git a/lib/routes/amazfitwatchfaces/top.js b/lib/routes/amazfitwatchfaces/top.js
new file mode 100644
index 00000000000000..f149d385618cd9
--- /dev/null
+++ b/lib/routes/amazfitwatchfaces/top.js
@@ -0,0 +1,9 @@
+const utils = require('./utils');
+
+module.exports = async (ctx) => {
+ const currentUrl = `${ctx.params.model}/top?${ctx.params.lang ? 'lang=' + ctx.params.lang : ''}${ctx.params.type ? '&compatible=' + ctx.params.type : ''}${ctx.params.sortBy ? '&sortby=' + ctx.params.sortBy : ''}${
+ ctx.params.time ? '&topof=' + ctx.params.time : ''
+ }`;
+
+ ctx.state.data = await utils(ctx, currentUrl);
+};
diff --git a/lib/routes/amazfitwatchfaces/updated.js b/lib/routes/amazfitwatchfaces/updated.js
new file mode 100644
index 00000000000000..c9b10df8b1761a
--- /dev/null
+++ b/lib/routes/amazfitwatchfaces/updated.js
@@ -0,0 +1,7 @@
+const utils = require('./utils');
+
+module.exports = async (ctx) => {
+ const currentUrl = `${ctx.params.model}/updated?${ctx.params.lang ? 'lang=' + ctx.params.lang : ''}${ctx.params.type ? '&compatible=' + ctx.params.type : ''}`;
+
+ ctx.state.data = await utils(ctx, currentUrl);
+};
diff --git a/lib/routes/amazfitwatchfaces/utils.js b/lib/routes/amazfitwatchfaces/utils.js
new file mode 100644
index 00000000000000..008e95e7625e71
--- /dev/null
+++ b/lib/routes/amazfitwatchfaces/utils.js
@@ -0,0 +1,44 @@
+const url = require('url');
+const got = require('@/utils/got');
+const cheerio = require('cheerio');
+
+module.exports = async (ctx, currentUrl) => {
+ const rootUrl = `https://amazfitwatchfaces.com/`;
+ const response = await got({
+ method: 'get',
+ url: `${rootUrl}${currentUrl}`,
+ });
+ const $ = cheerio.load(response.data);
+ const list = $('#wf-row div.col-md-3')
+ .slice(0, 10)
+ .map((_, item) => {
+ item = $(item);
+ return {
+ link: url.resolve(rootUrl, $(item).find('a.wf-act').attr('href')),
+ };
+ })
+ .get();
+
+ const items = await Promise.all(
+ list.map(
+ async (item) =>
+ await ctx.cache.tryGet(item.link, async () => {
+ const detailResponse = await got({ method: 'get', url: item.link });
+ const content = cheerio.load(detailResponse.data);
+ const date = content('i.fa-calendar').parent().find('span').text();
+ const ymd = date.split(' ')[0];
+
+ item.title = `[${content('code').text()}] ${content('title').text().split(' - ')[0]}`;
+ item.description = `<img src="${content('#watchface-preview').attr('src')}"><br>${content('div.unicodebidi').text()}`;
+ item.pubDate = new Date(`${ymd.split('.')[2]}-${ymd.split('.')[1]}-${ymd.split('.')[0]} ${date.split(' ')[1]}`).toUTCString();
+ return item;
+ })
+ )
+ );
+
+ return {
+ title: `${$('title').text().split('|')[0]} | Amazfit Watch Faces`,
+ link: currentUrl,
+ item: items,
+ };
+};
|
01141f94a733c905d429a79eb1e87f2824b12220
|
2024-11-04 21:53:16
|
liyaozhong
|
feat(route): add baoyu's blog with complete content (#17439)
| false
|
add baoyu's blog with complete content (#17439)
|
feat
|
diff --git a/lib/routes/baoyu/index.ts b/lib/routes/baoyu/index.ts
new file mode 100644
index 00000000000000..5b101120889598
--- /dev/null
+++ b/lib/routes/baoyu/index.ts
@@ -0,0 +1,57 @@
+import { Route, DataItem } from '@/types';
+import got from '@/utils/got';
+import { load } from 'cheerio';
+import { parseDate } from '@/utils/parse-date';
+import parser from '@/utils/rss-parser';
+import cache from '@/utils/cache';
+
+export const route: Route = {
+ path: '/blog',
+ categories: ['blog'],
+ example: '/baoyu/blog',
+ radar: [
+ {
+ source: ['baoyu.io/'],
+ },
+ ],
+ url: 'baoyu.io/',
+ name: 'Blog',
+ maintainers: ['liyaozhong'],
+ handler,
+ description: '宝玉 - 博客文章',
+};
+
+async function handler() {
+ const rootUrl = 'https://baoyu.io';
+ const feedUrl = `${rootUrl}/feed.xml`;
+
+ const feed = await parser.parseURL(feedUrl);
+
+ const items = await Promise.all(
+ feed.items.map((item) => {
+ const link = item.link;
+
+ return cache.tryGet(link as string, async () => {
+ const response = await got(link);
+ const $ = load(response.data);
+
+ const container = $('.container');
+ const content = container.find('.prose').html() || '';
+
+ return {
+ title: item.title,
+ description: content,
+ link,
+ pubDate: item.pubDate ? parseDate(item.pubDate) : undefined,
+ author: item.creator || '宝玉',
+ } as DataItem;
+ });
+ })
+ );
+
+ return {
+ title: '宝玉的博客',
+ link: rootUrl,
+ item: items,
+ };
+}
diff --git a/lib/routes/baoyu/namespace.ts b/lib/routes/baoyu/namespace.ts
new file mode 100644
index 00000000000000..6bc9da081013b2
--- /dev/null
+++ b/lib/routes/baoyu/namespace.ts
@@ -0,0 +1,8 @@
+import type { Namespace } from '@/types';
+
+export const namespace: Namespace = {
+ name: '宝玉',
+ url: 'baoyu.io',
+ description: '宝玉的博客',
+ lang: 'zh-CN',
+};
|
aba18ac44aa679b229bec0b41754146817e6d92b
|
2024-04-24 22:23:25
|
Tony
|
fix(route): douyin live (#15361)
| false
|
douyin live (#15361)
|
fix
|
diff --git a/lib/routes/douyin/live.ts b/lib/routes/douyin/live.ts
index f4eaf5fb491cdb..fb3db0ae1e66a3 100644
--- a/lib/routes/douyin/live.ts
+++ b/lib/routes/douyin/live.ts
@@ -46,7 +46,7 @@ async function handler(ctx) {
await page.setRequestInterception(true);
page.on('request', (request) => {
- request.resourceType() === 'document' || request.resourceType() === 'script' || request.resourceType() === 'xhr' ? request.continue() : request.abort();
+ request.resourceType() === 'document' || request.resourceType() === 'stylesheet' || request.resourceType() === 'script' || request.resourceType() === 'xhr' ? request.continue() : request.abort();
});
page.on('response', async (response) => {
const request = response.request();
|
89759b0fcb53f345e2066396d6f071193130066e
|
2024-01-18 18:38:36
|
github-actions[bot]
|
style: auto format
| false
|
auto format
|
style
|
diff --git a/lib/v2/dol/announce.js b/lib/v2/dol/announce.js
index 2df345e77f7e0d..c595f5c72ea64c 100644
--- a/lib/v2/dol/announce.js
+++ b/lib/v2/dol/announce.js
@@ -77,9 +77,9 @@ module.exports = async (ctx) => {
pubDate: timezone(
new Date(
// The date is in Buddish year
- parseInt(dateList[2]) - 543,
- parseInt(dateList[1]) - 1,
- parseInt(dateList[0])
+ Number.parseInt(dateList[2]) - 543,
+ Number.parseInt(dateList[1]) - 1,
+ Number.parseInt(dateList[0])
),
+7
),
|
c83aa45ec0fc14ce97143134c45bbc9d5b21d951
|
2020-10-10 03:41:39
|
Henry Wang
|
fix: BBC 中文网图片 (#5837)
| false
|
BBC 中文网图片 (#5837)
|
fix
|
diff --git a/lib/routes/bbc/utils.js b/lib/routes/bbc/utils.js
index 8b3122d7d7ac23..8d472fc73c201f 100644
--- a/lib/routes/bbc/utils.js
+++ b/lib/routes/bbc/utils.js
@@ -1,26 +1,34 @@
-const ProcessImage = ($, e, c) => {
+const cheerio = require('cheerio');
+const ProcessImage = ($, e, c, noscript = false) => {
const img = $(e).find(c);
if (img.length > 0) {
let message;
+ // special handling for img wrapped in <noscript>
+ if (noscript) {
+ // eslint-disable-next-line no-unused-vars
+ const i = cheerio.load(img[0].children[0].data)('img')[0];
- // handle cover image and lazy-loading images
- if (img[0].attribs.src) {
- message = `<figure><img alt='${img[0].attribs.alt ? img[0].attribs.alt : ''}' src='${img[0].attribs.src.replace(/(?<=\/news\/).*?(?=\/cpsprodpb)/, '600')}'><br><figcaption>`;
+ message = `<figure><img alt='${i.attribs.alt}' src='${i.attribs.src}'><br><figcaption>`;
} else {
- message = `<figure><img alt='${img[0].attribs['data-alt'] ? img[0].attribs['data-alt'] : ''}' src='${img[0].attribs['data-src'].replace(/(?<=\/news\/).*?(?=\/cpsprodpb)/, '600')}'><br><figcaption>`;
- }
-
- // add image caption
- const figcaption = $(e).find('.media-caption__text');
- if (figcaption.length > 0) {
- message += `${$(figcaption[0]).text().trim()}`;
- }
-
- // add image copyright
- const copyright = $(e).find('.story-image-copyright');
- if (copyright.length > 0) {
- message += ` ©${$(copyright[0]).text().trim()}`;
+ if (img[0].attribs.src) {
+ // handle cover image and lazy-loading images
+ message = `<figure><img alt='${img[0].attribs.alt ? img[0].attribs.alt : ''}' src='${img[0].attribs.src.replace(/(?<=\/news\/).*?(?=\/cpsprodpb)/, '600')}'><br><figcaption>`;
+ } else {
+ message = `<figure><img alt='${img[0].attribs['data-alt'] ? img[0].attribs['data-alt'] : ''}' src='${img[0].attribs['data-src'].replace(/(?<=\/news\/).*?(?=\/cpsprodpb)/, '600')}'><br><figcaption>`;
+ }
+
+ // add image caption
+ const figcaption = $(e).find('.media-caption__text');
+ if (figcaption.length > 0) {
+ message += `${$(figcaption[0]).text().trim()}`;
+ }
+
+ // add image copyright
+ const copyright = $(e).find('.story-image-copyright');
+ if (copyright.length > 0) {
+ message += ` ©${$(copyright[0]).text().trim()}`;
+ }
}
message += '</figcaption></figure>';
@@ -108,6 +116,10 @@ const ProcessFeed = ($, link) => {
// handle lazy-loading images
ProcessImage($, e, '.js-delayed-image-load');
+ ProcessImage($, e, 'div > div > div > img');
+
+ ProcessImage($, e, 'div > div > div > noscript', true);
+
ProcessVideo($, e, 'figure.media-with-caption > div.player-with-placeholder');
$(e).remove();
|
29550da458c08c20c1acba49b7a94dd4d741f620
|
2021-02-01 03:39:16
|
Steven Tang
|
feat: Adding UMASS Amherst ECE seminar (#6809)
| false
|
Adding UMASS Amherst ECE seminar (#6809)
|
feat
|
diff --git a/assets/radar-rules.js b/assets/radar-rules.js
index 59aedff58012ac..831eb392fa707b 100644
--- a/assets/radar-rules.js
+++ b/assets/radar-rules.js
@@ -2165,6 +2165,12 @@
source: '/news',
target: '/umass/amherst/ecenews',
},
+ {
+ title: 'ECE Seminar',
+ docs: 'http://docs.rsshub.app/en/university.html#umass-amherst',
+ source: '/seminars',
+ target: '/umass/amherst/eceseminar',
+ },
],
'www.cics': [
{
diff --git a/docs/en/university.md b/docs/en/university.md
index d46ee4ca382377..79f0bf022df9ba 100644
--- a/docs/en/university.md
+++ b/docs/en/university.md
@@ -30,10 +30,18 @@ pageClass: routes
## UMASS Amherst
-### College of Electrical and Computer Engineering News
+### College of Electrical and Computer Engineering
+
+#### News
<RouteEn author="gammapi" example="/umass/amherst/ecenews" path="/umass/amherst/ecenews" radar="1" rssbud="1"/>
+#### Seminar
+
+<RouteEn author="gammapi" example="/umass/amherst/eceseminar" path="/umass/amherst/eceseminar" radar="1" rssbud="1"/>
+
+Note:[Source website](https://ece.umass.edu/seminar) may be empty when there's no upcoming seminars. This is normal and will cause rsshub fail to fetch this feed.
+
### College of Information & Computer Sciences News
<RouteEn author="gammapi" example="/umass/amherst/csnews" path="/umass/amherst/csnews" radar="1" rssbud="1"/>
diff --git a/docs/university.md b/docs/university.md
index 2c669970975fff..121d71f36adfb9 100644
--- a/docs/university.md
+++ b/docs/university.md
@@ -980,10 +980,18 @@ jsjxy.hbut.edu.cn 证书链不全,自建 RSSHub 可设置环境变量 NODE_TLS
## 马萨诸塞大学 阿默斯特分校 (UMASS Amherst)
-### 电子与计算机工程系新闻
+### 电子与计算机工程系
+
+#### 新闻
<Route author="gammapi" example="/umass/amherst/ecenews" path="/umass/amherst/ecenews" radar="1" rssbud="1"/>
+#### 研讨会
+
+<Route author="gammapi" example="/umass/amherst/eceseminar" path="/umass/amherst/eceseminar" radar="1" rssbud="1"/>
+
+注:[源站](https://ece.umass.edu/seminar)在未公布研讨会计划时会清空页面导致 Rsshub 抓取不到内容,此属正常现象。
+
### 信息与计算机科学系新闻
<Route author="gammapi" example="/umass/amherst/csnews" path="/umass/amherst/csnews" radar="1" rssbud="1"/>
diff --git a/lib/router.js b/lib/router.js
index 500a6416c40845..9738b84c2aa1c1 100644
--- a/lib/router.js
+++ b/lib/router.js
@@ -2908,6 +2908,7 @@ router.get('/rf/article', require('./routes/rf/article'));
// University of Massachusetts Amherst
router.get('/umass/amherst/ecenews', require('./routes/umass/amherst/ecenews'));
+router.get('/umass/amherst/eceseminar', require('./routes/umass/amherst/eceseminar'));
router.get('/umass/amherst/csnews', require('./routes/umass/amherst/csnews'));
router.get('/umass/amherst/ipoevents', require('./routes/umass/amherst/ipoevents'));
router.get('/umass/amherst/ipostories', require('./routes/umass/amherst/ipostories'));
diff --git a/lib/routes/umass/amherst/eceseminar.js b/lib/routes/umass/amherst/eceseminar.js
new file mode 100644
index 00000000000000..ae9b5a09a14ba9
--- /dev/null
+++ b/lib/routes/umass/amherst/eceseminar.js
@@ -0,0 +1,40 @@
+const got = require('@/utils/got');
+const cheerio = require('cheerio');
+
+module.exports = async (ctx) => {
+ const response = await got({
+ method: 'get',
+ url: 'http://ece.umass.edu/seminars',
+ });
+
+ const data = response.data;
+
+ const $ = cheerio.load(data);
+ const list = $('.view-seminar-events .views-row');
+
+ ctx.state.data = {
+ title: 'UMAmherst-ECESeminar',
+ link: 'https://ece.umass.edu/seminars',
+ item:
+ list &&
+ list
+ .map((index, item) => {
+ item = $(item);
+
+ const eventDate = item.find('.views-field-field-datetime .date-display-single').first().attr('content');
+ return {
+ title: item.find('.views-field-title').first().text() + ' | ' + item.find('.views-field-field-title2').first().text(),
+ description:
+ '<br/>Presenter: ' +
+ item.find('.views-field-field-presenter').first().text() +
+ '<br/>Date:' +
+ item.find('.views-field-field-datetime').first().text() +
+ '<br/>Location:' +
+ item.find('.views-field-field-location').first().text(),
+ link: item.find('.views-field-title a').attr('href'),
+ pubDate: new Date(Date.parse(eventDate)).toUTCString(),
+ };
+ })
+ .get(),
+ };
+};
|
3e2d3f1d8c590d616f6f7e8274bccc1df94b1669
|
2020-09-01 18:41:17
|
dependabot-preview[bot]
|
chore(deps-dev): bump eslint from 7.7.0 to 7.8.0
| false
|
bump eslint from 7.7.0 to 7.8.0
|
chore
|
diff --git a/package.json b/package.json
index 7b1f01c000ceb5..86311b800df26a 100644
--- a/package.json
+++ b/package.json
@@ -42,7 +42,7 @@
"@vuepress/plugin-pwa": "1.5.4",
"cross-env": "7.0.2",
"entities": "2.0.3",
- "eslint": "7.7.0",
+ "eslint": "7.8.0",
"eslint-config-prettier": "6.11.0",
"eslint-plugin-prettier": "3.1.4",
"jest": "26.4.2",
diff --git a/yarn.lock b/yarn.lock
index a627a9f96e8c85..2dde3156a19622 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -1053,6 +1053,16 @@
enabled "2.0.x"
kuler "^2.0.0"
+"@eslint/eslintrc@^0.1.0":
+ version "0.1.0"
+ resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-0.1.0.tgz#3d1f19fb797d42fb1c85458c1c73541eeb1d9e76"
+ integrity sha512-bfL5365QSCmH6cPeFT7Ywclj8C7LiF7sO6mUGzZhtAMV7iID1Euq6740u/SRi4C80NOnVz/CEfK8/HO+nCAPJg==
+ dependencies:
+ ajv "^6.12.4"
+ debug "^4.1.1"
+ import-fresh "^3.2.1"
+ strip-json-comments "^3.1.1"
+
"@hapi/[email protected]":
version "2.0.0"
resolved "https://registry.yarnpkg.com/@hapi/address/-/address-2.0.0.tgz#9f05469c88cb2fd3dcd624776b54ee95c312126a"
@@ -2233,11 +2243,16 @@ acorn@^6.0.1, acorn@^6.0.5:
resolved "https://registry.yarnpkg.com/acorn/-/acorn-6.1.1.tgz#7d25ae05bb8ad1f9b699108e1094ecd7884adc1f"
integrity sha512-jPTiwtOxaHNaAPg/dmrJ/beuzLRnXtB0kQPQ8JpotKJgTB6rX6c8mlf315941pyjBSaPg8NHXS9fhP4u17DpGA==
-acorn@^7.1.1, acorn@^7.3.1:
+acorn@^7.1.1:
version "7.3.1"
resolved "https://registry.yarnpkg.com/acorn/-/acorn-7.3.1.tgz#85010754db53c3fbaf3b9ea3e083aa5c5d147ffd"
integrity sha512-tLc0wSnatxAQHVHUapaHdz72pi9KUyHjq5KyHjGg9Y8Ifdc79pTh2XvI6I1/chZbnM7QtNKzh66ooDogPZSleA==
+acorn@^7.4.0:
+ version "7.4.0"
+ resolved "https://registry.yarnpkg.com/acorn/-/acorn-7.4.0.tgz#e1ad486e6c54501634c6c397c5c121daa383607c"
+ integrity sha512-+G7P8jJmCHr+S+cLfQxygbWhXy+8YTVGzAkpEbcLo2mLoL7tij/VG41QSHACSf5QgYRhMZYHuNc6drJaO0Da+w==
+
[email protected]:
version "3.1.2"
resolved "https://registry.yarnpkg.com/aes-js/-/aes-js-3.1.2.tgz#db9aabde85d5caabbfc0d4f2a4446960f627146a"
@@ -2270,12 +2285,12 @@ ajv-keywords@^3.1.0:
resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-3.4.0.tgz#4b831e7b531415a7cc518cd404e73f6193c6349d"
integrity sha512-aUjdRFISbuFOl0EIZc+9e4FfZp0bDZgAdOOf30bJmw8VM9v84SHyVyxDfbWxpGYbdZD/9XoKxfHVNmxPkhwyGw==
-ajv@^6.1.0, ajv@^6.10.0, ajv@^6.5.5, ajv@^6.9.1:
- version "6.10.1"
- resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.10.1.tgz#ebf8d3af22552df9dd049bfbe50cc2390e823593"
- integrity sha512-w1YQaVGNC6t2UCPjEawK/vo/dG8OOrVtUmhBT1uJJYxbl5kU2Tj3v6LGqBcsysN1yhuCStJCCA3GqdvKY8sqXQ==
+ajv@^6.1.0, ajv@^6.10.0, ajv@^6.12.4, ajv@^6.5.5, ajv@^6.9.1:
+ version "6.12.4"
+ resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.4.tgz#0614facc4522127fa713445c6bfd3ebd376e2234"
+ integrity sha512-eienB2c9qVQs2KWexhkrdMLVDoIQCz5KSeLxwg9Lzk4DOfBtIK9PQwwufcsn1jjGuf9WZmqPMbGxOzfcuphJCQ==
dependencies:
- fast-deep-equal "^2.0.1"
+ fast-deep-equal "^3.1.1"
fast-json-stable-stringify "^2.0.0"
json-schema-traverse "^0.4.1"
uri-js "^4.2.2"
@@ -4899,12 +4914,13 @@ eslint-visitor-keys@^1.1.0, eslint-visitor-keys@^1.3.0:
resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz#30ebd1ef7c2fdff01c3a4f151044af25fab0523e"
integrity sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==
[email protected]:
- version "7.7.0"
- resolved "https://registry.yarnpkg.com/eslint/-/eslint-7.7.0.tgz#18beba51411927c4b64da0a8ceadefe4030d6073"
- integrity sha512-1KUxLzos0ZVsyL81PnRN335nDtQ8/vZUD6uMtWbF+5zDtjKcsklIi78XoE0MVL93QvWTu+E5y44VyyCsOMBrIg==
[email protected]:
+ version "7.8.0"
+ resolved "https://registry.yarnpkg.com/eslint/-/eslint-7.8.0.tgz#9a3e2e6e4d0a3f8c42686073c25ebf2e91443e8a"
+ integrity sha512-qgtVyLZqKd2ZXWnLQA4NtVbOyH56zivOAdBFWE54RFkSZjokzNrcP4Z0eVWsZ+84ByXv+jL9k/wE1ENYe8xRFw==
dependencies:
"@babel/code-frame" "^7.0.0"
+ "@eslint/eslintrc" "^0.1.0"
ajv "^6.10.0"
chalk "^4.0.0"
cross-spawn "^7.0.2"
@@ -4914,7 +4930,7 @@ [email protected]:
eslint-scope "^5.1.0"
eslint-utils "^2.1.0"
eslint-visitor-keys "^1.3.0"
- espree "^7.2.0"
+ espree "^7.3.0"
esquery "^1.2.0"
esutils "^2.0.2"
file-entry-cache "^5.0.1"
@@ -4941,12 +4957,12 @@ [email protected]:
text-table "^0.2.0"
v8-compile-cache "^2.0.3"
-espree@^7.2.0:
- version "7.2.0"
- resolved "https://registry.yarnpkg.com/espree/-/espree-7.2.0.tgz#1c263d5b513dbad0ac30c4991b93ac354e948d69"
- integrity sha512-H+cQ3+3JYRMEIOl87e7QdHX70ocly5iW4+dttuR8iYSPr/hXKFb+7dBsZ7+u1adC4VrnPlTkv0+OwuPnDop19g==
+espree@^7.3.0:
+ version "7.3.0"
+ resolved "https://registry.yarnpkg.com/espree/-/espree-7.3.0.tgz#dc30437cf67947cf576121ebd780f15eeac72348"
+ integrity sha512-dksIWsvKCixn1yrEXO8UosNSxaDoSYpq9reEjZSbHLpT5hpaCAKTLBwq0RHtLrIr+c0ByiYzWT8KTMRzoRCNlw==
dependencies:
- acorn "^7.3.1"
+ acorn "^7.4.0"
acorn-jsx "^5.2.0"
eslint-visitor-keys "^1.3.0"
@@ -5216,10 +5232,10 @@ [email protected]:
oauth-1.0a "^2.2.5"
query-string "^6.2.0"
-fast-deep-equal@^2.0.1:
- version "2.0.1"
- resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz#7b05218ddf9667bf7f370bf7fdb2cb15fdd0aa49"
- integrity sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=
+fast-deep-equal@^3.1.1:
+ version "3.1.3"
+ resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525"
+ integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==
fast-diff@^1.1.2:
version "1.2.0"
@@ -6383,10 +6399,10 @@ import-fresh@^2.0.0:
caller-path "^2.0.0"
resolve-from "^3.0.0"
-import-fresh@^3.0.0:
- version "3.0.0"
- resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-3.0.0.tgz#a3d897f420cab0e671236897f75bc14b4885c390"
- integrity sha512-pOnA9tfM3Uwics+SaBLCNyZZZbK+4PTu0OPZtLlMIrv17EdBoC15S9Kn8ckJ9TZTyKb3ywNE5y1yeDxxGA7nTQ==
+import-fresh@^3.0.0, import-fresh@^3.2.1:
+ version "3.2.1"
+ resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-3.2.1.tgz#633ff618506e793af5ac91bf48b72677e15cbe66"
+ integrity sha512-6e1q1cnWP2RXD9/keSkxHScg508CdXqXWgWBaETNhyuBFz+kUZlKboh+ISK+bU++DmbHimVBrOz/zzPe0sZ3sQ==
dependencies:
parent-module "^1.0.0"
resolve-from "^4.0.0"
@@ -11510,10 +11526,10 @@ strip-indent@^2.0.0:
resolved "https://registry.yarnpkg.com/strip-indent/-/strip-indent-2.0.0.tgz#5ef8db295d01e6ed6cbf7aab96998d7822527b68"
integrity sha1-XvjbKV0B5u1sv3qrlpmNeCJSe2g=
-strip-json-comments@^3.1.0:
- version "3.1.0"
- resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.0.tgz#7638d31422129ecf4457440009fba03f9f9ac180"
- integrity sha512-e6/d0eBu7gHtdCqFt0xJr642LdToM5/cN4Qb9DbHjVx1CP5RyeM+zH7pbecEmDv/lBqb0QH+6Uqq75rxFPkM0w==
+strip-json-comments@^3.1.0, strip-json-comments@^3.1.1:
+ version "3.1.1"
+ resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006"
+ integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==
strip-json-comments@~2.0.1:
version "2.0.1"
|
bb3d1b49c7721b75df7fc6101a29f2bb50836236
|
2024-06-10 22:41:47
|
Tony
|
fix(route): finviz (#15867)
| false
|
finviz (#15867)
|
fix
|
diff --git a/lib/routes/finviz/news.ts b/lib/routes/finviz/news.ts
index 8ef797301c5459..a6068a58bf2ed9 100644
--- a/lib/routes/finviz/news.ts
+++ b/lib/routes/finviz/news.ts
@@ -32,9 +32,9 @@ export const route: Route = {
maintainers: ['nczitzk'],
handler,
url: 'finviz.com/news.ashx',
- description: `| News | Blog |
+ description: `| News | Blogs |
| ---- | ---- |
- | news | blog |`,
+ | news | blogs |`,
};
async function handler(ctx) {
@@ -54,7 +54,7 @@ async function handler(ctx) {
const items = $('table.table-fixed')
.eq(categories[category.toLowerCase()])
- .find('tr.nn')
+ .find('tr')
.slice(0, limit)
.toArray()
.map((item) => {
@@ -77,7 +77,7 @@ async function handler(ctx) {
link: a.prop('href'),
description: descriptionMatches ? descriptionMatches[1] : undefined,
author: authorMatches ? authorMatches[1].replaceAll('-', ' ') : 'finviz',
- pubDate: timezone(parseDate(item.find('td.nn-date').text(), ['HH:mmA', 'MMM-DD']), -4),
+ pubDate: timezone(parseDate(item.find('td.news_date-cell').text(), ['HH:mmA', 'MMM-DD']), -4),
};
})
.filter((item) => item.title);
|
d1873d5b94b5aa35c2ae57f52aba49f95d05c4b3
|
2022-02-19 14:29:39
|
github-actions[bot]
|
style: auto format
| false
|
auto format
|
style
|
diff --git a/docs/new-media.md b/docs/new-media.md
index 16d4f12e09bdd0..e09bad069dbd88 100644
--- a/docs/new-media.md
+++ b/docs/new-media.md
@@ -840,7 +840,7 @@ IPFS 网关有可能失效,那时候换成其他网关。
<Route author="nczitzk" example="/panewslab" path="/panewslab/:category?" :paramsDesc="['分类,见下表,默认为精选']">
| DAO | 元宇宙 | DeFi | Layer 2 | 链游 | 波卡 | NFT | 央行数字货币 | 融资 | 活动 | 监管 |
-| --- | ------ | ---- | ------- | ---- | ---- | --- | ------------ | ---- | ---- | ---- |
+| --- | --- | ---- | ------- | -- | -- | --- | ------ | -- | -- | -- |
</Route>
|
b676ae57af35adbec7892523b1b131ae8158d0eb
|
2022-07-12 16:18:58
|
Ethan Shen
|
fix(route): 后续 (#10180)
| false
|
后续 (#10180)
|
fix
|
diff --git a/docs/new-media.md b/docs/new-media.md
index 8c69926a173b7a..3d3e513213ea29 100644
--- a/docs/new-media.md
+++ b/docs/new-media.md
@@ -2178,23 +2178,21 @@ others = 热点新闻 + 滚动新闻
## 后续
-### 分类
+### 热点
-<Route author="nczitzk" example="/houxu" path="/houxu/:category?" :paramsDesc="['分类,见下表,默认为首页']">
+<Route author="nczitzk" example="/houxu" path="/houxu" />
-| 首页 | 热点 | 跟踪 | 事件 |
-| ----- | -------- | ------ | ------ |
-| index | featured | memory | events |
+### 跟踪
-</Route>
+<Route author="nczitzk" example="/houxu/memory" path="/houxu/memory" />
-### Lives
+### 专栏
-<Route author="ciaranchen sanmmm nczitzk" example="/houxu/lives/33899" path="/houxu/:category?" :paramsDesc="['编号,可在对应 Live 页面的 URL 中找到']"/>
+<Route author="ciaranchen nczitzk" example="/houxu/events" path="/houxu/events"/>
-### 最新专栏
+### Live
-<Route author="ciaranchen" example="/houxu/events" path="/houxu/events"/>
+<Route author="ciaranchen sanmmm nczitzk" example="/houxu/lives/33899" path="/houxu/lives/:id" :paramsDesc="['编号,可在对应 Live 页面的 URL 中找到']"/>
## 虎嗅
diff --git a/lib/v2/houxu/events.js b/lib/v2/houxu/events.js
new file mode 100644
index 00000000000000..d41f7be8e77b25
--- /dev/null
+++ b/lib/v2/houxu/events.js
@@ -0,0 +1,37 @@
+const got = require('@/utils/got');
+const { parseDate } = require('@/utils/parse-date');
+const { art } = require('@/utils/render');
+const path = require('path');
+
+module.exports = async (ctx) => {
+ const rootUrl = 'https://houxu.app';
+ const apiUrl = `${rootUrl}/api/1/events?limit=${ctx.query.limit ?? 50}`;
+ const currentUrl = `${rootUrl}/events`;
+
+ const response = await got({
+ method: 'get',
+ url: apiUrl,
+ });
+
+ const items = response.data.results.map((item) => ({
+ guid: `${rootUrl}/events/${item.id}#${item.last_thread.id}`,
+ title: item.title,
+ link: `${rootUrl}/events/${item.id}`,
+ author: item.creator.name,
+ category: item.tags,
+ pubDate: parseDate(item.update_at),
+ description: art(path.join(__dirname, 'templates/events.art'), {
+ title: item.title,
+ description: item.description,
+ linkTitle: item.last_thread.link_title,
+ content: item.last_thread.title.replace(/\r\n/g, '<br>'),
+ pubDate: item.update_at,
+ }),
+ }));
+
+ ctx.state.data = {
+ title: '后续 - 专栏',
+ link: currentUrl,
+ item: items,
+ };
+};
diff --git a/lib/v2/houxu/index.js b/lib/v2/houxu/index.js
index 2e6cf1400bd74b..a82e1816bf8fe0 100644
--- a/lib/v2/houxu/index.js
+++ b/lib/v2/houxu/index.js
@@ -1,85 +1,37 @@
const got = require('@/utils/got');
-const path = require('path');
-const { art } = require('@/utils/render');
const { parseDate } = require('@/utils/parse-date');
-
-const categories = {
- index: '首页',
- featured: '热点',
- updated: '跟踪',
- memory: '跟踪',
- events: '事件',
-};
+const { art } = require('@/utils/render');
+const path = require('path');
module.exports = async (ctx) => {
- const category = ctx.params.category ?? 'index';
- const id = ctx.params.id ?? '';
- let title,
- description,
- author = '';
-
const rootUrl = 'https://houxu.app';
- const currentUrl = `${rootUrl}/api/1/${id ? `lives/${id}/threads` : category === 'events' ? category : category === 'updated' || category === 'memory' ? 'lives/updated' : `records/${category}`}/?limit=${ctx.query.limit ?? 30}`;
+ const apiUrl = `${rootUrl}/api/1/records/index?limit=${ctx.query.limit ?? 50}`;
const response = await got({
method: 'get',
- url: currentUrl,
+ url: apiUrl,
});
- let items = response.data.results.map((item) => ({
- guid: item.object?.id ?? item.id,
- title: item.link?.title ?? item.object?.title ?? item.title,
- link: item.link?.url ?? `${rootUrl}/lives/${item.object?.id ?? item.id}`,
- pubDate: parseDate(item.create_at ?? item.object?.create_at ?? item.publish_at),
- description: `<p>${item.link?.description ?? item.object?.summary ?? item.last?.link.description ?? item.description}</p>`,
- author: item.link?.source ?? item.link?.media?.name ?? item.object?.creator?.username ?? item.object?.creator?.name ?? item.creator?.username ?? item.creator?.name ?? '',
+ const items = response.data.results.map((item) => ({
+ guid: `${rootUrl}/lives/${item.object.id}#${item.object.last.id}`,
+ title: item.object.title,
+ link: `${rootUrl}/lives/${item.object.id}`,
+ author: item.object.last.link.source ?? item.object.last.link.media.name,
+ pubDate: parseDate(item.object.news_update_at),
+ description: art(path.join(__dirname, 'templates/lives.art'), {
+ title: item.object.title,
+ description: item.object.summary,
+ url: item.object.last.link.url,
+ linkTitle: item.object.last.link.title,
+ source: item.object.last.link.source ?? item.object.last.link.media.name,
+ content: item.object.last.link.description.replace(/\r\n/g, '<br>'),
+ pubDate: item.object.news_update_at,
+ }),
}));
- if (id) {
- const detailResponse = await got({
- method: 'get',
- url: `${rootUrl}/api/1/lives/${id}`,
- });
-
- title = detailResponse.data.title;
- description = detailResponse.data.summary;
- author = detailResponse.data.creator.name;
- } else {
- items = await Promise.all(
- items.map((item) =>
- ctx.cache.tryGet(item.guid, async () => {
- try {
- const detailResponse = await got({
- method: 'get',
- url: `${rootUrl}/api/1/lives/${item.guid}/threads/?limit=1000`,
- });
-
- const feeds = detailResponse.data.results.map((item) =>
- art(path.join(__dirname, 'templates/description.art'), {
- title: item.link.title,
- link: item.link.url,
- pubDate: parseDate(item.create_at),
- description: `<p>${item.link.description}</p>`,
- author: item.link.source ?? item.link.media?.name ?? '',
- })
- );
-
- item.description = feeds.join('');
-
- return item;
- } catch (e) {
- return Promise.resolve('');
- }
- })
- )
- );
- }
-
ctx.state.data = {
- title: `${title || categories[category]} - 后续`,
- link: currentUrl,
+ title: '后续 - 热点',
+ link: rootUrl,
item: items,
- description,
- author,
};
};
diff --git a/lib/v2/houxu/lives.js b/lib/v2/houxu/lives.js
new file mode 100644
index 00000000000000..d3c0b5f3a7981c
--- /dev/null
+++ b/lib/v2/houxu/lives.js
@@ -0,0 +1,35 @@
+const got = require('@/utils/got');
+const { parseDate } = require('@/utils/parse-date');
+
+module.exports = async (ctx) => {
+ const id = ctx.params.id;
+
+ const rootUrl = 'https://houxu.app';
+ const apiUrl = `${rootUrl}/api/1/lives/${id}`;
+ const currentUrl = `${rootUrl}/lives/${id}`;
+
+ const pageResponse = await got({
+ method: 'get',
+ url: apiUrl,
+ });
+
+ const response = await got({
+ method: 'get',
+ url: `${apiUrl}/threads?limit=${ctx.query.limit ?? 500}`,
+ });
+
+ const items = response.data.results.map((item) => ({
+ title: item.link.title,
+ link: item.link.url,
+ author: item.link.source ?? item.link.media.name,
+ pubDate: parseDate(item.create_at),
+ description: item.link.description,
+ }));
+
+ ctx.state.data = {
+ title: `后续 - ${pageResponse.data.title}`,
+ link: currentUrl,
+ item: items,
+ description: pageResponse.data.summary,
+ };
+};
diff --git a/lib/v2/houxu/maintainer.js b/lib/v2/houxu/maintainer.js
index c854b393eeaff3..7be117fc53f3b4 100644
--- a/lib/v2/houxu/maintainer.js
+++ b/lib/v2/houxu/maintainer.js
@@ -1,4 +1,6 @@
module.exports = {
- '/lives/:id?': ['nczitzk'],
- '/:category?': ['nczitzk'],
+ '/events': ['nczitzk'],
+ '/lives/:id': ['nczitzk'],
+ '/memory': ['nczitzk'],
+ '/': ['nczitzk'],
};
diff --git a/lib/v2/houxu/memory.js b/lib/v2/houxu/memory.js
new file mode 100644
index 00000000000000..b988e166f8fdb5
--- /dev/null
+++ b/lib/v2/houxu/memory.js
@@ -0,0 +1,37 @@
+const got = require('@/utils/got');
+const { parseDate } = require('@/utils/parse-date');
+const { art } = require('@/utils/render');
+const path = require('path');
+
+module.exports = async (ctx) => {
+ const rootUrl = 'https://houxu.app';
+ const apiUrl = `${rootUrl}/api/1/lives/updated?limit=${ctx.query.limit ?? 50}`;
+ const currentUrl = `${rootUrl}/memory`;
+
+ const response = await got({
+ method: 'get',
+ url: apiUrl,
+ });
+
+ const items = response.data.results.map((item) => ({
+ guid: `${rootUrl}/lives/${item.id}#${item.last.id}`,
+ title: item.last.link.title,
+ link: `${rootUrl}/lives/${item.id}`,
+ author: item.last.link.source,
+ category: [item.title],
+ pubDate: parseDate(item.last.create_at),
+ description: art(path.join(__dirname, 'templates/memory.art'), {
+ live: item.title,
+ url: item.last.link.url,
+ title: item.last.link.title,
+ source: item.last.link.source,
+ description: item.last.link.description,
+ }),
+ }));
+
+ ctx.state.data = {
+ title: '后续 - 跟踪',
+ link: currentUrl,
+ item: items,
+ };
+};
diff --git a/lib/v2/houxu/radar.js b/lib/v2/houxu/radar.js
index 344e683f8e3491..467c012b7d2381 100644
--- a/lib/v2/houxu/radar.js
+++ b/lib/v2/houxu/radar.js
@@ -3,14 +3,26 @@ module.exports = {
_name: '后续',
'.': [
{
- title: '分类',
- docs: 'https://docs.rsshub.app/new-media.html#hou-xu-fen-lei',
- source: ['/:category', '/'],
- target: '/houxu/:category?',
+ title: '热点',
+ docs: 'https://docs.rsshub.app/new-media.html#hou-xu-re-dian',
+ source: ['/'],
+ target: '/houxu',
},
{
- title: 'Lives',
- docs: 'https://docs.rsshub.app/new-media.html#hou-xu-lives',
+ title: '跟踪',
+ docs: 'https://docs.rsshub.app/new-media.html#hou-xu-gen-zong',
+ source: ['/memory', '/'],
+ target: '/houxu/memory',
+ },
+ {
+ title: '专栏',
+ docs: 'https://docs.rsshub.app/new-media.html#hou-xu-zhuan-lan',
+ source: ['/events', '/'],
+ target: '/houxu/events',
+ },
+ {
+ title: 'Live',
+ docs: 'https://docs.rsshub.app/new-media.html#hou-xu-live',
source: ['/lives/:id', '/'],
target: '/houxu/lives/:id',
},
diff --git a/lib/v2/houxu/router.js b/lib/v2/houxu/router.js
index 3ceee154c8bfac..772d0117122a81 100644
--- a/lib/v2/houxu/router.js
+++ b/lib/v2/houxu/router.js
@@ -1,3 +1,8 @@
module.exports = function (router) {
- router.get('/:category?/:id?', require('./index'));
+ router.get('/events', require('./events'));
+ router.get('/featured', require('./index'));
+ router.get('/index', require('./index'));
+ router.get('/lives/:id', require('./lives'));
+ router.get('/memory', require('./memory'));
+ router.get('/', require('./index'));
};
diff --git a/lib/v2/houxu/templates/description.art b/lib/v2/houxu/templates/description.art
deleted file mode 100644
index 2003f293eef873..00000000000000
--- a/lib/v2/houxu/templates/description.art
+++ /dev/null
@@ -1,9 +0,0 @@
-<div>
- <h3>
- <a href="{{ link }}">{{ title }}</a>
- </h3>
- <p>{{ description }}</p>
- <small><b>来源</b> {{ author }}</small>
- <br>
- <small><b>时间</b> {{ pubDate }}</small>
-</div>
\ No newline at end of file
diff --git a/lib/v2/houxu/templates/events.art b/lib/v2/houxu/templates/events.art
new file mode 100644
index 00000000000000..0014cd8051b0d6
--- /dev/null
+++ b/lib/v2/houxu/templates/events.art
@@ -0,0 +1,5 @@
+<h1>{{ title }}</h1>
+<p>{{ description }}</p>
+<b>Latest: {{ linkTitle }}</b>
+<p>{{@ content }}</p>
+<small>{{ pubDate }}</small>
\ No newline at end of file
diff --git a/lib/v2/houxu/templates/lives.art b/lib/v2/houxu/templates/lives.art
new file mode 100644
index 00000000000000..d2509f5d96c943
--- /dev/null
+++ b/lib/v2/houxu/templates/lives.art
@@ -0,0 +1,5 @@
+<h1>{{ title }}</h1>
+<p>{{ description }}</p>
+<b>Latest: <a href="{{ url }}">{{ linkTitle }}</a>{{ if source }} ({{ source }}){{ /if }}</b>
+<p>{{@ content }}</p>
+<small>{{ pubDate }}</small>
\ No newline at end of file
diff --git a/lib/v2/houxu/templates/memory.art b/lib/v2/houxu/templates/memory.art
new file mode 100644
index 00000000000000..1a209ae7cf8e5f
--- /dev/null
+++ b/lib/v2/houxu/templates/memory.art
@@ -0,0 +1,3 @@
+<h1>{{ live }}</h1>
+<b><a href="{{ url }}">{{ title }}</a>{{ if source }} ({{ source }}){{ /if }}</b>
+<p>{{ description }}</p>
\ No newline at end of file
|
fea53e9716b6d8156cbebf8fc7e2ae5cf5d33635
|
2024-03-18 14:24:07
|
qixingchen
|
fix: DIYgod/RSSHub-Radar#953 (#14828)
| false
|
DIYgod/RSSHub-Radar#953 (#14828)
|
fix
|
diff --git a/lib/routes/github/comments.ts b/lib/routes/github/comments.ts
index cb9b618bee5960..929204ea0fbaeb 100644
--- a/lib/routes/github/comments.ts
+++ b/lib/routes/github/comments.ts
@@ -31,8 +31,8 @@ export const route: Route = {
},
radar: [
{
- source: ['github.com/:user/:repo/:type'],
- target: '/comments/:user/:repo',
+ source: ['github.com/:user/:repo/:type', 'github.com/:user/:repo/:type/:number'],
+ target: '/comments/:user/:repo/:number?',
},
],
name: 'Issue / Pull Request comments',
|
dcc3c802949bd8b819992bfc75a248eab7f7406c
|
2022-05-04 02:49:21
|
dependabot[bot]
|
chore(deps): bump markdown-it from 13.0.0 to 13.0.1 (#9688)
| false
|
bump markdown-it from 13.0.0 to 13.0.1 (#9688)
|
chore
|
diff --git a/package.json b/package.json
index e9731b2319f584..dfd1c120bfe6ea 100644
--- a/package.json
+++ b/package.json
@@ -113,7 +113,7 @@
"lru-cache": "7.9.0",
"lz-string": "1.4.4",
"mailparser": "3.5.0",
- "markdown-it": "13.0.0",
+ "markdown-it": "13.0.1",
"module-alias": "2.2.2",
"parse-torrent": "9.1.5",
"pidusage": "3.0.0",
diff --git a/yarn.lock b/yarn.lock
index bd5ea4e3651813..75536a6a66feb9 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -8794,7 +8794,7 @@ linkify-it@^2.0.0:
dependencies:
uc.micro "^1.0.1"
-linkify-it@^4.0.0:
+linkify-it@^4.0.1:
version "4.0.1"
resolved "https://registry.yarnpkg.com/linkify-it/-/linkify-it-4.0.1.tgz#01f1d5e508190d06669982ba31a7d9f56a5751ec"
integrity sha512-C7bfi1UZmoj8+PQx22XyeXCuBlokoyWQL5pWSP+EI6nzRylyThouddufc2c1NDIcP9k5agmN9fLpA7VNJfIiqw==
@@ -9155,14 +9155,14 @@ markdown-it-table-of-contents@^0.4.0:
resolved "https://registry.yarnpkg.com/markdown-it-table-of-contents/-/markdown-it-table-of-contents-0.4.4.tgz#3dc7ce8b8fc17e5981c77cc398d1782319f37fbc"
integrity sha512-TAIHTHPwa9+ltKvKPWulm/beozQU41Ab+FIefRaQV1NRnpzwcV9QOe6wXQS5WLivm5Q/nlo0rl6laGkMDZE7Gw==
[email protected]:
- version "13.0.0"
- resolved "https://registry.yarnpkg.com/markdown-it/-/markdown-it-13.0.0.tgz#f0803ded286980dc9f35972dad159cc4e64848f6"
- integrity sha512-WArlIpVFvVwb8t3wgJuOsbMLhNWlzuQM7H2qXmuUEnBtXRqKjLjwFUMbZOyJgHygVZSjvcLR4EcXcRilqMavrA==
[email protected]:
+ version "13.0.1"
+ resolved "https://registry.yarnpkg.com/markdown-it/-/markdown-it-13.0.1.tgz#c6ecc431cacf1a5da531423fc6a42807814af430"
+ integrity sha512-lTlxriVoy2criHP0JKRhO2VDG9c2ypWCsT237eDiLqi09rmbKoUetyGHq2uOIRoRS//kfoJckS0eUzzkDR+k2Q==
dependencies:
argparse "^2.0.1"
entities "~3.0.1"
- linkify-it "^4.0.0"
+ linkify-it "^4.0.1"
mdurl "^1.0.1"
uc.micro "^1.0.5"
|
1ff059df0ae94aca14ad80f8fecceb427fc8b000
|
2024-09-22 19:53:56
|
Jiang Yiming
|
feat(route): add 山青学生在线、山大研工部、山大国际网站 (#16812)
| false
|
add 山青学生在线、山大研工部、山大国际网站 (#16812)
|
feat
|
diff --git a/lib/routes/sdu/gjsw.ts b/lib/routes/sdu/gjsw.ts
new file mode 100644
index 00000000000000..3aaaa82ebcacb4
--- /dev/null
+++ b/lib/routes/sdu/gjsw.ts
@@ -0,0 +1,80 @@
+import { Route } from '@/types';
+import cache from '@/utils/cache';
+import got from '@/utils/got';
+import { load } from 'cheerio';
+import { parseDate } from '@/utils/parse-date';
+import { finishArticleItem } from '@/utils/wechat-mp';
+
+const host = 'https://www.ipo.sdu.edu.cn/';
+
+const typeMap = {
+ tzgg: {
+ title: '通知公告',
+ url: 'tzgg.htm',
+ },
+};
+
+export const route: Route = {
+ path: '/gjsw/:type?',
+ categories: ['university'],
+ example: '/sdu/gjsw/tzgg',
+ parameters: { type: '默认为`tzgg`' },
+ features: {
+ requireConfig: false,
+ requirePuppeteer: false,
+ antiCrawler: false,
+ supportBT: false,
+ supportPodcast: false,
+ supportScihub: false,
+ },
+ name: '国际事务部',
+ maintainers: ['kukeya'],
+ handler,
+ description: `| 通知公告 |
+ | -------- |
+ | tzgg | `,
+};
+
+async function handler(ctx) {
+ const type = ctx.req.param('type') ?? 'tzgg';
+
+ const link = new URL(typeMap[type].url, host).href;
+ const response = await got(link);
+
+ const $ = load(response.data);
+
+ let item = $('.dqlb ul li')
+ .toArray()
+ .map((e) => {
+ e = $(e);
+ const a = e.find('a');
+ return {
+ title: a.text().trim(),
+ link: a.attr('href').startsWith('wdhcontent') ? host + a.attr('href') : a.attr('href'),
+ pubDate: parseDate(e.find('.fr').text().trim(), 'YYYY-MM-DD'),
+ };
+ });
+
+ item = await Promise.all(
+ item.map((item) =>
+ cache.tryGet(item.link, async () => {
+ const hostname = new URL(item.link).hostname;
+ if (hostname === 'mp.weixin.qq.com') {
+ return finishArticleItem(item);
+ }
+ const response = await got(item.link);
+ const $ = load(response.data);
+ item.description = $('.v_news_content').html();
+
+ return item;
+ })
+ )
+ );
+
+ return {
+ title: `山东大学国际事务部${typeMap[type].title}`,
+ description: $('title').text(),
+ link,
+ item,
+ };
+}
diff --git a/lib/routes/sdu/qd/xszxqd.ts b/lib/routes/sdu/qd/xszxqd.ts
new file mode 100644
index 00000000000000..347479fa212d1d
--- /dev/null
+++ b/lib/routes/sdu/qd/xszxqd.ts
@@ -0,0 +1,98 @@
+import { Route } from '@/types';
+import cache from '@/utils/cache';
+import got from '@/utils/got';
+import { load } from 'cheerio';
+import { parseDate } from '@/utils/parse-date';
+import { finishArticleItem } from '@/utils/wechat-mp';
+
+const host = 'https://www.onlineqd.sdu.edu.cn/';
+
+const typeMap = {
+ 'xttz-yjs': {
+ title: '学团通知-研究生',
+ url: 'list.jsp?urltype=tree.TreeTempUrl&wbtreeid=1027',
+ },
+ 'xttz-bks': {
+ title: '学团通知-本科生',
+ url: 'list.jsp?urltype=tree.TreeTempUrl&wbtreeid=1025',
+ },
+ 'xttz-tx': {
+ title: '学团通知-团学',
+ url: 'list.jsp?urltype=tree.TreeTempUrl&wbtreeid=1026',
+ },
+ 'xttz-xl': {
+ title: '学团通知-心理',
+ url: 'list.jsp?urltype=tree.TreeTempUrl&wbtreeid=1029',
+ },
+ xtyw: {
+ title: '学团要闻',
+ url: 'list.jsp?urltype=tree.TreeTempUrl&wbtreeid=1008',
+ },
+};
+
+export const route: Route = {
+ path: '/qd/xszxqd/:type?',
+ categories: ['university'],
+ example: '/sdu/qd/xszxqd/xtyw',
+ parameters: { type: '默认为`xtyw`' },
+ features: {
+ requireConfig: false,
+ requirePuppeteer: false,
+ antiCrawler: false,
+ supportBT: false,
+ supportPodcast: false,
+ supportScihub: false,
+ },
+ name: '学生在线(青岛)',
+ maintainers: ['kukeya'],
+ handler,
+ description: `| 学团通知-研究生 | 学团通知-本科生 | 学团通知-团学 | 学团通知-心理 | 学团要闻
+ | -------- | -------- |-------- |-------- |-------- |
+ | xttz-yjs | xttz-bks | xttz-tx | xttz-xl | xtyw |`,
+};
+
+async function handler(ctx) {
+ const type = ctx.req.param('type') ?? 'xtyw';
+ const link = new URL(typeMap[type].url, host).href;
+
+ const response = await got(link);
+
+ const $ = load(response.data);
+
+ let item = $('.list_box li')
+ .toArray()
+ .map((e) => {
+ e = $(e);
+ const a = e.find('a');
+ const link = a.attr('href').startsWith('tz_content') || a.attr('href').startsWith('content') ? host + a.attr('href') : a.attr('href');
+ return {
+ title: a.text().trim(),
+ link,
+ pubDate: parseDate(e.find('span').text().trim(), 'YYYY-MM-DD'),
+ };
+ });
+
+ item = await Promise.all(
+ item.map((item) =>
+ cache.tryGet(item.link, async () => {
+ const hostname = new URL(item.link).hostname;
+ if (hostname === 'mp.weixin.qq.com') {
+ return finishArticleItem(item);
+ }
+ const response = await got(item.link);
+ const $ = load(response.data);
+ item.description = $('.v_news_content').html();
+
+ return item;
+ })
+ )
+ );
+
+ return {
+ title: `山东大学学生在线(青岛)${typeMap[type].title}`,
+ description: $('title').text(),
+ link,
+ item,
+ icon: 'https://www.onlineqd.sdu.edu.cn/img/logo.png',
+ };
+}
diff --git a/lib/routes/sdu/ygb.ts b/lib/routes/sdu/ygb.ts
new file mode 100644
index 00000000000000..3a64226b70d023
--- /dev/null
+++ b/lib/routes/sdu/ygb.ts
@@ -0,0 +1,90 @@
+import { Route } from '@/types';
+import cache from '@/utils/cache';
+import got from '@/utils/got';
+import { load } from 'cheerio';
+import { parseDate } from '@/utils/parse-date';
+import { finishArticleItem } from '@/utils/wechat-mp';
+
+const host = 'https://www.ygb.sdu.edu.cn/';
+
+const typeMap = {
+ zytz: {
+ title: '重要通知',
+ url: 'zytz.htm',
+ },
+ glfw: {
+ title: '管理服务',
+ url: 'glfw.htm',
+ },
+ cxsj: {
+ title: '创新实践',
+ url: 'cxsj.htm',
+ },
+};
+
+export const route: Route = {
+ path: '/ygb/:type?',
+ categories: ['university'],
+ example: '/sdu/ygb/zytz',
+ parameters: { type: '默认为`zytz`' },
+ features: {
+ requireConfig: false,
+ requirePuppeteer: false,
+ antiCrawler: false,
+ supportBT: false,
+ supportPodcast: false,
+ supportScihub: false,
+ },
+ name: '研工部',
+ maintainers: ['kukeya'],
+ handler,
+ description: `| 重要通知 | 管理服务 | 创新实践 |
+ | -------- | -------- |-------- |
+ | zytz | glfw | cxsj | `,
+};
+
+async function handler(ctx) {
+ const type = ctx.req.param('type') ?? 'zytz';
+ const link = new URL(typeMap[type].url, host).href;
+
+ const response = await got(link);
+
+ const $ = load(response.data);
+ let item = $('.zytz-list li')
+ .toArray()
+ .map((e) => {
+ e = $(e);
+ const a = e.find('a');
+ const link = a.attr('href').startsWith('info/') || a.attr('href').startsWith('content') ? host + a.attr('href') : a.attr('href');
+ return {
+ title: a.text().trim(),
+ link,
+ pubDate: parseDate(e.find('b').text().trim().slice(1, -1), 'YYYY-MM-DD'),
+ };
+ });
+
+ item = await Promise.all(
+ item.map((item) =>
+ cache.tryGet(item.link, async () => {
+ const hostname = new URL(item.link).hostname;
+ if (hostname === 'mp.weixin.qq.com') {
+ return finishArticleItem(item);
+ }
+ const response = await got(item.link);
+ const $ = load(response.data);
+
+ item.description = $('.v_news_content').html();
+
+ return item;
+ })
+ )
+ );
+
+ return {
+ title: `山东大学研工部${typeMap[type].title}`,
+ description: $('title').text(),
+ link,
+ item,
+ icon: 'https://www.ygb.sdu.edu.cn/img/logo.png',
+ };
+}
|
cd6b5e0f0b87b46e4199c23d455e832712d08e63
|
2023-07-24 01:58:00
|
DIYgod
|
feat: bypass reverse proxy for requests with cookies
| false
|
bypass reverse proxy for requests with cookies
|
feat
|
diff --git a/docs/en/install/README.md b/docs/en/install/README.md
index dcdead4b847953..53e95dcd3bc6b4 100644
--- a/docs/en/install/README.md
+++ b/docs/en/install/README.md
@@ -565,6 +565,12 @@ resolved by the SOCKS server, recommanded, prevents DNS poisoning or DNS leak),
### Reverse proxy
+::: warning
+
+This proxy method cannot proxy requests that contain cookies.
+
+:::
+
`REVERSE_PROXY_URL`: Reverse proxy URL, RSSHub will use this URL as a prefix to initiate requests, for example `https://proxy.example.com?target=`, requests to `https://google.com` will be automatically converted to `https://proxy.example.com?target=https%3A%2F%2Fgoogle.com`
You can use Cloudflare Workers to build a simple reverse proxy, for example:
diff --git a/docs/install/README.md b/docs/install/README.md
index 99ff95a8fd2481..818abce2c3f53a 100644
--- a/docs/install/README.md
+++ b/docs/install/README.md
@@ -585,6 +585,12 @@ RSSHub 支持 `memory` 和 `redis` 两种缓存方式
### 反向代理
+::: warning 注意
+
+这种代理方式无法代理包含 cookie 的请求。
+
+:::
+
`REVERSE_PROXY_URL`: 反向代理地址,RSSHub 将会使用该地址作为前缀来发起请求,例如 `https://proxy.example.com/?target=`,对 `https://google.com` 发起的请求将被自动转换为 `https://proxy.example.com/?target=https%3A%2F%2Fgoogle.com`
你可以使用 Cloudflare Workers 来搭建一个简易的反向代理,例如:
diff --git a/lib/utils/request-wrapper.js b/lib/utils/request-wrapper.js
index 58a54b50e5a367..46c35f8bb930e1 100644
--- a/lib/utils/request-wrapper.js
+++ b/lib/utils/request-wrapper.js
@@ -40,8 +40,10 @@ if (agent) {
};
} else if (config.reverseProxyUrl) {
proxyWrapper = (url, options) => {
- if (!((options.url || url) + '').startsWith(config.reverseProxyUrl)) {
- options.url = new URL(`${config.reverseProxyUrl}${encodeURIComponent(options.url || url)}`);
+ const urlIn = options.url.toString() || url;
+ const proxyRegex = new RegExp(proxyObj.url_regex);
+ if (proxyRegex.test(urlIn) && !urlIn.startsWith(config.reverseProxyUrl) && !options.cookieJar) {
+ options.url = new URL(`${config.reverseProxyUrl}${encodeURIComponent(urlIn)}`);
return true;
}
return false;
|
b013637b90b3227d2f05b638ce0f9cc2344189de
|
2024-09-07 01:53:39
|
Tony
|
fix(route): use acw sc v2 utils (#16654)
| false
|
use acw sc v2 utils (#16654)
|
fix
|
diff --git a/lib/routes/xueqiu/cookies.ts b/lib/routes/xueqiu/cookies.ts
index 175296ee8bed87..a79a1ec9fe4831 100644
--- a/lib/routes/xueqiu/cookies.ts
+++ b/lib/routes/xueqiu/cookies.ts
@@ -1,12 +1,25 @@
import ofetch from '@/utils/ofetch';
import cache from '@/utils/cache';
import { config } from '@/config';
+import { getAcwScV2ByArg1 } from '@/routes/5eplay/utils';
export const parseToken = () =>
cache.tryGet(
'xueqiu:token',
async () => {
- const res = await ofetch.raw(`https://xueqiu.com`);
+ const r = await ofetch('https://xueqiu.com');
+
+ let acw_sc__v2 = '';
+ const matches = r.match(/var arg1='(.*?)';/);
+ if (matches) {
+ acw_sc__v2 = getAcwScV2ByArg1(matches[1]);
+ }
+
+ const res = await ofetch.raw('https://xueqiu.com', {
+ headers: {
+ Cookie: `acw_sc__v2=${acw_sc__v2}`,
+ },
+ });
const cookieArray = res.headers.getSetCookie();
return cookieArray.find((c) => c.startsWith('xq_a_token='));
},
|
83fd514a7336ec6aa8309202809f887236ef6075
|
2023-12-06 22:44:03
|
Ethan Shen
|
feat(route): add 中国科普博览直播回看 (#13975)
| false
|
add 中国科普博览直播回看 (#13975)
|
feat
|
diff --git a/lib/v2/kepu/live.js b/lib/v2/kepu/live.js
new file mode 100644
index 00000000000000..29c84ddbca1f50
--- /dev/null
+++ b/lib/v2/kepu/live.js
@@ -0,0 +1,89 @@
+const got = require('@/utils/got');
+const timezone = require('@/utils/timezone');
+const { parseDate } = require('@/utils/parse-date');
+const { art } = require('@/utils/render');
+const path = require('path');
+
+module.exports = async (ctx) => {
+ const limit = ctx.query.limit ? parseInt(ctx.query.limit, 10) : 50;
+
+ const rootUrl = 'https://live.kepu.net.cn';
+ const apiRootUrl = 'https://live.kepu.net.cn:8089';
+
+ const currentUrl = new URL('replay/index', rootUrl).href;
+ const apiUrl = new URL('index.php/front/index/replay_list', apiRootUrl).href;
+
+ const { data: response } = await got.post(apiUrl, {
+ form: {
+ page: 1,
+ size: limit,
+ },
+ });
+
+ let items = response.data.data.slice(0, limit).map((item) => ({
+ title: item.title,
+ link: new URL(`live/index?id=${item.id}`, rootUrl).href,
+ description: item.desc,
+ author: item.company,
+ guid: item.id,
+ pubDate: timezone(parseDate(item.live_start_time ?? item.start_time), +8),
+ updated: timezone(parseDate(item.live_end_time ?? item.end_time), +8),
+ itunes_item_image: new URL(item.cover, apiRootUrl).href,
+ comments: item.display_comment ?? 0,
+ }));
+
+ items = await Promise.all(
+ items.map((item) =>
+ ctx.cache.tryGet(item.link, async () => {
+ const apiReplayUrl = new URL('index.php/front/live/replay_url', apiRootUrl).href;
+
+ const { data: detailResponse } = await got.post(apiReplayUrl, {
+ form: {
+ id: item.guid,
+ },
+ });
+
+ item.guid = `kepu-live#${item.guid}`;
+ item.enclosure_url = detailResponse.data.RecordIndexInfoList.RecordIndexInfo.pop()?.RecordUrl;
+
+ if (item.enclosure_url) {
+ item.enclosure_type = `video/${item.enclosure_url.split(/\./).pop()}`;
+ }
+
+ item.description = art(path.join(__dirname, 'templates/description.art'), {
+ image: {
+ src: item.itunes_item_image,
+ alt: item.title,
+ },
+ video: {
+ src: item.enclosure_url,
+ type: item.enclosure_type,
+ poster: item.itunes_item_image,
+ },
+ description: item.description,
+ });
+
+ return item;
+ })
+ )
+ );
+
+ const icon = new URL('favicon.ico', rootUrl).href;
+ const author = '中国科普博览';
+ const subtitle = '直播回看';
+
+ ctx.state.data = {
+ item: items,
+ title: `${author} - ${subtitle}`,
+ link: currentUrl,
+ description: '科学直播(live.kepu.net.cn)',
+ language: 'zh',
+ icon,
+ logo: icon,
+ subtitle,
+ author,
+ itunes_author: author,
+ itunes_category: 'Science',
+ allowEmpty: true,
+ };
+};
diff --git a/lib/v2/kepu/maintainer.js b/lib/v2/kepu/maintainer.js
new file mode 100644
index 00000000000000..7cb63ecb13f1c6
--- /dev/null
+++ b/lib/v2/kepu/maintainer.js
@@ -0,0 +1,3 @@
+module.exports = {
+ '/live': ['nczitzk'],
+};
diff --git a/lib/v2/kepu/radar.js b/lib/v2/kepu/radar.js
new file mode 100644
index 00000000000000..3ee91ffcd02118
--- /dev/null
+++ b/lib/v2/kepu/radar.js
@@ -0,0 +1,13 @@
+module.exports = {
+ 'kepu.net.cn': {
+ _name: '中国科普博览',
+ live: [
+ {
+ title: '直播回看',
+ docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-ke-pu-bo-lan-zhi-bo-hui-kan',
+ source: ['/replay/index'],
+ target: '/kepu/live',
+ },
+ ],
+ },
+};
diff --git a/lib/v2/kepu/router.js b/lib/v2/kepu/router.js
new file mode 100644
index 00000000000000..cec68b2316998e
--- /dev/null
+++ b/lib/v2/kepu/router.js
@@ -0,0 +1,3 @@
+module.exports = (router) => {
+ router.get('/live', require('./live'));
+};
diff --git a/lib/v2/kepu/templates/description.art b/lib/v2/kepu/templates/description.art
new file mode 100644
index 00000000000000..b07f03ccd4e374
--- /dev/null
+++ b/lib/v2/kepu/templates/description.art
@@ -0,0 +1,33 @@
+{{ if image?.src }}
+ <figure>
+ <img
+ {{ if image.alt }}
+ alt="{{ image.alt }}"
+ {{ /if }}
+ src="{{ image.src }}">
+ </figure>
+{{ /if }}
+
+{{ if intro }}
+ <p>{{ intro }}</p>
+{{ /if }}
+
+{{ if video?.src }}
+ <video
+ {{ set poster = video.poster || image?.src }}
+ {{ if poster }}
+ poster="{{ poster }}"
+ {{ /if }}
+ controls>
+ <source
+ src="{{ video.src }}"
+ type="{{ video.type }}">
+ <object data="{{ video.src }}">
+ <embed src="{{ video.src }}">
+ </object>
+ </video>
+{{ /if }}
+
+{{ if description }}
+ <p>{{ description }}</p>
+{{ /if }}
\ No newline at end of file
diff --git a/website/docs/routes/new-media.mdx b/website/docs/routes/new-media.mdx
index f61891ca1edb08..177355fbb4f38c 100644
--- a/website/docs/routes/new-media.mdx
+++ b/website/docs/routes/new-media.mdx
@@ -6439,6 +6439,12 @@ column 为 third 时可选的 category:
</Route>
+## 中国科普博览 {#zhong-guo-ke-pu-bo-lan}
+
+### 直播回看 {#zhong-guo-ke-pu-bo-lan-zhi-bo-hui-kan}
+
+<Route author="nczitzk" example="/kepu/live" path="/kepu/live" radar="1" supportBT="1"/>
+
## 中国科学院青年创新促进会 {#zhong-guo-ke-xue-yuan-qing-nian-chuang-xin-cu-jin-hui}
### 最新博文 {#zhong-guo-ke-xue-yuan-qing-nian-chuang-xin-cu-jin-hui-zui-xin-bo-wen}
|
aab9f24f3c4ab4f224c75f847e004bb966e819d1
|
2020-05-21 21:52:27
|
notofoe
|
feat: /telegram/channel reply, media tag, poll (#4826)
| false
|
/telegram/channel reply, media tag, poll (#4826)
|
feat
|
diff --git a/lib/routes/telegram/channel.js b/lib/routes/telegram/channel.js
index 7a9dd4b9d0f013..1395a9384f2140 100644
--- a/lib/routes/telegram/channel.js
+++ b/lib/routes/telegram/channel.js
@@ -18,20 +18,70 @@ module.exports = async (ctx) => {
.map((index, item) => {
item = $(item);
- /* "Forwarded From" tag */
+ /* media tag */
+
+ const mediaTag = () => {
+ let mediaTag = '';
+ if (item.find('.tgme_widget_message_photo').length > 0) {
+ mediaTag += '🖼';
+ }
+ if (item.find('.tgme_widget_message_video').length > 0) {
+ mediaTag += '📹';
+ }
+ if (item.find('.tgme_widget_message_poll').length > 0) {
+ mediaTag += '📊';
+ }
+ if (item.find('.tgme_widget_message_voice').length > 0) {
+ mediaTag += '🎤';
+ }
+ if (item.find('.tgme_widget_message_document').length > 0) {
+ mediaTag += '📎';
+ }
+ if (item.find('.tgme_widget_message_location').length > 0) {
+ mediaTag += '📍';
+ }
+ return mediaTag;
+ };
- let fwdFrom;
- const fwdFromNameObject = item.find('.tgme_widget_message_forwarded_from_name');
- if (fwdFromNameObject.length) {
- if (fwdFromNameObject.attr('href') !== undefined) {
- fwdFrom = `Forwarded From <b><a href="${fwdFromNameObject.attr('href')}">
+ /* "Forwarded From" tag */
+ const fwdFrom = () => {
+ const fwdFromNameObject = item.find('.tgme_widget_message_forwarded_from_name');
+ if (fwdFromNameObject.length) {
+ if (fwdFromNameObject.attr('href') !== undefined) {
+ return `Forwarded From <b><a href="${fwdFromNameObject.attr('href')}">
${fwdFromNameObject.text()}</a></b><br><br>`;
+ } else {
+ return `Forwarded From <b>${fwdFromNameObject.text()}</b><br><br>`;
+ }
} else {
- fwdFrom = `Forwarded From <b>${fwdFromNameObject.text()}</b><br><br>`;
+ return '';
}
- } else {
- fwdFrom = '';
- }
+ };
+
+ /* reply */
+ const replyContent = () => {
+ if (item.find('.tgme_widget_message_reply').length !== 0) {
+ const replyObject = item.find('.tgme_widget_message_reply');
+
+ const replyAuthor = replyObject.find('.tgme_widget_message_author_name').length ? replyObject.find('.tgme_widget_message_author_name').text() : '';
+ const replyLink = replyObject.attr('href').length ? replyObject.attr('href') : '';
+ const replyText = replyObject.find('.tgme_widget_message_text').length ? replyObject.find('.tgme_widget_message_text').html() : '';
+
+ if (replyLink !== '') {
+ return `<blockquote>
+ <p><a href='${replyLink}'><strong>${replyAuthor}</strong>:</a></p>
+ <p>${replyText}</p>
+ </blockquote>`;
+ } else {
+ return `<blockquote>
+ <p><strong>${replyAuthor}</strong>:</p>
+ <p>${replyText}</p>
+ </blockquote>`;
+ }
+ } else {
+ return '';
+ }
+ };
/* images */
@@ -53,11 +103,11 @@ module.exports = async (ctx) => {
const messageImgs = generateImg('.tgme_widget_message_photo_wrap');
/* videos */
-
- let messageVideos = '';
- if (item.find('.tgme_widget_message_video_player').length) {
- item.find('.tgme_widget_message_video_player').each(function () {
- messageVideos += `<video src="${$(this).find('.tgme_widget_message_video').attr('src')}"
+ const messageVideos = () => {
+ let messageVideos = '';
+ if (item.find('.tgme_widget_message_video_player').length) {
+ item.find('.tgme_widget_message_video_player').each(function () {
+ messageVideos += `<video src="${$(this).find('.tgme_widget_message_video').attr('src')}"
controls="controls"
poster="${
$(this)
@@ -66,35 +116,53 @@ module.exports = async (ctx) => {
.match(/url\('(.*)'\)/)[1]
}"
style="width: 100%"></video>`;
- });
- }
+ });
+ }
+ return messageVideos;
+ };
/* link preview */
-
- const linkPreviewSite = item.find('.link_preview_site_name').length ? `<b>${item.find('.link_preview_site_name').text()}</b><br>` : '';
- let linkPreviewTitle;
- if (item.find('.link_preview_title').length) {
- linkPreviewTitle = `<b><a href="${item.find('.tgme_widget_message_link_preview').attr('href')}">
+ const linkPreview = () => {
+ const linkPreviewSite = item.find('.link_preview_site_name').length ? `<b>${item.find('.link_preview_site_name').text()}</b><br>` : '';
+ let linkPreviewTitle;
+ if (item.find('.link_preview_title').length) {
+ linkPreviewTitle = `<b><a href="${item.find('.tgme_widget_message_link_preview').attr('href')}">
${item.find('.link_preview_title').text()}</a></b><br>`;
- } else {
- linkPreviewTitle = '';
- }
- const linkPreviewDescription = item.find('.link_preview_description').length ? item.find('.link_preview_description').html() : '';
- const linkPreviewImage = generateImg('.link_preview_image') + generateImg('.link_preview_right_image');
+ } else {
+ linkPreviewTitle = '';
+ }
+ const linkPreviewDescription = item.find('.link_preview_description').length ? item.find('.link_preview_description').html() : '';
+ const linkPreviewImage = generateImg('.link_preview_image') + generateImg('.link_preview_right_image');
+
+ if (linkPreviewSite.length > 0 || linkPreviewTitle.length > 0 || linkPreviewDescription.length > 0 || linkPreviewImage.length > 0) {
+ return `<blockquote>${linkPreviewSite}${linkPreviewTitle}${linkPreviewDescription}${linkPreviewImage}</blockquote>`;
+ } else {
+ return '';
+ }
+ };
+
+ /* poll */
+ const pollQuestion = item.find('.tgme_widget_message_poll_question').length ? item.find('.tgme_widget_message_poll_question').text() : '';
- let linkPreview;
- if (linkPreviewSite.length > 0 || linkPreviewTitle.length > 0 || linkPreviewDescription.length > 0 || linkPreviewImage.length > 0) {
- linkPreview = `<blockquote>` + linkPreviewSite + linkPreviewTitle + linkPreviewDescription + linkPreviewImage + `</blockquote>`;
+ /* message text & title */
+ const messageTextObject = item.find('.tgme_widget_message_bubble > .tgme_widget_message_text');
+ let messageText = '',
+ messageTitle = '';
+ if (messageTextObject.length > 0) {
+ messageTitle = messageTextObject.text();
+ messageText = messageTextObject.html();
} else {
- linkPreview = '';
+ messageText = '';
+ if (pollQuestion !== '') {
+ messageTitle = pollQuestion;
+ } else {
+ messageTitle = '无题';
+ }
}
- /* message text */
- const messageText = item.find('.tgme_widget_message_text').length ? item.find('.tgme_widget_message_text').html() + '<br><br>' : '';
-
return {
- title: messageText !== '' ? item.find('.tgme_widget_message_text').text() : '无题',
- description: fwdFrom + messageText + linkPreview + messageImgs + messageVideos,
+ title: mediaTag() + messageTitle,
+ description: fwdFrom() + replyContent() + messageText + linkPreview() + messageImgs + messageVideos(),
pubDate: new Date(item.find('.tgme_widget_message_date time').attr('datetime')).toUTCString(),
link: item.find('.tgme_widget_message_date').attr('href'),
author: item.find('.tgme_widget_message_from_author').text(),
|
2ab9440a1b29cf6164855b6a7e24f0600515fb68
|
2023-04-11 19:50:36
|
dependabot[bot]
|
chore(deps-dev): bump eslint from 8.37.0 to 8.38.0 (#12280)
| false
|
bump eslint from 8.37.0 to 8.38.0 (#12280)
|
chore
|
diff --git a/package.json b/package.json
index 0693cbb340c1a0..fa77ea04b42f9e 100644
--- a/package.json
+++ b/package.json
@@ -57,7 +57,7 @@
"@vuepress/plugin-pwa": "1.9.9",
"@vuepress/shared-utils": "1.9.9",
"cross-env": "7.0.3",
- "eslint": "8.37.0",
+ "eslint": "8.38.0",
"eslint-config-prettier": "8.8.0",
"eslint-plugin-prettier": "4.2.1",
"eslint-plugin-yml": "1.5.0",
diff --git a/yarn.lock b/yarn.lock
index 0aad00e49ee447..efbdb729409f91 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -1022,10 +1022,10 @@
minimatch "^3.1.2"
strip-json-comments "^3.1.1"
-"@eslint/[email protected]":
- version "8.37.0"
- resolved "https://registry.yarnpkg.com/@eslint/js/-/js-8.37.0.tgz#cf1b5fa24217fe007f6487a26d765274925efa7d"
- integrity sha512-x5vzdtOOGgFVDCUs81QRB2+liax8rFg3+7hqM+QhBG0/G3F1ZsoYl97UrqgHgQ9KKT7G6c4V+aTUCgu/n22v1A==
+"@eslint/[email protected]":
+ version "8.38.0"
+ resolved "https://registry.yarnpkg.com/@eslint/js/-/js-8.38.0.tgz#73a8a0d8aa8a8e6fe270431c5e72ae91b5337892"
+ integrity sha512-IoD2MfUnOV58ghIHCiil01PcohxjbYR/qCxsoC+xNgUwh1EY8jOOrYmu3d3a71+tJJ23uscEV4X2HJWMsPJu4g==
"@gar/promisify@^1.1.3":
version "1.1.3"
@@ -5688,15 +5688,15 @@ eslint-visitor-keys@^3.0.0, eslint-visitor-keys@^3.3.0, eslint-visitor-keys@^3.4
resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.4.0.tgz#c7f0f956124ce677047ddbc192a68f999454dedc"
integrity sha512-HPpKPUBQcAsZOsHAFwTtIKcYlCje62XB7SEAcxjtmW6TD1WVpkS6i6/hOVtTZIl4zGj/mBqpFVGvaDneik+VoQ==
[email protected], eslint@^8.9.0:
- version "8.37.0"
- resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.37.0.tgz#1f660ef2ce49a0bfdec0b0d698e0b8b627287412"
- integrity sha512-NU3Ps9nI05GUoVMxcZx1J8CNR6xOvUT4jAUMH5+z8lpp3aEdPVCImKw6PWG4PY+Vfkpr+jvMpxs/qoE7wq0sPw==
[email protected], eslint@^8.9.0:
+ version "8.38.0"
+ resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.38.0.tgz#a62c6f36e548a5574dd35728ac3c6209bd1e2f1a"
+ integrity sha512-pIdsD2jwlUGf/U38Jv97t8lq6HpaU/G9NKbYmpWpZGw3LdTNhZLbJePqxOXGB5+JEKfOPU/XLxYxFh03nr1KTg==
dependencies:
"@eslint-community/eslint-utils" "^4.2.0"
"@eslint-community/regexpp" "^4.4.0"
"@eslint/eslintrc" "^2.0.2"
- "@eslint/js" "8.37.0"
+ "@eslint/js" "8.38.0"
"@humanwhocodes/config-array" "^0.11.8"
"@humanwhocodes/module-importer" "^1.0.1"
"@nodelib/fs.walk" "^1.2.8"
|
78e1c6d9600fea7d6f040ab61004be47c2783df8
|
2020-09-27 04:44:00
|
dependabot-preview[bot]
|
chore(deps-dev): bump vuepress from 1.5.3 to 1.6.0
| false
|
bump vuepress from 1.5.3 to 1.6.0
|
chore
|
diff --git a/package.json b/package.json
index 42e8ab4560179b..7f06e024f1fcff 100644
--- a/package.json
+++ b/package.json
@@ -60,7 +60,7 @@
"staged-git-files": "1.2.0",
"string-width": "4.2.0",
"supertest": "5.0.0",
- "vuepress": "1.5.3",
+ "vuepress": "1.6.0",
"yorkie": "2.0.0"
},
"dependencies": {
diff --git a/yarn.lock b/yarn.lock
index a1930df4cbfe40..cbbf2c0f1dbfcf 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -1856,18 +1856,18 @@
source-map "~0.6.1"
vue-template-es2015-compiler "^1.9.0"
-"@vuepress/[email protected]":
- version "1.5.3"
- resolved "https://registry.yarnpkg.com/@vuepress/core/-/core-1.5.3.tgz#e48728a26a60b21673c7b8f1f7377c03fb17e34f"
- integrity sha512-ZZpDkYVtztN2eWZ5+oj5DoGMEQdV9Bz4et0doKhLXfIEQFwjWUyN6HHnIgqjnmSFIqfjzbWdOKVxMLENs8njpA==
+"@vuepress/[email protected]":
+ version "1.6.0"
+ resolved "https://registry.yarnpkg.com/@vuepress/core/-/core-1.6.0.tgz#8abca498cd8c589dd621be5d5b1c9c805dfed3fd"
+ integrity sha512-zce6xMB77pk4g44CHYE75cBuJpa3lmLPujknymH0sD1LKkSrlkgH04x+LGhu98bVU/hiS0xjV3jDs3X37Texbw==
dependencies:
"@babel/core" "^7.8.4"
"@vue/babel-preset-app" "^4.1.2"
- "@vuepress/markdown" "1.5.3"
- "@vuepress/markdown-loader" "1.5.3"
- "@vuepress/plugin-last-updated" "1.5.3"
- "@vuepress/plugin-register-components" "1.5.3"
- "@vuepress/shared-utils" "1.5.3"
+ "@vuepress/markdown" "1.6.0"
+ "@vuepress/markdown-loader" "1.6.0"
+ "@vuepress/plugin-last-updated" "1.6.0"
+ "@vuepress/plugin-register-components" "1.6.0"
+ "@vuepress/shared-utils" "1.6.0"
autoprefixer "^9.5.1"
babel-loader "^8.0.4"
cache-loader "^3.0.0"
@@ -1900,21 +1900,21 @@
webpack-merge "^4.1.2"
webpackbar "3.2.0"
-"@vuepress/[email protected]":
- version "1.5.3"
- resolved "https://registry.yarnpkg.com/@vuepress/markdown-loader/-/markdown-loader-1.5.3.tgz#3d0eec1d37318b71029f051525f0bff3bc36647d"
- integrity sha512-Y1FLkEZw1p84gPer14CjA1gPSdmc/bfPuZ/7mE0dqBtpsU3o9suaubWpFs75agjHew4IJap5TibtUs57FWGSfA==
+"@vuepress/[email protected]":
+ version "1.6.0"
+ resolved "https://registry.yarnpkg.com/@vuepress/markdown-loader/-/markdown-loader-1.6.0.tgz#5a666c5b01c01181a3c0802ceed5a2b96577d9c7"
+ integrity sha512-7cYD9+td89u0EePoHw+nVwxCoafYvpP10r6RfdN3Ongvd2apyn37Mjjv+85U1jnSTRvjZHV4v7KFs4H8+Y0xiw==
dependencies:
- "@vuepress/markdown" "1.5.3"
+ "@vuepress/markdown" "1.6.0"
loader-utils "^1.1.0"
lru-cache "^5.1.1"
-"@vuepress/[email protected]":
- version "1.5.3"
- resolved "https://registry.yarnpkg.com/@vuepress/markdown/-/markdown-1.5.3.tgz#90807f0366ebdde8380b27f249396cffe9c5d300"
- integrity sha512-TI6pSkmvu8SZhIfZR0VbDmmGAWOaoI+zIaXMDY27ex7Ty/KQ/JIsVSgr5wbiSJMhkA0efbZzAVFu1NrHIc1waw==
+"@vuepress/[email protected]":
+ version "1.6.0"
+ resolved "https://registry.yarnpkg.com/@vuepress/markdown/-/markdown-1.6.0.tgz#6702a1938b5d5308919261ffcc5c369eabfa6694"
+ integrity sha512-niFP+mKbEPu82OkkYf+dZMd8cWYfKEeIFq2jrQCJcVnCuSGVmJbKJbQF+cP/iu+94RHFVUtKwsh4X3Ef/1PLXw==
dependencies:
- "@vuepress/shared-utils" "1.5.3"
+ "@vuepress/shared-utils" "1.6.0"
markdown-it "^8.4.1"
markdown-it-anchor "^5.0.2"
markdown-it-chain "^1.3.0"
@@ -1922,10 +1922,10 @@
markdown-it-table-of-contents "^0.4.0"
prismjs "^1.13.0"
-"@vuepress/[email protected]":
- version "1.5.3"
- resolved "https://registry.yarnpkg.com/@vuepress/plugin-active-header-links/-/plugin-active-header-links-1.5.3.tgz#736f51a3aab126b6a003d896d3d77254b656a76e"
- integrity sha512-x9U3bVkwwUkfXtf7db1Gg/m32UGpSWRurdl9I5ePFFxwEy8ffGmvhpzCBL878q8TNa90jd1XueQJCq6hQ9/KsQ==
+"@vuepress/[email protected]":
+ version "1.6.0"
+ resolved "https://registry.yarnpkg.com/@vuepress/plugin-active-header-links/-/plugin-active-header-links-1.6.0.tgz#7d94db2e34a0b4af10b93171f56e7efc3bb7bd40"
+ integrity sha512-AsbUptcwtBJtlvrcDyiW2HZAHz/tLoYXrGopJVPtWUZ9LzNIcXuSFVIRzKd1Jc+86VPUYLeDhLBIWe0rfsphAQ==
dependencies:
lodash.debounce "^4.0.8"
@@ -1941,17 +1941,17 @@
resolved "https://registry.yarnpkg.com/@vuepress/plugin-google-analytics/-/plugin-google-analytics-1.6.0.tgz#1a3960259556016b668276ab00417f1c96ddf4bd"
integrity sha512-CPRTQsq6KnZEb4SEB/6KdXHFKGvKdsg0GWtSYpLTbF/aUETVRUVJsqR7i/tLWgtyB8qFMwzPUiTc7KlEFjvYyg==
-"@vuepress/[email protected]":
- version "1.5.3"
- resolved "https://registry.yarnpkg.com/@vuepress/plugin-last-updated/-/plugin-last-updated-1.5.3.tgz#1f2dcc653d3b829d65094433395f9a92642eb301"
- integrity sha512-xb4FXSRTTPrERX2DigGDAJrVFLsTQwsY4QSzRBFYSlfZkK3gcZMNmUISXS/4tDkyPgxh/TtcMwbcUiUu0LQOnQ==
+"@vuepress/[email protected]":
+ version "1.6.0"
+ resolved "https://registry.yarnpkg.com/@vuepress/plugin-last-updated/-/plugin-last-updated-1.6.0.tgz#9c27739b87adc908b1fbb90f96b3456065c20f08"
+ integrity sha512-/gnk9HGaZw3ow/i9ODjZxK40TbriTWuMY3YYIzqvP7CT3mrM92nMKYDygYbffbu6xkWdUZppN8JadtJ7we4z9A==
dependencies:
cross-spawn "^6.0.5"
-"@vuepress/[email protected]":
- version "1.5.3"
- resolved "https://registry.yarnpkg.com/@vuepress/plugin-nprogress/-/plugin-nprogress-1.5.3.tgz#01c699739ecfe94569986ff838665dcb30e6cb05"
- integrity sha512-SBa4uoRBaBPF+TrN38y/eFSnj1c2a53EuyY+vYijrWq5+nmDCQkpoClpS4a90f2eG2shMIvsMxUsS8waMKFZ8w==
+"@vuepress/[email protected]":
+ version "1.6.0"
+ resolved "https://registry.yarnpkg.com/@vuepress/plugin-nprogress/-/plugin-nprogress-1.6.0.tgz#7c93a3ed233ef8cc21b689d54f518902502e064c"
+ integrity sha512-dhIho2z33aGjPavcdVYRlqR3+ZC5Vd3FPd+HkRP8MdIIFxhVR1HLFxVgaSUcASOCGAwuG58OB2RStvgMQLtTEA==
dependencies:
nprogress "^0.2.0"
@@ -1964,33 +1964,17 @@
register-service-worker "^1.7.0"
workbox-build "^4.3.1"
-"@vuepress/[email protected]":
- version "1.5.3"
- resolved "https://registry.yarnpkg.com/@vuepress/plugin-register-components/-/plugin-register-components-1.5.3.tgz#70e28460475e42b43435c6647ace537129116fb1"
- integrity sha512-OzL7QOKhR+biUWrDqPisQz35cXVdI274cDWw2tTUTw3yr7aPyezDw3DFRFXzPaZzk9Jo+d+kkOTwghXXC88Xbg==
+"@vuepress/[email protected]":
+ version "1.6.0"
+ resolved "https://registry.yarnpkg.com/@vuepress/plugin-register-components/-/plugin-register-components-1.6.0.tgz#bdf7271a38edffa83d48ab82210489f4fc6343e8"
+ integrity sha512-w9Lafh1G3514rulpjSoIfZXt94wZ5oMkpXyVzXyC2wRHqSu/4fKpcxhwxf6HeT57jIBdPifT+eUrL+XIZWnXLQ==
dependencies:
- "@vuepress/shared-utils" "1.5.3"
-
-"@vuepress/[email protected]":
- version "1.5.3"
- resolved "https://registry.yarnpkg.com/@vuepress/plugin-search/-/plugin-search-1.5.3.tgz#c2a93fceab3830e4f07ba6ac68e3bfc27c7d908d"
- integrity sha512-LCqqgKQ1I26oWE3N5OKeZMV0xtWv2WURI+bhxirM1xL0OpCQyqwk/rLHWBto+j4Y0ScxgXiRxa9Zs2E6eY6Dnw==
+ "@vuepress/shared-utils" "1.6.0"
-"@vuepress/[email protected]":
- version "1.5.3"
- resolved "https://registry.yarnpkg.com/@vuepress/shared-utils/-/shared-utils-1.5.3.tgz#071bb68c3ec0dfb5f3939c14d3a8795a03617ad4"
- integrity sha512-/eTSADRZ0Iz1REnIkQ1ouoWY0ZH9ivH6IuGT19H/WBe8gru2EoK7jUqpXE8JHcGf6pxkK3qB4E/DNCO9Cyy4yg==
- dependencies:
- chalk "^2.3.2"
- diacritics "^1.3.0"
- escape-html "^1.0.3"
- fs-extra "^7.0.1"
- globby "^9.2.0"
- gray-matter "^4.0.1"
- hash-sum "^1.0.2"
- semver "^6.0.0"
- toml "^3.0.0"
- upath "^1.1.0"
+"@vuepress/[email protected]":
+ version "1.6.0"
+ resolved "https://registry.yarnpkg.com/@vuepress/plugin-search/-/plugin-search-1.6.0.tgz#a064f638a8f30485859b871047deaf9194ffc886"
+ integrity sha512-Js7zRmM6/b6dYfnJsSP2MQN0lzjUfSX8l3z9y/QHxK8BaXIx7LdTcQY6FGK4pxuwlWcg02CIUS5BMc1gZKn6Nw==
"@vuepress/[email protected]":
version "1.6.0"
@@ -2007,17 +1991,17 @@
toml "^3.0.0"
upath "^1.1.0"
-"@vuepress/[email protected]":
- version "1.5.3"
- resolved "https://registry.yarnpkg.com/@vuepress/theme-default/-/theme-default-1.5.3.tgz#98112065b3c987d41463eca5db91a47dce823e45"
- integrity sha512-LRldV8U4FRV26bKXtJFT1oe5lhYbfCxPRFnRXPgf/cLZC+mQd1abl9njCAP7fjmmS33ZgF1dFARGbpCsYWY1Gg==
+"@vuepress/[email protected]":
+ version "1.6.0"
+ resolved "https://registry.yarnpkg.com/@vuepress/theme-default/-/theme-default-1.6.0.tgz#870c4513a186ae233d2c818fb8bef753f35da972"
+ integrity sha512-dV6awQzV+gQqxYK8oHY5A9Hwj34H23bA2khPjqqLDpgLMnw4tvxMfriwK5tuaAjgnHT+MZB1VmgsNdUA9T9HIQ==
dependencies:
- "@vuepress/plugin-active-header-links" "1.5.3"
- "@vuepress/plugin-nprogress" "1.5.3"
- "@vuepress/plugin-search" "1.5.3"
+ "@vuepress/plugin-active-header-links" "1.6.0"
+ "@vuepress/plugin-nprogress" "1.6.0"
+ "@vuepress/plugin-search" "1.6.0"
docsearch.js "^2.5.2"
lodash "^4.17.15"
- stylus "^0.54.5"
+ stylus "^0.54.8"
stylus-loader "^3.0.2"
vuepress-plugin-container "^2.0.2"
vuepress-plugin-smooth-scroll "^0.0.3"
@@ -2327,11 +2311,6 @@ alphanum-sort@^1.0.0:
resolved "https://registry.yarnpkg.com/alphanum-sort/-/alphanum-sort-1.0.2.tgz#97a1119649b211ad33691d9f9f486a8ec9fbe0a3"
integrity sha1-l6ERlkmyEa0zaR2fn0hqjsn74KM=
-amdefine@>=0.0.4:
- version "1.0.1"
- resolved "https://registry.yarnpkg.com/amdefine/-/amdefine-1.0.1.tgz#4a5282ac164729e93619bcfd3ad151f817ce91f5"
- integrity sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU=
-
ansi-align@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/ansi-align/-/ansi-align-3.0.0.tgz#b536b371cf687caaef236c18d3e21fe3797467cb"
@@ -2584,7 +2563,7 @@ asynckit@^0.4.0:
resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79"
integrity sha1-x57Zf380y48robyXkLzDZkdLS3k=
-atob@^2.1.1:
+atob@^2.1.1, atob@^2.1.2:
version "2.1.2"
resolved "https://registry.yarnpkg.com/atob/-/atob-2.1.2.tgz#6d9517eb9e030d2436666651e86bd9f6f13533c9"
integrity sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==
@@ -3972,10 +3951,12 @@ css-loader@^2.1.1:
postcss-value-parser "^3.3.0"
schema-utils "^1.0.0"
[email protected]:
- version "1.7.0"
- resolved "https://registry.yarnpkg.com/css-parse/-/css-parse-1.7.0.tgz#321f6cf73782a6ff751111390fc05e2c657d8c9b"
- integrity sha1-Mh9s9zeCpv91ERE5D8BeLGV9jJs=
+css-parse@~2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/css-parse/-/css-parse-2.0.0.tgz#a468ee667c16d81ccf05c58c38d2a97c780dbfd4"
+ integrity sha1-pGjuZnwW2BzPBcWMONKpfHgNv9Q=
+ dependencies:
+ css "^2.0.0"
css-select-base-adapter@^0.1.1:
version "0.1.1"
@@ -4033,6 +4014,16 @@ [email protected], css-what@^2.1.2:
resolved "https://registry.yarnpkg.com/css-what/-/css-what-2.1.3.tgz#a6d7604573365fe74686c3f311c56513d88285f2"
integrity sha512-a+EPoD+uZiNfh+5fxw2nO9QwFa6nJe2Or35fGY6Ipw1R3R4AGz1d1TEZrCegvw2YTmZ0jXirGYlzxxpYSHwpEg==
+css@^2.0.0:
+ version "2.2.4"
+ resolved "https://registry.yarnpkg.com/css/-/css-2.2.4.tgz#c646755c73971f2bba6a601e2cf2fd71b1298929"
+ integrity sha512-oUnjmWpy0niI3x/mPL8dVEI1l7MnG3+HHyRPHf+YFSbK+svOhXpmSOcDURUh2aOCgl2grzrOPt1nHLuCVFULLw==
+ dependencies:
+ inherits "^2.0.3"
+ source-map "^0.6.1"
+ source-map-resolve "^0.5.2"
+ urix "^0.1.0"
+
cssesc@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/cssesc/-/cssesc-2.0.0.tgz#3b13bd1bb1cb36e1bcb5a4dcd27f54c5dcb35703"
@@ -4192,13 +4183,6 @@ de-indent@^1.0.2:
resolved "https://registry.yarnpkg.com/de-indent/-/de-indent-1.0.2.tgz#b2038e846dc33baa5796128d0804b455b8c1e21d"
integrity sha1-sgOOhG3DO6pXlhKNCAS0VbjB4h0=
-debug@*, debug@4, debug@^4.0.1, debug@^4.1.0, debug@^4.1.1:
- version "4.1.1"
- resolved "https://registry.yarnpkg.com/debug/-/debug-4.1.1.tgz#3b72260255109c6b589cee050f1d516139664791"
- integrity sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==
- dependencies:
- ms "^2.1.1"
-
[email protected], debug@^2.2.0, debug@^2.3.3, debug@^2.6.9:
version "2.6.9"
resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f"
@@ -4206,6 +4190,13 @@ [email protected], debug@^2.2.0, debug@^2.3.3, debug@^2.6.9:
dependencies:
ms "2.0.0"
+debug@4, debug@^4.0.1, debug@^4.1.0, debug@^4.1.1:
+ version "4.1.1"
+ resolved "https://registry.yarnpkg.com/debug/-/debug-4.1.1.tgz#3b72260255109c6b589cee050f1d516139664791"
+ integrity sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==
+ dependencies:
+ ms "^2.1.1"
+
debug@^3.2.5, debug@^3.2.6:
version "3.2.6"
resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.6.tgz#e83d17de16d8a7efb7717edbe5fb10135eee629b"
@@ -4416,11 +4407,6 @@ [email protected]:
resolved "https://registry.yarnpkg.com/devtools-protocol/-/devtools-protocol-0.0.799653.tgz#86fc95ce5bf4fdf4b77a58047ba9d2301078f119"
integrity sha512-t1CcaZbvm8pOlikqrsIM9GOa7Ipp07+4h/q9u0JXBWjPCjHdBl9KkddX87Vv9vBHoBGtwV79sYQNGnQM6iS5gg==
-diacritics@^1.3.0:
- version "1.3.0"
- resolved "https://registry.yarnpkg.com/diacritics/-/diacritics-1.3.0.tgz#3efa87323ebb863e6696cebb0082d48ff3d6f7a1"
- integrity sha1-PvqHMj67hj5mls67AILUj/PW96E=
-
diff-sequences@^26.3.0:
version "26.3.0"
resolved "https://registry.yarnpkg.com/diff-sequences/-/diff-sequences-26.3.0.tgz#62a59b1b29ab7fd27cef2a33ae52abe73042d0a2"
@@ -5718,18 +5704,6 @@ glob-to-regexp@^0.3.0:
resolved "https://registry.yarnpkg.com/glob-to-regexp/-/glob-to-regexp-0.3.0.tgz#8c5a1494d2066c570cc3bfe4496175acc4d502ab"
integrity sha1-jFoUlNIGbFcMw7/kSWF1rMTVAqs=
[email protected]:
- version "7.0.6"
- resolved "https://registry.yarnpkg.com/glob/-/glob-7.0.6.tgz#211bafaf49e525b8cd93260d14ab136152b3f57a"
- integrity sha1-IRuvr0nlJbjNkyYNFKsTYVKz9Xo=
- dependencies:
- fs.realpath "^1.0.0"
- inflight "^1.0.4"
- inherits "2"
- minimatch "^3.0.2"
- once "^1.3.0"
- path-is-absolute "^1.0.0"
-
glob@^7.0.0, glob@^7.0.3, glob@^7.1.1, glob@^7.1.2, glob@^7.1.3:
version "7.1.4"
resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.4.tgz#aa608a2f6c577ad357e1ae5a5c26d9a8d1969255"
@@ -5742,7 +5716,7 @@ glob@^7.0.0, glob@^7.0.3, glob@^7.1.1, glob@^7.1.2, glob@^7.1.3:
once "^1.3.0"
path-is-absolute "^1.0.0"
-glob@^7.1.4:
+glob@^7.1.4, glob@^7.1.6:
version "7.1.6"
resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.6.tgz#141f33b81a7c2492e125594307480c46679278a6"
integrity sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==
@@ -8408,7 +8382,7 @@ minimalistic-crypto-utils@^1.0.0, minimalistic-crypto-utils@^1.0.1:
resolved "https://registry.yarnpkg.com/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz#f6c00c1c0b082246e5c4d99dfb8c7c083b2b582a"
integrity sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo=
-minimatch@^3.0.2, minimatch@^3.0.4:
+minimatch@^3.0.4:
version "3.0.4"
resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083"
integrity sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==
@@ -8489,6 +8463,11 @@ [email protected], mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@~0.5.0, mkdirp@~0.5.1:
dependencies:
minimist "0.0.8"
+mkdirp@~1.0.4:
+ version "1.0.4"
+ resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-1.0.4.tgz#3eb5ed62622756d79a5f0e2a221dfebad75c2f7e"
+ integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==
+
[email protected]:
version "3.0.2"
resolved "https://registry.yarnpkg.com/mockdate/-/mockdate-3.0.2.tgz#a5a7bb5820da617747af424d7a4dcb22c6c03d79"
@@ -10789,7 +10768,7 @@ safe-regex@^1.1.0:
dependencies:
ret "~0.1.10"
-"safer-buffer@>= 2.1.2 < 3", "safer-buffer@>= 2.1.2 < 3.0.0", safer-buffer@^2.0.2, safer-buffer@^2.1.0, safer-buffer@~2.1.0:
+"safer-buffer@>= 2.1.2 < 3", "safer-buffer@>= 2.1.2 < 3.0.0", safer-buffer@^2.0.2, safer-buffer@^2.1.0, safer-buffer@^2.1.2, safer-buffer@~2.1.0:
version "2.1.2"
resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a"
integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==
@@ -10809,11 +10788,6 @@ sane@^4.0.3:
minimist "^1.1.1"
walker "~1.0.5"
[email protected]:
- version "0.5.8"
- resolved "https://registry.yarnpkg.com/sax/-/sax-0.5.8.tgz#d472db228eb331c2506b0e8c15524adb939d12c1"
- integrity sha1-1HLbIo6zMcJQaw6MFVJK25OdEsE=
-
sax@>=0.6.0, sax@^1.2.4, sax@~1.2.4:
version "1.2.4"
resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9"
@@ -11183,6 +11157,17 @@ source-map-resolve@^0.5.0:
source-map-url "^0.4.0"
urix "^0.1.0"
+source-map-resolve@^0.5.2:
+ version "0.5.3"
+ resolved "https://registry.yarnpkg.com/source-map-resolve/-/source-map-resolve-0.5.3.tgz#190866bece7553e1f8f267a2ee82c606b5509a1a"
+ integrity sha512-Htz+RnsXWk5+P2slx5Jh3Q66vhQj1Cllm0zvnaY98+NFx+Dv2CF/f5O/t8x+KaNdrdIAsruNzoh/KpialbqAnw==
+ dependencies:
+ atob "^2.1.2"
+ decode-uri-component "^0.2.0"
+ resolve-url "^0.2.1"
+ source-map-url "^0.4.0"
+ urix "^0.1.0"
+
source-map-support@^0.5.6, source-map-support@~0.5.10:
version "0.5.12"
resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.12.tgz#b4f3b10d51857a5af0138d3ce8003b201613d599"
@@ -11196,13 +11181,6 @@ source-map-url@^0.4.0:
resolved "https://registry.yarnpkg.com/source-map-url/-/source-map-url-0.4.0.tgz#3e935d7ddd73631b97659956d55128e87b5084a3"
integrity sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM=
[email protected]:
- version "0.1.43"
- resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.1.43.tgz#c24bc146ca517c1471f5dacbe2571b2b7f9e3346"
- integrity sha1-wkvBRspRfBRx9drL4lcbK3+eM0Y=
- dependencies:
- amdefine ">=0.0.4"
-
[email protected]:
version "0.5.6"
resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.6.tgz#75ce38f52bf0733c5a7f0c118d81334a2bb5f412"
@@ -11604,17 +11582,19 @@ stylus-loader@^3.0.2:
lodash.clonedeep "^4.5.0"
when "~3.6.x"
-stylus@^0.54.5:
- version "0.54.5"
- resolved "https://registry.yarnpkg.com/stylus/-/stylus-0.54.5.tgz#42b9560931ca7090ce8515a798ba9e6aa3d6dc79"
- integrity sha1-QrlWCTHKcJDOhRWnmLqeaqPW3Hk=
+stylus@^0.54.8:
+ version "0.54.8"
+ resolved "https://registry.yarnpkg.com/stylus/-/stylus-0.54.8.tgz#3da3e65966bc567a7b044bfe0eece653e099d147"
+ integrity sha512-vr54Or4BZ7pJafo2mpf0ZcwA74rpuYCZbxrHBsH8kbcXOwSfvBFwsRfpGO5OD5fhG5HDCFW737PKaawI7OqEAg==
dependencies:
- css-parse "1.7.x"
- debug "*"
- glob "7.0.x"
- mkdirp "0.5.x"
- sax "0.5.x"
- source-map "0.1.x"
+ css-parse "~2.0.0"
+ debug "~3.1.0"
+ glob "^7.1.6"
+ mkdirp "~1.0.4"
+ safer-buffer "^2.1.2"
+ sax "~1.2.4"
+ semver "^6.3.0"
+ source-map "^0.7.3"
[email protected]:
version "6.1.0"
@@ -12639,13 +12619,13 @@ vuepress-plugin-smooth-scroll@^0.0.3:
dependencies:
smoothscroll-polyfill "^0.4.3"
[email protected]:
- version "1.5.3"
- resolved "https://registry.yarnpkg.com/vuepress/-/vuepress-1.5.3.tgz#663a1041240a0c182f58316ba567a22b8df932a4"
- integrity sha512-H9bGu6ygrZmq8GxMtDD8xNX1l9zvoyjsOA9oW+Lcttkfyt/HT/WBrpIC08kNPpRE0ZY/U4Jib1KgBfjbFZTffw==
[email protected]:
+ version "1.6.0"
+ resolved "https://registry.yarnpkg.com/vuepress/-/vuepress-1.6.0.tgz#00e6f1649d992f4cfef80a2e3f7af8683acc6ad9"
+ integrity sha512-5hxhkgMROjo6ja59oyrHeiOv6xpq1sy86ejaWgevMWiMbBIZU+9grwrd+PSL6q4rwfsi/a8NqYzcBXV/ZSXWZA==
dependencies:
- "@vuepress/core" "1.5.3"
- "@vuepress/theme-default" "1.5.3"
+ "@vuepress/core" "1.6.0"
+ "@vuepress/theme-default" "1.6.0"
cac "^6.5.6"
envinfo "^7.2.0"
opencollective-postinstall "^2.0.2"
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.