style: fix eslint issues (#20862)
* style: fix n/no-deprecated-api * style: fix no-useless-escape * style: fix default-case * style: fix unicorn/prefer-string-slice * feat!: remove informedainews the site is gone
This commit is contained in:
parent
242bba6713
commit
6dba3aa744
|
|
@ -32,7 +32,7 @@ export const route: Route = {
|
|||
2. 打开控制台
|
||||
3. 切换到 Network 面板
|
||||
4. 点击 搜索 按钮
|
||||
5. 点击 results?ps=15\&pg=1 POST 请求
|
||||
5. 点击 results?ps=15&pg=1 POST 请求
|
||||
6. 找到 Request Payload 请求参数,例如 \`filters: {planyr: "13", planmajor: "1", outname_w: "ACADIAU"}\` ,则三个 id 分别为: 13,1,ACADIAU
|
||||
:::`,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ export const route: Route = {
|
|||
handler,
|
||||
description: `| 新闻推荐 | 游戏新闻 | 动漫影视 | 智能数码 | 时事焦点 |
|
||||
| -------- | -------- | -------- | -------- | ----------- |
|
||||
| | game | acg | next | news\_36\_1 |`,
|
||||
| | game | acg | next | news_36_1 |`,
|
||||
};
|
||||
|
||||
async function handler(ctx) {
|
||||
|
|
|
|||
|
|
@ -21,11 +21,11 @@ export const route: Route = {
|
|||
handler,
|
||||
description: `| [玄幻魔法](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 |
|
||||
| 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 |`,
|
||||
| 8_1 | 3_1 | 7_1 | 9_1 | 10_1 |`,
|
||||
};
|
||||
|
||||
async function handler(ctx) {
|
||||
|
|
|
|||
|
|
@ -34,11 +34,11 @@ export const route: Route = {
|
|||
|
||||
| Chinese subtitles AV | Censored | Amateur | Uncensored | Asian self-timer | H comics |
|
||||
| -------------------- | -------------- | ---------------- | ---------------- | ---------------- | ------------ |
|
||||
| chinese\_list | censored\_list | amateurjav\_list | uncensored\_list | amateur\_list | hcomic\_list |
|
||||
| chinese_list | censored_list | amateurjav_list | uncensored_list | amateur_list | hcomic_list |
|
||||
|
||||
| Chinese subtitles AV random | Censored random | Amateur random | Uncensored random | Asian self-timer random | H comics random |
|
||||
| --------------------------- | ---------------- | ------------------ | ------------------ | ----------------------- | --------------- |
|
||||
| chinese\_random | censored\_random | amateurjav\_random | uncensored\_random | amateur\_random | hcomic\_random |
|
||||
| chinese_random | censored_random | amateurjav_random | uncensored_random | amateur_random | hcomic_random |
|
||||
|
||||
**Server**
|
||||
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ export const route: Route = {
|
|||
url: '91porn.com/index.php',
|
||||
description: `| English | 简体中文 | 繁體中文 |
|
||||
| ------- | -------- | -------- |
|
||||
| en\_US | cn\_CN | zh\_ZH |`,
|
||||
| en_US | cn_CN | zh_ZH |`,
|
||||
};
|
||||
|
||||
async function handler(ctx) {
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ export const route: Route = {
|
|||
handler,
|
||||
description: `Rated Range
|
||||
|
||||
| ABC Class (Rated for \~1999) | ARC Class (Rated for \~2799) | AGC Class (Rated for \~9999) |
|
||||
| ABC Class (Rated for ~1999) | ARC Class (Rated for ~2799) | AGC Class (Rated for ~9999) |
|
||||
| ---------------------------- | ---------------------------- | ---------------------------- |
|
||||
| 1 | 2 | 3 |
|
||||
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ export const route: Route = {
|
|||
handler,
|
||||
description: `| 安卓版 | iPhone 版 | iPad HD 版 | UWP 版 | TV 版 |
|
||||
| ------- | --------- | ---------- | ------ | ---------------- |
|
||||
| android | iphone | ipad | win | android\_tv\_yst |`,
|
||||
| android | iphone | ipad | win | android_tv_yst |`,
|
||||
};
|
||||
|
||||
async function handler(ctx) {
|
||||
|
|
|
|||
|
|
@ -91,7 +91,7 @@ const getWbiVerifyString = () => {
|
|||
});
|
||||
const imgUrl = navResponse.data.wbi_img.img_url;
|
||||
const subUrl = navResponse.data.wbi_img.sub_url;
|
||||
const r = imgUrl.substring(imgUrl.lastIndexOf('/') + 1, imgUrl.length).split('.')[0] + subUrl.substring(subUrl.lastIndexOf('/') + 1, subUrl.length).split('.')[0];
|
||||
const r = imgUrl.slice(imgUrl.lastIndexOf('/') + 1).split('.')[0] + subUrl.slice(subUrl.lastIndexOf('/') + 1).split('.')[0];
|
||||
// const { body: spaceResponse } = await got('https://space.bilibili.com/1', {
|
||||
// headers: {
|
||||
// Referer: 'https://www.bilibili.com/',
|
||||
|
|
|
|||
|
|
@ -34,6 +34,8 @@ async function handler(ctx) {
|
|||
case 'wh':
|
||||
productTitle = '相簿';
|
||||
break;
|
||||
default:
|
||||
throw new Error(`Unknown product: ${product}`);
|
||||
}
|
||||
|
||||
const response = await got({
|
||||
|
|
|
|||
|
|
@ -34,6 +34,8 @@ async function handler(ctx) {
|
|||
case 'online':
|
||||
orderTitle = '人气直播';
|
||||
break;
|
||||
default:
|
||||
throw new Error(`Unknown order: ${order}`);
|
||||
}
|
||||
|
||||
const nameResponse = await got({
|
||||
|
|
|
|||
|
|
@ -36,6 +36,8 @@ async function handler(ctx) {
|
|||
case 'online':
|
||||
orderTitle = '人气直播';
|
||||
break;
|
||||
default:
|
||||
throw new Error(`Unknown order: ${order}`);
|
||||
}
|
||||
const wbiVerifyString = await cache.getWbiVerifyString();
|
||||
let params = `__refresh__=true&_extra=&context=&page=1&page_size=42&order=${order}&duration=&from_source=&from_spmid=333.337&platform=pc&highlight=1&single_column=0&keyword=${urlEncodedKey}&ad_resource=&source_tag=3&gaia_vtoken=&category_id=&search_type=live&dynamic_offset=0&web_location=1430654`;
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ export const route: Route = {
|
|||
handler,
|
||||
description: `| Boss 笔记 | 电脑日志 | 素材资源 | 设计师神器 | 设计教程 | 设计资讯 |
|
||||
| --------- | --------------- | ---------------- | --------------- | --------------- | ------------------- |
|
||||
| note | computer-skills | design-resources | design-software | design-tutorial | design\_information |`,
|
||||
| note | computer-skills | design-resources | design-software | design-tutorial | design_information |`,
|
||||
};
|
||||
|
||||
async function handler(ctx) {
|
||||
|
|
|
|||
|
|
@ -144,23 +144,23 @@ export const route: Route = {
|
|||
url: 'bse.cn/',
|
||||
description: `| 本所要闻 | 人才招聘 | 采购信息 | 业务通知 |
|
||||
| --------------- | -------- | -------- | ---------- |
|
||||
| important\_news | recruit | purchase | news\_list |
|
||||
| important_news | recruit | purchase | news_list |
|
||||
|
||||
| 法律法规 | 公开征求意见 | 部门规章 | 发行融资 |
|
||||
| --------- | --------------- | ---------------- | ---------- |
|
||||
| law\_list | public\_opinion | regulation\_list | fxrz\_list |
|
||||
| law_list | public_opinion | regulation_list | fxrz_list |
|
||||
|
||||
| 持续监管 | 交易管理 | 市场管理 | 上市委会议公告 |
|
||||
| ---------- | ---------- | ---------- | --------------- |
|
||||
| cxjg\_list | jygl\_list | scgl\_list | meeting\_notice |
|
||||
| cxjg_list | jygl_list | scgl_list | meeting_notice |
|
||||
|
||||
| 上市委会议结果公告 | 上市委会议变更公告 | 并购重组委会议公告 |
|
||||
| ------------------ | ------------------ | ------------------ |
|
||||
| meeting\_result | meeting\_change | bgcz\_notice |
|
||||
| meeting_result | meeting_change | bgcz_notice |
|
||||
|
||||
| 并购重组委会议结果公告 | 并购重组委会议变更公告 | 终止审核 | 注册结果 |
|
||||
| ---------------------- | ---------------------- | ------------------ | ------------- |
|
||||
| bgcz\_result | bgcz\_change | termination\_audit | audit\_result |`,
|
||||
| bgcz_result | bgcz_change | termination_audit | audit_result |`,
|
||||
};
|
||||
|
||||
async function handler(ctx) {
|
||||
|
|
@ -187,7 +187,7 @@ async function handler(ctx) {
|
|||
|
||||
let items = [];
|
||||
|
||||
switch (nodes[category].type) {
|
||||
switch (type) {
|
||||
case '/info/listse':
|
||||
items = data.data.content.map((item) => ({
|
||||
title: item.title,
|
||||
|
|
@ -205,6 +205,9 @@ async function handler(ctx) {
|
|||
pubDate: parseDate(item.pubDate.time),
|
||||
}));
|
||||
break;
|
||||
|
||||
default:
|
||||
throw new Error(`Unknown type: ${type}`);
|
||||
}
|
||||
|
||||
return {
|
||||
|
|
|
|||
|
|
@ -36,13 +36,13 @@ export const route: Route = {
|
|||
|
||||
| 监管 | 银行 | 证券基金 | 信托保险 | 投资 | 创新 | 市场 |
|
||||
| ---------- | ---- | -------- | ---------------- | ---------- | ---------- | ------ |
|
||||
| regulation | bank | stock | insurance\_trust | investment | innovation | market |
|
||||
| regulation | bank | stock | insurance_trust | investment | innovation | market |
|
||||
|
||||
Category 列表:
|
||||
|
||||
| 封面报道 | 开卷 | 社论 | 时事 | 编辑寄语 | 经济 | 金融 | 商业 | 环境与科技 | 民生 | 副刊 |
|
||||
| ---------- | ----- | --------- | ---------------- | ------------ | ------- | ------- | -------- | ----------------------- | ------- | ------ |
|
||||
| coverstory | first | editorial | current\_affairs | editor\_desk | economy | finance | business | environment\_technology | cwcivil | column |`,
|
||||
| coverstory | first | editorial | current_affairs | editor_desk | economy | finance | business | environment_technology | cwcivil | column |`,
|
||||
};
|
||||
|
||||
async function handler(ctx) {
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ export const route: Route = {
|
|||
handler,
|
||||
description: `| CCF 新闻 | CCF 聚焦 | ACM 信息 |
|
||||
| ----------- | -------- | --------- |
|
||||
| Media\_list | Focus | ACM\_News |`,
|
||||
| Media_list | Focus | ACM_News |`,
|
||||
};
|
||||
|
||||
async function handler(ctx) {
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ export const route: Route = {
|
|||
description: `::: tip
|
||||
全部期刊可以在 [这里](http://qk.chaoxing.com/space/index) 找到,你也可以从 [学科分类](https://qikan.chaoxing.com/jourclassify) 和 [期刊导航](https://qikan.chaoxing.com/search/openmag) 中发现更多期刊。
|
||||
|
||||
如订阅 [**上海文艺**](http://m.chaoxing.com/mqk/list?sw=\&mags=6b5c39b3dd84352be512e29df0297437\&isort=20\&from=space),其 URL 为 \`http://m.chaoxing.com/mqk/list?mags=6b5c39b3dd84352be512e29df0297437\`。\`6b5c39b3dd84352be512e29df0297437\` 即为期刊 id,所得路由为 [\`/chaoxing/qk/6b5c39b3dd84352be512e29df0297437\`](https://rsshub.app/chaoxing/qk/6b5c39b3dd84352be512e29df0297437)
|
||||
如订阅 [**上海文艺**](http://m.chaoxing.com/mqk/list?sw=&mags=6b5c39b3dd84352be512e29df0297437&isort=20&from=space),其 URL 为 \`http://m.chaoxing.com/mqk/list?mags=6b5c39b3dd84352be512e29df0297437\`。\`6b5c39b3dd84352be512e29df0297437\` 即为期刊 id,所得路由为 [\`/chaoxing/qk/6b5c39b3dd84352be512e29df0297437\`](https://rsshub.app/chaoxing/qk/6b5c39b3dd84352be512e29df0297437)
|
||||
:::
|
||||
|
||||
::: warning
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ const dynamicTpye = { 0: '基本动态', 8: '酷图', 9: '评论', 10: '提问',
|
|||
|
||||
const getRandomDEVICE_ID = () => {
|
||||
let id = [10, 6, 6, 6, 14];
|
||||
id = id.map((i) => Math.random().toString(36).substring(2, i));
|
||||
id = id.map((i) => Math.random().toString(36).slice(2, i));
|
||||
return id.join('-');
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -60,6 +60,8 @@ async function handler(ctx) {
|
|||
case '3':
|
||||
nav_name = '唱片';
|
||||
break;
|
||||
default:
|
||||
throw new Error(`Unknown nav: ${nav}`);
|
||||
}
|
||||
|
||||
return {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
import * as url from 'node:url';
|
||||
|
||||
import { load } from 'cheerio';
|
||||
|
||||
import type { Route } from '@/types';
|
||||
|
|
@ -15,7 +13,7 @@ export const route: Route = {
|
|||
|
||||
async function handler(ctx) {
|
||||
const id = ctx.req.param('id');
|
||||
const link = url.resolve(host, id);
|
||||
const link = new URL(id, host).href;
|
||||
const response = await got.get(link);
|
||||
const $ = load(response.data);
|
||||
const title = $('div.h1').text();
|
||||
|
|
|
|||
|
|
@ -28,24 +28,24 @@ export const route: Route = {
|
|||
handler,
|
||||
description: `| 榜单 / 集合 | 路由 |
|
||||
| ------------------ | ----------------------------- |
|
||||
| 实时热门书影音 | subject\_real\_time\_hotest |
|
||||
| 影院热映 | movie\_showing |
|
||||
| 实时热门电影 | movie\_real\_time\_hotest |
|
||||
| 实时热门电视 | tv\_real\_time\_hotest |
|
||||
| 一周口碑电影榜 | movie\_weekly\_best |
|
||||
| 华语口碑剧集榜 | tv\_chinese\_best\_weekly |
|
||||
| 全球口碑剧集榜 | tv\_global\_best\_weekly |
|
||||
| 国内口碑综艺榜 | show\_chinese\_best\_weekly |
|
||||
| 国外口碑综艺榜 | show\_global\_best\_weekly |
|
||||
| 热播新剧国产剧 | tv\_domestic |
|
||||
| 热播新剧欧美剧 | tv\_american |
|
||||
| 热播新剧日剧 | tv\_japanese |
|
||||
| 热播新剧韩剧 | tv\_korean |
|
||||
| 热播新剧动画 | tv\_animation |
|
||||
| 虚构类小说热门榜 | book\_fiction\_hot\_weekly |
|
||||
| 非虚构类小说热门榜 | book\_nonfiction\_hot\_weekly |
|
||||
| 热门单曲榜 | music\_single |
|
||||
| 华语新碟榜 | music\_chinese |
|
||||
| 实时热门书影音 | subject_real_time_hotest |
|
||||
| 影院热映 | movie_showing |
|
||||
| 实时热门电影 | movie_real_time_hotest |
|
||||
| 实时热门电视 | tv_real_time_hotest |
|
||||
| 一周口碑电影榜 | movie_weekly_best |
|
||||
| 华语口碑剧集榜 | tv_chinese_best_weekly |
|
||||
| 全球口碑剧集榜 | tv_global_best_weekly |
|
||||
| 国内口碑综艺榜 | show_chinese_best_weekly |
|
||||
| 国外口碑综艺榜 | show_global_best_weekly |
|
||||
| 热播新剧国产剧 | tv_domestic |
|
||||
| 热播新剧欧美剧 | tv_american |
|
||||
| 热播新剧日剧 | tv_japanese |
|
||||
| 热播新剧韩剧 | tv_korean |
|
||||
| 热播新剧动画 | tv_animation |
|
||||
| 虚构类小说热门榜 | book_fiction_hot_weekly |
|
||||
| 非虚构类小说热门榜 | book_nonfiction_hot_weekly |
|
||||
| 热门单曲榜 | music_single |
|
||||
| 华语新碟榜 | music_chinese |
|
||||
| ... | ... |
|
||||
|
||||
| 额外参数 | 含义 | 接受的值 | 默认值 |
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ export const route: Route = {
|
|||
handler,
|
||||
description: `| 一周口碑电影榜 | 华语口碑剧集榜 |
|
||||
| ------------------- | ------------------------- |
|
||||
| movie\_weekly\_best | tv\_chinese\_best\_weekly |`,
|
||||
| movie_weekly_best | tv_chinese_best_weekly |`,
|
||||
};
|
||||
|
||||
async function handler(ctx) {
|
||||
|
|
|
|||
|
|
@ -77,7 +77,7 @@ async function handler(ctx) {
|
|||
|
||||
const response = await got(api);
|
||||
const data = response.data.replace(/,"page":"(.*?)","num":/, ',"num":');
|
||||
let json = JSON.parse(data.substring(1, data.length - 1)).shuju;
|
||||
let json = JSON.parse(data.slice(1, -1)).shuju;
|
||||
if (json.length > 20) {
|
||||
json = json.slice(0, 20);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,6 +7,6 @@ export const namespace: Namespace = {
|
|||
| Key | Meaning | Accepted keys | Default value |
|
||||
| ------------ | ------------------------------------------------------------------------------- | -------------- | ------------- |
|
||||
| bittorrent | Whether include a link to the latest torrent | 0/1/true/false | false |
|
||||
| embed\_thumb | Whether the cover image is embedded in the RSS feed rather than given as a link | 0/1/true/false | false |`,
|
||||
| embed_thumb | Whether the cover image is embedded in the RSS feed rather than given as a link | 0/1/true/false | false |`,
|
||||
lang: 'en',
|
||||
};
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ export const route: Route = {
|
|||
|
||||
| समाचार | अर्थ / वाणिज्य | विचार | खेलकुद | उपत्यका | मनोरञ्जन | फोटोफिचर | फिचर | विश्व | ब्लग |
|
||||
| ---- | -------- | ------- | ------ | -------- | ------------- | -------------- | ------- | ----- | ---- |
|
||||
| news | business | opinion | sports | national | entertainment | photo\_feature | feature | world | blog |`,
|
||||
| news | business | opinion | sports | national | entertainment | photo_feature | feature | world | blog |`,
|
||||
};
|
||||
|
||||
async function handler(ctx) {
|
||||
|
|
|
|||
|
|
@ -134,7 +134,7 @@ export const route: Route = {
|
|||
|
||||
| 更新の新しい順 | 更新の古い順 | 投稿の新しい順 | 投稿の古い順 | お気に入り数順 |
|
||||
| -------------- | ------------ | -------------- | ------------ | -------------- |
|
||||
| updater | update\_old | newer | create\_old | popular |
|
||||
| updater | update_old | newer | create_old | popular |
|
||||
|
||||
Rating
|
||||
|
||||
|
|
@ -201,6 +201,9 @@ async function handler(ctx) {
|
|||
description: `${item.buyable_lowest_plan.description ? `<p>${item.buyable_lowest_plan.description}</p>` : ''}<img src="${item.thumb ? item.thumb.main : item.thumb_micro}">`,
|
||||
}));
|
||||
break;
|
||||
|
||||
default:
|
||||
throw new Error(`Unknown type: ${type}`);
|
||||
}
|
||||
|
||||
return {
|
||||
|
|
|
|||
|
|
@ -117,6 +117,9 @@ async function handler(ctx) {
|
|||
break;
|
||||
case 'intcreditcard':
|
||||
bankname = '境外信用卡';
|
||||
break;
|
||||
default:
|
||||
throw new Error(`Unknown bank: ${bank}`);
|
||||
}
|
||||
|
||||
const response = await got.get(target, {
|
||||
|
|
|
|||
|
|
@ -196,9 +196,9 @@ const parseBlock = (block: Block, entityMap: Readonly<Record<string, Entity>>):
|
|||
let lastOffset = 0;
|
||||
|
||||
for (const range of groupedRanges) {
|
||||
resultParts.push(text.substring(lastOffset, range.offset));
|
||||
resultParts.push(text.slice(lastOffset, range.offset));
|
||||
|
||||
let styledText = text.substring(range.offset, range.offset + range.length);
|
||||
let styledText = text.slice(range.offset, range.offset + range.length);
|
||||
|
||||
if (range.styles.length > 0) {
|
||||
const combinedStyle: Style = {};
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ export const route: Route = {
|
|||
handler,
|
||||
description: `| 推荐 | 股票 | 基金 | 新股 | 研报 |
|
||||
| --------------- | ----- | ---- | ---------- | -------- |
|
||||
| web\_home\_page | stock | fund | new\_stock | research |`,
|
||||
| web_home_page | stock | fund | new_stock | research |`,
|
||||
};
|
||||
|
||||
async function handler(ctx) {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
import * as url from 'node:url';
|
||||
|
||||
import type { DataItem, Route } from '@/types';
|
||||
import ofetch from '@/utils/ofetch';
|
||||
|
||||
|
|
@ -39,7 +37,7 @@ async function handler(ctx) {
|
|||
}
|
||||
|
||||
const suffix = 'search?o='.concat(order, '&q=', encodeURIComponent(query), '&s=', sort, '&type=Repositories');
|
||||
const link = url.resolve(host, suffix);
|
||||
const link = new URL(suffix, host).href;
|
||||
const response = await ofetch(link, {
|
||||
headers: {
|
||||
accept: 'application/json',
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ export const route: Route = {
|
|||
| \`o\` | Sorting Order | \`asc\`, \`desc\` |
|
||||
| \`s\` | Sorting Criteria | \`stars\`, \`forks\`, \`updated\` |
|
||||
|
||||
For instance, the \`/github/topics/framework/l=php&o=desc&s=stars\` route will generate the RSS feed corresponding to this [page](https://github.com/topics/framework?l=php\&o=desc\&s=stars).`,
|
||||
For instance, the \`/github/topics/framework/l=php&o=desc&s=stars\` route will generate the RSS feed corresponding to this [page](https://github.com/topics/framework?l=php&o=desc&s=stars).`,
|
||||
};
|
||||
|
||||
async function handler(ctx) {
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ export const route: Route = {
|
|||
|
||||
1. Basic mode, sample query is the keywords desired, eg.「data visualization」, [https://rsshub.app/google/scholar/data+visualization](https://rsshub.app/google/scholar/data+visualization).
|
||||
|
||||
2. Advanced mode, visit [Google Scholar](https://scholar.google.com/schhp?hl=en\&as_sdt=0,5), click the top left corner and select「Advanced Search」, fill in your conditions and submit the search. The URL should look like this: [https://scholar.google.com/scholar?as\_q=data+visualization\&as\_epq=\&as\_oq=\&as\_eq=\&as\_occt=any\&as\_sauthors=\&as\_publication=\&as\_ylo=2018\&as\_yhi=\&hl=en\&as\_sdt=0%2C5](https://scholar.google.com/scholar?as_q=data+visualization\&as_epq=\&as_oq=\&as_eq=\&as_occt=any\&as_sauthors=\&as_publication=\&as_ylo=2018\&as_yhi=\&hl=en\&as_sdt=0%2C5), copy everything after \`https://scholar.google.com/scholar?\` from the URL and use it as the query for this route. The complete URL for the above example should look like this: [https://rsshub.app/google/scholar/as\_q=data+visualization\&as\_epq=\&as\_oq=\&as\_eq=\&as\_occt=any\&as\_sauthors=\&as\_publication=\&as\_ylo=2018\&as\_yhi=\&hl=en\&as\_sdt=0%2C5](https://rsshub.app/google/scholar/as_q=data+visualization\&as_epq=\&as_oq=\&as_eq=\&as_occt=any\&as_sauthors=\&as_publication=\&as_ylo=2018\&as_yhi=\&hl=en\&as_sdt=0%2C5).`,
|
||||
2. Advanced mode, visit [Google Scholar](https://scholar.google.com/schhp?hl=en&as_sdt=0,5), click the top left corner and select「Advanced Search」, fill in your conditions and submit the search. The URL should look like this: [https://scholar.google.com/scholar?as_q=data+visualization&as_epq=&as_oq=&as_eq=&as_occt=any&as_sauthors=&as_publication=&as_ylo=2018&as_yhi=&hl=en&as_sdt=0%2C5](https://scholar.google.com/scholar?as_q=data+visualization&as_epq=&as_oq=&as_eq=&as_occt=any&as_sauthors=&as_publication=&as_ylo=2018&as_yhi=&hl=en&as_sdt=0%2C5), copy everything after \`https://scholar.google.com/scholar?\` from the URL and use it as the query for this route. The complete URL for the above example should look like this: [https://rsshub.app/google/scholar/as_q=data+visualization&as_epq=&as_oq=&as_eq=&as_occt=any&as_sauthors=&as_publication=&as_ylo=2018&as_yhi=&hl=en&as_sdt=0%2C5](https://rsshub.app/google/scholar/as_q=data+visualization&as_epq=&as_oq=&as_eq=&as_occt=any&as_sauthors=&as_publication=&as_ylo=2018&as_yhi=&hl=en&as_sdt=0%2C5).`,
|
||||
};
|
||||
|
||||
async function handler(ctx) {
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ export const route: Route = {
|
|||
],
|
||||
description: `| 通知公告 | 国企资讯 | 国企简介 | 国企招聘 |
|
||||
| --------- | -------- | -------- | -------- |
|
||||
| tzgg\_191 | gqdj | gqjj | gqzp |`,
|
||||
| tzgg_191 | gqdj | gqjj | gqzp |`,
|
||||
};
|
||||
|
||||
async function handler(ctx) {
|
||||
|
|
|
|||
|
|
@ -98,6 +98,8 @@ async function handler(ctx) {
|
|||
case undefined:
|
||||
list_element = '#d11_li ul a[href*="content"], .two-o ul a[href*="content"]';
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case 'zwgk':
|
||||
|
|
@ -110,10 +112,16 @@ async function handler(ctx) {
|
|||
case undefined:
|
||||
list_element = '.swiper-slide a, .bt a, .zcjdlist a';
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
title_element = '#ScDetailTitle';
|
||||
description_element = '#zoomcon';
|
||||
|
|
@ -143,8 +151,12 @@ async function handler(ctx) {
|
|||
case undefined:
|
||||
list_element = '.zw-news-list a';
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
title_element = '.title';
|
||||
description_element = '.content';
|
||||
|
|
@ -170,6 +182,8 @@ async function handler(ctx) {
|
|||
case 'xwzx':
|
||||
list_element = '.news_title li a, .news_title_ li a';
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
title_element = '.article_title';
|
||||
|
|
@ -233,6 +247,8 @@ async function handler(ctx) {
|
|||
case 'zwxx':
|
||||
list_element = '.marqueetop a, .gud-file ul li a, .dyn-box ul li a, .org-list a';
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
title_element = '.pre-box h3';
|
||||
|
|
@ -287,6 +303,8 @@ async function handler(ctx) {
|
|||
list_element = '.img a';
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
title_element = '.bt';
|
||||
title_match = '(.*)\n';
|
||||
|
|
@ -365,6 +383,8 @@ async function handler(ctx) {
|
|||
pubDate_element = '.HTime';
|
||||
pubDate_match = '发布日期:(.*) 点击率';
|
||||
break;
|
||||
default:
|
||||
throw new Error(`Unknown path[1]: ${path[1]}`);
|
||||
}
|
||||
const info = {
|
||||
pathstartat,
|
||||
|
|
|
|||
|
|
@ -62,6 +62,8 @@ async function handler(ctx) {
|
|||
id = 'zwgk/zcjd';
|
||||
name = '政策解读';
|
||||
break;
|
||||
default:
|
||||
throw new Error(`Unknown category: ${ctx.req.param('category')}`);
|
||||
}
|
||||
|
||||
const res = await got(`${host}/${id}/`);
|
||||
|
|
@ -111,6 +113,8 @@ async function handler(ctx) {
|
|||
author: content('.author').text().trim() === '本网' ? '茂名市茂南区人民政府网' : content('.author').text().trim(),
|
||||
};
|
||||
}
|
||||
default:
|
||||
throw new Error(`Unknown host: ${url.host}`);
|
||||
}
|
||||
});
|
||||
})
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ export const route: Route = {
|
|||
handler,
|
||||
description: `| 政策解读 | 最新文件 | 公告公示 | 教育部简报 | 教育要闻 |
|
||||
| :----------: | :----------: | :------: | :-----------------: | :--------------: |
|
||||
| policy\_anal | newest\_file | notice | edu\_ministry\_news | edu\_focus\_news |`,
|
||||
| policy_anal | newest_file | notice | edu_ministry_news | edu_focus_news |`,
|
||||
};
|
||||
|
||||
async function handler(ctx) {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
import { URL } from 'node:url';
|
||||
|
||||
import { load } from 'cheerio';
|
||||
|
||||
import type { DataItem, Route } from '@/types';
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ export const route: Route = {
|
|||
description: `| Sort | Description |
|
||||
| --------------- | -------------- |
|
||||
| today | Daily installs |
|
||||
| total\_installs | Total installs |
|
||||
| total_installs | Total installs |
|
||||
| ratings | Ratings |
|
||||
| created | Created date |
|
||||
| updated | Updated date |
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ export const route: Route = {
|
|||
maintainers: ['Fatpandac'],
|
||||
handler,
|
||||
description: `::: tip
|
||||
海外折扣: [\`/guangdiu/k=daily&c=us\`](https://rsshub.app/guangdiu/k=daily\&c=us)
|
||||
海外折扣: [\`/guangdiu/k=daily&c=us\`](https://rsshub.app/guangdiu/k=daily&c=us)
|
||||
:::`,
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -104,7 +104,7 @@ async function ggtzParse(ctx, $) {
|
|||
|
||||
author = header.slice(0, index - 2) || '';
|
||||
|
||||
const date = header.substring(index + 3, index + 19);
|
||||
const date = header.slice(index + 3, index + 19);
|
||||
pubDate = parseDate(date, 'YYYY-MM-DD HH:mm');
|
||||
} else {
|
||||
const date = $(item).find('a[class=c269582_date]').text();
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ export const route: Route = {
|
|||
name: '科普',
|
||||
maintainers: ['Fatpandac'],
|
||||
handler,
|
||||
description: `| latest | bitcoin | ethereum | defi | inter\_blockchain | mining | safety | satoshi\_nakomoto | public\_blockchain |
|
||||
description: `| latest | bitcoin | ethereum | defi | inter_blockchain | mining | safety | satoshi_nakomoto | public_blockchain |
|
||||
| ------ | ------- | -------- | ---- | ----------------- | ------ | ------ | ----------------- | ------------------ |
|
||||
| 最新 | 比特币 | 以太坊 | DeFi | 跨链 | 挖矿 | 安全 | 中本聪 | 公链 |`,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ export const route: Route = {
|
|||
|
||||
| English | 中文简体 | 中文繁體 |
|
||||
| ------- | -------- | -------- |
|
||||
| english | chs | tc\_chi |`,
|
||||
| english | chs | tc_chi |`,
|
||||
};
|
||||
|
||||
async function handler(ctx) {
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ export const route: Route = {
|
|||
url: 'xky.hunau.edu.cn/',
|
||||
description: `| 分类 | 通知公告 | 学院新闻 | 其他分类通知... |
|
||||
| ---- | ---------- | -------- | --------------- |
|
||||
| 参数 | tzgg\_8472 | xyxw | 对应 URL |`,
|
||||
| 参数 | tzgg_8472 | xyxw | 对应 URL |`,
|
||||
};
|
||||
|
||||
async function handler(ctx) {
|
||||
|
|
|
|||
|
|
@ -1,79 +0,0 @@
|
|||
import { load } from 'cheerio'; // 类似 jQuery 的 API HTML 解析器
|
||||
|
||||
import type { Route } from '@/types';
|
||||
import cache from '@/utils/cache';
|
||||
import ofetch from '@/utils/ofetch'; // 统一使用的请求库
|
||||
import { parseDate } from '@/utils/parse-date';
|
||||
|
||||
export const route: Route = {
|
||||
path: '/zh-Hans/docs/:type',
|
||||
categories: ['new-media'],
|
||||
example: '/informedainews/zh-Hans/docs/world-news-daily',
|
||||
parameters: { type: 'world-news-daily|tech-enthusiast-weekly|ai-enthusiast-daily' },
|
||||
features: {
|
||||
requireConfig: false,
|
||||
requirePuppeteer: false,
|
||||
antiCrawler: false,
|
||||
supportBT: false,
|
||||
supportPodcast: false,
|
||||
supportScihub: false,
|
||||
},
|
||||
radar: [
|
||||
{
|
||||
source: ['informedainews.com', 'informedainews.com/zh-Hans/docs/:type', 'informedainews.com/docs/:type'],
|
||||
target: '/zh-Hans/docs/:type',
|
||||
},
|
||||
],
|
||||
name: '知闻AI',
|
||||
maintainers: ['guicaiyue'],
|
||||
handler,
|
||||
};
|
||||
|
||||
async function handler(ctx) {
|
||||
const { type } = ctx.req.param();
|
||||
const response = await ofetch(`https://informedainews.com/zh-Hans/docs/${type}`);
|
||||
const $ = load(response);
|
||||
const list = $('li.theme-doc-sidebar-item-category ul li')
|
||||
.toArray()
|
||||
.map((item) => {
|
||||
item = $(item);
|
||||
const a = item.find('a').first();
|
||||
const text = a.text();
|
||||
// 找到第一个'('字符的位置
|
||||
const start = text.indexOf('(');
|
||||
// 找到第一个')'字符的位置
|
||||
const end = text.indexOf(')');
|
||||
// 从第一个'('到第一个')'之间的子字符串就是日期
|
||||
const date = text.substring(start + 1, end);
|
||||
return {
|
||||
title: text,
|
||||
link: `https://informedainews.com${a.attr('href')}`,
|
||||
pubDate: parseDate(date),
|
||||
author: 'AI',
|
||||
};
|
||||
});
|
||||
|
||||
const items = await Promise.all(
|
||||
list.map((item) =>
|
||||
cache.tryGet(item.link, async () => {
|
||||
const response = await ofetch(item.link);
|
||||
const $ = load(response);
|
||||
|
||||
// 选择类名为“comment-body”的第一个元素
|
||||
item.description = $('.theme-doc-markdown.markdown').first().html();
|
||||
|
||||
// 上面每个列表项的每个属性都在此重用,
|
||||
// 并增加了一个新属性“description”
|
||||
return item;
|
||||
})
|
||||
)
|
||||
);
|
||||
return {
|
||||
// 源标题
|
||||
title: `${type} docs`,
|
||||
// 源链接
|
||||
link: `https://informedainews.com/zh-Hans/docs/${type}`,
|
||||
// 源文章
|
||||
item: items,
|
||||
};
|
||||
}
|
||||
|
|
@ -1,19 +0,0 @@
|
|||
import type { Namespace } from '@/types';
|
||||
|
||||
export const namespace: Namespace = {
|
||||
name: 'Informed AI News',
|
||||
url: 'informedainews.com',
|
||||
description: `
|
||||
::: tip
|
||||
informed AI RSS feeds:
|
||||
|
||||
- World News Daily: 'https://rsshub.app/informedainews/zh-Hans/docs/world-news-daily'
|
||||
- Tech Enthusiast Weekly: 'https://rsshub.app/informedainews/zh-Hans/docs/tech-enthusiast-weekly'
|
||||
- AI Enthusiast Weekly: 'https://rsshub.app/informedainews/zh-Hans/docs/ai-enthusiast-daily'
|
||||
:::`,
|
||||
|
||||
zh: {
|
||||
name: '知闻AI',
|
||||
},
|
||||
lang: 'en',
|
||||
};
|
||||
|
|
@ -63,6 +63,8 @@ const utils = {
|
|||
case 'en':
|
||||
customFormat = dayjs(t, formatEnDate, true).isValid() ? formatEnDate : dayjs(t, formatEnDateTime, true).isValid() ? formatEnDateTime : undefined;
|
||||
break;
|
||||
default:
|
||||
// empty
|
||||
}
|
||||
|
||||
if (o) {
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ export const namespace: Namespace = {
|
|||
description: `::: tip
|
||||
JavDB 有多个备用域名,本路由默认使用永久域名 \`https://javdb.com\` ,若该域名无法访问,可以通过在路由最后加上 \`?domain=<域名>\` 指定路由访问的域名。如指定备用域名为 \`https://javdb36.com\`,则在所有 JavDB 路由最后加上 \`?domain=javdb36.com\` 即可,此时路由为 [\`/javdb?domain=javdb36.com\`](https://rsshub.app/javdb?domain=javdb36.com)
|
||||
|
||||
如果加入了 **分類** 参数,直接在分類参数后加入 \`?domain=<域名>\` 即可。如指定分類 URL 为 \`https://javdb.com/tags?c2=5&c10=1\` 并指定备用域名为 \`https://javdb36.com\`,即在 \`/javdb/tags/c2=5&c10=1\` 最后加上 \`?domain=javdb36.com\`,此时路由为 [\`/javdb/tags/c2=5&c10=1?domain=javdb36.com\`](https://rsshub.app/javdb/tags/c2=5\&c10=1?domain=javdb36.com)
|
||||
如果加入了 **分類** 参数,直接在分類参数后加入 \`?domain=<域名>\` 即可。如指定分類 URL 为 \`https://javdb.com/tags?c2=5&c10=1\` 并指定备用域名为 \`https://javdb36.com\`,即在 \`/javdb/tags/c2=5&c10=1\` 最后加上 \`?domain=javdb36.com\`,此时路由为 [\`/javdb/tags/c2=5&c10=1?domain=javdb36.com\`](https://rsshub.app/javdb/tags/c2=5&c10=1?domain=javdb36.com)
|
||||
|
||||
**排行榜**、**搜索**、**演員**、**片商** 参数同适用于 **分類** 参数的上述规则
|
||||
:::
|
||||
|
|
|
|||
|
|
@ -87,7 +87,7 @@ export const route: Route = {
|
|||
|
||||
| [正午](https://www.jiemian.com/lists/53.html) | [箭厂](https://www.jiemian.com/video/lists/195_1.html) |
|
||||
| --------------------------------------------- | ------------------------------------------------------ |
|
||||
| 53 | video/lists/195\_1 |
|
||||
| 53 | video/lists/195_1 |
|
||||
|
||||
#### [快报](https://www.jiemian.com/lists/4.html)
|
||||
|
||||
|
|
|
|||
|
|
@ -11,9 +11,9 @@ export const route: Route = {
|
|||
handler,
|
||||
description: `| [界面 Vnews](https://www.jiemian.com/video/lists/258_1.html) | [直播](https://www.jiemian.com/videoLive/lists_1.html) | [箭厂](https://www.jiemian.com/video/lists/195_1.html) | [面谈](https://www.jiemian.com/video/lists/111_1.html) | [品牌创酷](https://www.jiemian.com/video/lists/226_1.html) | [番 茄社](https://www.jiemian.com/video/lists/567_1.html) |
|
||||
| ------------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | ---------------------------------------------------------- | --------------------------------------------------------- |
|
||||
| 258\_1 | videoLive/lists\_1 | 195\_1 | 111\_1 | 226\_1 | 567\_1 |
|
||||
| 258_1 | videoLive/lists_1 | 195_1 | 111_1 | 226_1 | 567_1 |
|
||||
|
||||
| [商业微史记](https://www.jiemian.com/video/lists/882_1.html) |
|
||||
| ------------------------------------------------------------ |
|
||||
| 882\_1 |`,
|
||||
| 882_1 |`,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
import * as url from 'node:url';
|
||||
|
||||
import { load } from 'cheerio';
|
||||
|
||||
import got from '@/utils/got';
|
||||
|
|
@ -10,7 +8,7 @@ const ProcessFeed = async (list, cache) => {
|
|||
|
||||
const items = await Promise.all(
|
||||
list.map(async (e) => {
|
||||
const link = url.resolve(host, e);
|
||||
const link = new URL(e, host).href;
|
||||
|
||||
const single = await cache.tryGet(link, async () => {
|
||||
const response = await got.get(link);
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ export const route: Route = {
|
|||
| \`period\` | 发布时间 | \`1/7/30\` | 空 |
|
||||
|
||||
例如:
|
||||
[\`/linkedin/cn/jobs/Software?location=shanghai&period=1\`](https://rsshub.app/linkedin/cn/jobs/Software?location=shanghai\&period=1): 查找所有在上海的今日发布的所有 Software 工作
|
||||
[\`/linkedin/cn/jobs/Software?location=shanghai&period=1\`](https://rsshub.app/linkedin/cn/jobs/Software?location=shanghai&period=1): 查找所有在上海的今日发布的所有 Software 工作
|
||||
|
||||
**为了方便起见,建议您在 [LinkedIn.cn](https://www.linkedin.cn/incareer/jobs/search) 上进行搜索,并使用 [RSSHub Radar](https://github.com/DIYgod/RSSHub-Radar) 加载特定的 feed。**`,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ function parseJSONP(jsonpData) {
|
|||
try {
|
||||
const startPos = jsonpData.indexOf('({');
|
||||
const endPos = jsonpData.lastIndexOf('})');
|
||||
let jsonString = jsonpData.substring(startPos + 1, endPos + 1);
|
||||
let jsonString = jsonpData.slice(startPos + 1, endPos + 1);
|
||||
|
||||
// remove escaped single quotes since they are not valid json
|
||||
jsonString = jsonString.replaceAll(String.raw`\'`, "'");
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ export const route: Route = {
|
|||
url: 'www.mhgui.com/user/book/shelf',
|
||||
description: `::: tip
|
||||
个人订阅需要自建
|
||||
环境变量需要添加 MHGUI\_COOKIE
|
||||
环境变量需要添加 MHGUI_COOKIE
|
||||
:::`,
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ export const route: Route = {
|
|||
description: `::: tip
|
||||
下表为科室对应的 sid,若想获得 tid,可以到对应科室页面 URL 中寻找 \`t_id\` 字段的值,下面是一个例子:
|
||||
|
||||
如 [肿瘤 - NSCLC](https://www.medsci.cn/department/details?s_id=5\&t_id=277) 的 URL 为 \`https://www.medsci.cn/department/details?s_id=5&t_id=277\`,可以看到此时 \`s_id\` 对应 \`sid\` 的值为 5, \`t_id\` 对应 \`tid\` 的值为 277,所以可以得到路由 [\`/medsci/5/277\`](https://rsshub.app/medsci/5/277)
|
||||
如 [肿瘤 - NSCLC](https://www.medsci.cn/department/details?s_id=5&t_id=277) 的 URL 为 \`https://www.medsci.cn/department/details?s_id=5&t_id=277\`,可以看到此时 \`s_id\` 对应 \`sid\` 的值为 5, \`t_id\` 对应 \`tid\` 的值为 277,所以可以得到路由 [\`/medsci/5/277\`](https://rsshub.app/medsci/5/277)
|
||||
:::
|
||||
|
||||
| 心血管 | 内分泌 | 消化 | 呼吸 | 神经科 |
|
||||
|
|
|
|||
|
|
@ -18,6 +18,9 @@ const handler = async (ctx) => {
|
|||
type = 'available';
|
||||
title = 'All Releases';
|
||||
break;
|
||||
default:
|
||||
// defaults to 'new-releases'
|
||||
break;
|
||||
}
|
||||
|
||||
const url = `https://www.metacritic.com/browse/games/release-date/${type}/${ctx.req.param('platform')}/${sort}`;
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ export const route: Route = {
|
|||
|
||||
| 最新上线 | 金额最高 | 评论最多 |
|
||||
| --------- | ---------- | ------------ |
|
||||
| top\_time | top\_money | top\_comment |
|
||||
| top_time | top_money | top_comment |
|
||||
|
||||
状态
|
||||
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ export const route: Route = {
|
|||
handler,
|
||||
description: `| 交易通知 | 政策规定 | 业务通知 |
|
||||
| ------------ | -------------------- | ----------------- |
|
||||
| zonghezixun3 | zhengceguiding\_list | yewutongzhi\_list |`,
|
||||
| zonghezixun3 | zhengceguiding_list | yewutongzhi_list |`,
|
||||
};
|
||||
|
||||
async function handler(ctx) {
|
||||
|
|
|
|||
|
|
@ -127,19 +127,19 @@ export const route: Route = {
|
|||
|
||||
| 气温距平(最近10天) | 气温距平(最近20天) | 气温距平(最近30天) | 气温距平(最近90天) | 最低气温距平(最近30天) |
|
||||
| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | ------------------------------------------------------------------ |
|
||||
| [glbtmeana10\_](https://rsshub.app/ncc-cma/cmdp/image/glbtmeana10_) | [glbtmeana20\_](https://rsshub.app/ncc-cma/cmdp/image/glbtmeana20_) | [glbtmeana30\_](https://rsshub.app/ncc-cma/cmdp/image/glbtmeana30_) | [glbtmeana90\_](https://rsshub.app/ncc-cma/cmdp/image/glbtmeana90_) | [glbtmina30\_](https://rsshub.app/ncc-cma/cmdp/image/glbtmina30_) |
|
||||
| [glbtmeana10_](https://rsshub.app/ncc-cma/cmdp/image/glbtmeana10_) | [glbtmeana20_](https://rsshub.app/ncc-cma/cmdp/image/glbtmeana20_) | [glbtmeana30_](https://rsshub.app/ncc-cma/cmdp/image/glbtmeana30_) | [glbtmeana90_](https://rsshub.app/ncc-cma/cmdp/image/glbtmeana90_) | [glbtmina30_](https://rsshub.app/ncc-cma/cmdp/image/glbtmina30_) |
|
||||
|
||||
| 最低气温距平(最近90天) | 最高气温距平(最近30天) | 最高气温距平(最近90天) |
|
||||
| ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ |
|
||||
| [glbtmina90\_](https://rsshub.app/ncc-cma/cmdp/image/glbtmina90_) | [glbtmaxa30\_](https://rsshub.app/ncc-cma/cmdp/image/glbtmaxa30_) | [glbtmaxa90\_](https://rsshub.app/ncc-cma/cmdp/image/glbtmaxa90_) |
|
||||
| [glbtmina90_](https://rsshub.app/ncc-cma/cmdp/image/glbtmina90_) | [glbtmaxa30_](https://rsshub.app/ncc-cma/cmdp/image/glbtmaxa30_) | [glbtmaxa90_](https://rsshub.app/ncc-cma/cmdp/image/glbtmaxa90_) |
|
||||
|
||||
| 降水量(最近10天) | 降水量(最近20天) | 降水量(最近30天) | 降水量(最近90天) | 降水距平百分率(最近10天) |
|
||||
| ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | ------------------------------------------------------------------ |
|
||||
| [glbrain10\_](https://rsshub.app/ncc-cma/cmdp/image/glbrain10_) | [glbrain20\_](https://rsshub.app/ncc-cma/cmdp/image/glbrain20_) | [glbrain30\_](https://rsshub.app/ncc-cma/cmdp/image/glbrain30_) | [glbrain90\_](https://rsshub.app/ncc-cma/cmdp/image/glbrain90_) | [glbraina10\_](https://rsshub.app/ncc-cma/cmdp/image/glbraina10_) |
|
||||
| [glbrain10_](https://rsshub.app/ncc-cma/cmdp/image/glbrain10_) | [glbrain20_](https://rsshub.app/ncc-cma/cmdp/image/glbrain20_) | [glbrain30_](https://rsshub.app/ncc-cma/cmdp/image/glbrain30_) | [glbrain90_](https://rsshub.app/ncc-cma/cmdp/image/glbrain90_) | [glbraina10_](https://rsshub.app/ncc-cma/cmdp/image/glbraina10_) |
|
||||
|
||||
| 降水距平百分率(最近20天) | 降水距平百分率(最近30天) | 降水距平百分率(最近90天) |
|
||||
| ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ |
|
||||
| [glbraina20\_](https://rsshub.app/ncc-cma/cmdp/image/glbraina20_) | [glbraina30\_](https://rsshub.app/ncc-cma/cmdp/image/glbraina30_) | [glbraina90\_](https://rsshub.app/ncc-cma/cmdp/image/glbraina90_) |
|
||||
| [glbraina20_](https://rsshub.app/ncc-cma/cmdp/image/glbraina20_) | [glbraina30_](https://rsshub.app/ncc-cma/cmdp/image/glbraina30_) | [glbraina90_](https://rsshub.app/ncc-cma/cmdp/image/glbraina90_) |
|
||||
|
||||
`,
|
||||
categories: ['forecast'],
|
||||
|
|
|
|||
|
|
@ -45,19 +45,19 @@ export const route: Route = {
|
|||
| ----------------------- | ---------- |
|
||||
| news | 学院新闻 |
|
||||
| academic | 学术科研 |
|
||||
| talent\_development | 人才培养 |
|
||||
| international\_exchange | 国际交流 |
|
||||
| talent_development | 人才培养 |
|
||||
| international_exchange | 国际交流 |
|
||||
| announcement | 通知公告 |
|
||||
| undergraduate\_dev | 本科生培养 |
|
||||
| postgraduate\_dev | 研究生培养 |
|
||||
| undergraduate\_recruit | 本科生招募 |
|
||||
| postgraduate\_recruit | 研究生招募 |
|
||||
| CPC\_build | 党的建设 |
|
||||
| CPC\_work | 党委工作 |
|
||||
| union\_work | 工会工作 |
|
||||
| CYL\_work | 共青团工作 |
|
||||
| security\_management | 安全管理 |
|
||||
| alumni\_style | 校友风采 |`,
|
||||
| undergraduate_dev | 本科生培养 |
|
||||
| postgraduate_dev | 研究生培养 |
|
||||
| undergraduate_recruit | 本科生招募 |
|
||||
| postgraduate_recruit | 研究生招募 |
|
||||
| CPC_build | 党的建设 |
|
||||
| CPC_work | 党委工作 |
|
||||
| union_work | 工会工作 |
|
||||
| CYL_work | 共青团工作 |
|
||||
| security_management | 安全管理 |
|
||||
| alumni_style | 校友风采 |`,
|
||||
};
|
||||
|
||||
async function handler(ctx) {
|
||||
|
|
@ -84,11 +84,11 @@ async function handler(ctx) {
|
|||
|
||||
const info = $($('.ny_con p')[1]).text();
|
||||
const s = info.search(/\d{4}-\d{2}-\d{2}/);
|
||||
const date = info.substring(s, s + 10);
|
||||
const date = info.slice(s, s + 10);
|
||||
|
||||
const au_start = info.indexOf('作者:') + 3;
|
||||
const au_end = info.lastIndexOf('|');
|
||||
const auhor = info.substring(au_start, au_end).trim();
|
||||
const auhor = info.slice(au_start, au_end).trim();
|
||||
$('.entry')
|
||||
.find('span')
|
||||
.each(function () {
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ export const namespace: Namespace = {
|
|||
name: '新榜',
|
||||
url: 'newrank.cn',
|
||||
description: `::: warning
|
||||
部署时需要配置 NEWRANK\_COOKIE,具体见部署文档
|
||||
部署时需要配置 NEWRANK_COOKIE,具体见部署文档
|
||||
请勿过高频抓取,新榜疑似对每天调用 token 总次数进行了限制,超限会报错
|
||||
:::`,
|
||||
lang: 'zh-CN',
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
import { URLSearchParams } from 'node:url';
|
||||
|
||||
import type { Route } from '@/types';
|
||||
import ofetch from '@/utils/ofetch';
|
||||
import { parseDate } from '@/utils/parse-date';
|
||||
|
|
|
|||
|
|
@ -43,6 +43,8 @@ async function handler(ctx) {
|
|||
title = '学生资讯';
|
||||
path = '1659';
|
||||
break;
|
||||
default:
|
||||
throw new Error(`Unknown type: ${type}`);
|
||||
}
|
||||
const base = 'http://ceai.njnu.edu.cn/Item/List.asp?ID=' + path;
|
||||
|
||||
|
|
|
|||
|
|
@ -42,6 +42,9 @@ async function handler(ctx) {
|
|||
case 'xstz':
|
||||
title = '学生通知';
|
||||
path = 'xstz.htm';
|
||||
break;
|
||||
default:
|
||||
throw new Error(`Unknown type: ${type}`);
|
||||
}
|
||||
const base = 'http://jwc.njnu.edu.cn/index/' + path;
|
||||
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ async function handler() {
|
|||
|
||||
const start = script.indexOf('[');
|
||||
const end = script.lastIndexOf(']');
|
||||
const t = JSON.parse(script.substring(start, end + 1));
|
||||
const t = JSON.parse(script.slice(start, end + 1));
|
||||
|
||||
// only read first page
|
||||
return t[0].infolist.map((item) => ({
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ async function handler() {
|
|||
|
||||
const start = script.indexOf('[');
|
||||
const end = script.lastIndexOf(']');
|
||||
const t = JSON.parse(script.substring(start, end + 1));
|
||||
const t = JSON.parse(script.slice(start, end + 1));
|
||||
|
||||
// only read first page
|
||||
return t[0].infolist.map((item) => ({
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ async function handler() {
|
|||
|
||||
const start = script.indexOf('[');
|
||||
const end = script.lastIndexOf(']');
|
||||
const t = JSON.parse(script.substring(start, end + 1));
|
||||
const t = JSON.parse(script.slice(start, end + 1));
|
||||
|
||||
// only read first page
|
||||
return t[0].infolist.map((item) => ({
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ export const route: Route = {
|
|||
handler,
|
||||
description: `| 首页通知公告 | 首页新闻动态 | 最新通知 | 招生信息 | 培养信息 | 学术活动 |
|
||||
| ------------ | ------------ | -------- | -------- | -------- | -------- |
|
||||
| sytzgg\_4568 | sytzgg | 14686 | 14687 | 14688 | xshdggl |`,
|
||||
| sytzgg_4568 | sytzgg | 14686 | 14687 | 14688 | xshdggl |`,
|
||||
};
|
||||
|
||||
async function handler(ctx) {
|
||||
|
|
|
|||
|
|
@ -202,6 +202,9 @@ async function handler(ctx) {
|
|||
case 'three-month':
|
||||
startTime = dayjs().subtract(90, 'd').startOf('d').format('YYYY-MM-DDTHH:mm:ss.SSS');
|
||||
break;
|
||||
|
||||
default:
|
||||
throw new Error(`Unknown time: ${time}`);
|
||||
}
|
||||
searchUrl += `&publishedAt=${startTime}Z&publishedAt=${endTime}Z`;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ export const route: Route = {
|
|||
description: `::: tip
|
||||
**编号** 仅对事件追蹤、評論節目、新聞專題三个分类起作用,例子如下:
|
||||
|
||||
对于 [事件追蹤](https://news.now.com/home/tracker) 中的 [塔利班奪權](https://news.now.com/home/tracker/detail?catCode=123\&topicId=1056) 话题,其网址为 \`https://news.now.com/home/tracker/detail?catCode=123&topicId=1056\`,其中 \`topicId\` 为 1056,则对应路由为 [\`/now/news/tracker/1056\`](https://rsshub.app/now/news/tracker/1056)
|
||||
对于 [事件追蹤](https://news.now.com/home/tracker) 中的 [塔利班奪權](https://news.now.com/home/tracker/detail?catCode=123&topicId=1056) 话题,其网址为 \`https://news.now.com/home/tracker/detail?catCode=123&topicId=1056\`,其中 \`topicId\` 为 1056,则对应路由为 [\`/now/news/tracker/1056\`](https://rsshub.app/now/news/tracker/1056)
|
||||
:::
|
||||
|
||||
| 首頁 | 港聞 | 兩岸國際 | 娛樂 |
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
import * as url from 'node:url';
|
||||
|
||||
import { load } from 'cheerio';
|
||||
|
||||
import type { Route } from '@/types';
|
||||
|
|
@ -78,7 +76,7 @@ async function handler(ctx) {
|
|||
}
|
||||
return {
|
||||
title: `${company.text()} | ${title.text()}`,
|
||||
link: url.resolve(rootUrl, title.attr('href')),
|
||||
link: new URL(title.attr('href'), rootUrl).href,
|
||||
pubDate: date.toUTCString(),
|
||||
};
|
||||
});
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ export const namespace: Namespace = {
|
|||
|
||||
以[南信大信息公告栏](https://bulletin.nuist.edu.cn)为例,点开任意一个栏目
|
||||
|
||||
获得 URL 中的**分域名**和**栏目编号(可选)**:https\://\`bulletin\`.nuist.edu.cn/\`791\`/list.htm
|
||||
获得 URL 中的**分域名**和**栏目编号(可选)**:https://\`bulletin\`.nuist.edu.cn/\`791\`/list.htm
|
||||
|
||||
将其替换到 RSS 路由地址中即可:
|
||||
|
||||
|
|
|
|||
|
|
@ -22,10 +22,10 @@ export const route: Route = {
|
|||
handler,
|
||||
description: `| Software | Id |
|
||||
| --------------- | ----------- |
|
||||
| O\&O ShutUp10++ | shutup10 |
|
||||
| O\&O AppBuster | ooappbuster |
|
||||
| O\&O Lanytix | oolanytix |
|
||||
| O\&O DeskInfo | oodeskinfo |`,
|
||||
| O&O ShutUp10++ | shutup10 |
|
||||
| O&O AppBuster | ooappbuster |
|
||||
| O&O Lanytix | oolanytix |
|
||||
| O&O DeskInfo | oodeskinfo |`,
|
||||
};
|
||||
|
||||
async function handler(ctx) {
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ export const route: Route = {
|
|||
name: "Thailand Parliament Draft of Law's public hearing system",
|
||||
maintainers: ['itpcc'],
|
||||
handler,
|
||||
description: `| Presented by MP \* | Presented by People \* | Hearing Ongoing | Hearing ended | Hearing result reported | Waiting for PM approval | Assigned into the session | Processed | PM Rejected |
|
||||
description: `| Presented by MP * | Presented by People * | Hearing Ongoing | Hearing ended | Hearing result reported | Waiting for PM approval | Assigned into the session | Processed | PM Rejected |
|
||||
| ------------------------ | ---------------------- | ------------------- | --------------- | ------------------------ | ----------------------- | ------------------------- | ---------- | ------------- |
|
||||
| presentbymp | presentbyperson | openwsu | closewsu | reportwsu | substatus1 | substatus2 | substatus3 | closewsubypm |
|
||||
| เสนอโดยสมาชิกสภาผู้แทนราษฏร | เสนอโดยประชาชน | กำลังเปิดรับฟังความคิดเห็น | ปิดรับฟังความคิดเห็น | รายงานผลการรับฟังความคิดเห็น | รอคำรับรองจากนายกรัฐมนตรี | บรรจุเข้าระเบียบวาระ | พิจารณาแล้ว | นายกฯ ไม่รับรอง |
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
import * as url from 'node:url';
|
||||
|
||||
import { load } from 'cheerio';
|
||||
|
||||
import type { Route } from '@/types';
|
||||
|
|
@ -68,7 +66,7 @@ async function handler(ctx) {
|
|||
const out = await Promise.all(
|
||||
list.map(async (info) => {
|
||||
const title = info.title;
|
||||
const itemUrl = url.resolve(host, info.link);
|
||||
const itemUrl = new URL(info.link, host).href;
|
||||
|
||||
const cacheIn = await cache.get(itemUrl);
|
||||
if (cacheIn) {
|
||||
|
|
|
|||
|
|
@ -80,6 +80,8 @@ async function handler(ctx) {
|
|||
case 'state':
|
||||
item = utils.statusListParser($);
|
||||
break;
|
||||
default:
|
||||
throw new Error(`Unknown type: ${type}`);
|
||||
}
|
||||
|
||||
const typeToLabel = {
|
||||
|
|
|
|||
|
|
@ -71,9 +71,11 @@ async function handler(ctx) {
|
|||
|
||||
const items = data.hits.map((item) => {
|
||||
const { pageURL, tags, user } = item;
|
||||
const lastSlashIndex = pageURL.lastIndexOf('/');
|
||||
const secondLastSlashIndex = pageURL.lastIndexOf('/', lastSlashIndex - 1);
|
||||
return {
|
||||
title: pageURL
|
||||
.substring(pageURL.lastIndexOf('/', pageURL.lastIndexOf('/') - 1) + 1, pageURL.lastIndexOf('/'))
|
||||
.slice(secondLastSlashIndex + 1, lastSlashIndex)
|
||||
.replace(/(-\d+)$/, '')
|
||||
.replaceAll('-', ' '),
|
||||
description: renderToString(<PixabayImage item={item} />),
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ export const route: Route = {
|
|||
handler,
|
||||
description: `| 热门话题 | 科技动态 | 医疗产业 | 财经快讯 |
|
||||
| -------- | -------- | -------- | ------------------ |
|
||||
| | news | medical | financial\_express |`,
|
||||
| | news | medical | financial_express |`,
|
||||
};
|
||||
|
||||
async function handler(ctx) {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
import querystring from 'node:querystring';
|
||||
import * as url from 'node:url';
|
||||
|
||||
import type { Route } from '@/types';
|
||||
import cache from '@/utils/cache';
|
||||
|
|
@ -34,7 +33,7 @@ const generateArticlePubDate = (createDateStr) => {
|
|||
|
||||
const isRedirectPage = (data) => !!data.link;
|
||||
|
||||
const resolveRelativeUrl = (html) => html.replaceAll('src="/', `src="${url.resolve(baseUrl, '.')}`).replaceAll('href="/', `href="${url.resolve(baseUrl, '.')}`);
|
||||
const resolveRelativeUrl = (html) => html.replaceAll('src="/', `src="${new URL('.', baseUrl).href}`).replaceAll('href="/', `href="${new URL('.', baseUrl).href}`);
|
||||
|
||||
const apiSuccessAssert = (data) => {
|
||||
if (!data.success) {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
import querystring from 'node:querystring';
|
||||
import * as url from 'node:url';
|
||||
|
||||
import type { Route } from '@/types';
|
||||
import cache from '@/utils/cache';
|
||||
|
|
@ -44,7 +43,7 @@ const generateArticlePubDate = (createDateStr) => {
|
|||
|
||||
const isRedirectPage = (data) => !!data.link;
|
||||
|
||||
const resolveRelativeUrl = (html) => html.replaceAll('src="/', `src="${url.resolve(baseUrl, '.')}`).replaceAll('href="/', `href="${url.resolve(baseUrl, '.')}`);
|
||||
const resolveRelativeUrl = (html) => html.replaceAll('src="/', `src="${new URL('.', baseUrl).href}`).replaceAll('href="/', `href="${new URL('.', baseUrl).href}`);
|
||||
|
||||
const apiSuccessAssert = (data) => {
|
||||
if (!data.success) {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
import querystring from 'node:querystring';
|
||||
import * as url from 'node:url';
|
||||
|
||||
import type { Route } from '@/types';
|
||||
import cache from '@/utils/cache';
|
||||
|
|
@ -41,7 +40,7 @@ const generateArticlePubDate = (createDateStr) => {
|
|||
|
||||
const isRedirectPage = (data) => !!data.link;
|
||||
|
||||
const resolveRelativeUrl = (html) => html.replaceAll('src="/', `src="${url.resolve(baseUrl, '.')}`).replaceAll('href="/', `href="${url.resolve(baseUrl, '.')}`);
|
||||
const resolveRelativeUrl = (html) => html.replaceAll('src="/', `src="${new URL('.', baseUrl).href}`).replaceAll('href="/', `href="${new URL('.', baseUrl).href}`);
|
||||
|
||||
const apiSuccessAssert = (data) => {
|
||||
if (!data.success) {
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ export const route: Route = {
|
|||
description: `::: tip
|
||||
若订阅 [信息与政策](https://www.sdzk.cn/NewsList.aspx?BCID=1),网址为 \`https://www.sdzk.cn/NewsList.aspx?BCID=1\`。截取 \`BCID=1\` 作为参数,此时路由为 [\`/sdzk/1\`](https://rsshub.app/sdzk/1)。
|
||||
|
||||
若订阅 [通知公告](https://www.sdzk.cn/NewsList.aspx?BCID=1\&CID=16),网址为 \`https://www.sdzk.cn/NewsList.aspx?BCID=1&CID=16\`。截取 \`BCID=1\` 与 \`CID=16\` 作为参数,此时路由为 [\`/sdzk/1/16\`](https://rsshub.app/sdzk/1/16)。
|
||||
若订阅 [通知公告](https://www.sdzk.cn/NewsList.aspx?BCID=1&CID=16),网址为 \`https://www.sdzk.cn/NewsList.aspx?BCID=1&CID=16\`。截取 \`BCID=1\` 与 \`CID=16\` 作为参数,此时路由为 [\`/sdzk/1/16\`](https://rsshub.app/sdzk/1/16)。
|
||||
:::`,
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ export const route: Route = {
|
|||
name: 'Software',
|
||||
maintainers: ['JimenezLi'],
|
||||
handler,
|
||||
description: `For some URL like [https://sourceforge.net/directory/artificial-intelligence/windows/](https://sourceforge.net/directory/artificial-intelligence/windows/), it is equal to [https://sourceforge.net/directory/?topic=artificial-intelligence\&os=windows"](https://sourceforge.net/directory/?topic=artificial-intelligence\&os=windows), thus subscribing to \`/sourceforge/topic=artificial-intelligence&os=windows\`.
|
||||
description: `For some URL like [https://sourceforge.net/directory/artificial-intelligence/windows/](https://sourceforge.net/directory/artificial-intelligence/windows/), it is equal to [https://sourceforge.net/directory/?topic=artificial-intelligence&os=windows"](https://sourceforge.net/directory/?topic=artificial-intelligence&os=windows), thus subscribing to \`/sourceforge/topic=artificial-intelligence&os=windows\`.
|
||||
|
||||
URL params can duplicate, such as \`/sourceforge/topic=artificial-intelligence&os=windows&os=linux\`.`,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@ export const route: Route = {
|
|||
|
||||
| 新闻 | 中国 | 俄罗斯 | 国际 | 俄中关系 | 评论 |
|
||||
| ---- | ----- | ------ | --------------- | ------------------------ | ------- |
|
||||
| news | china | russia | category\_guoji | russia\_china\_relations | opinion |
|
||||
| news | china | russia | category_guoji | russia_china_relations | opinion |
|
||||
|
||||
Language
|
||||
|
||||
|
|
|
|||
|
|
@ -95,6 +95,8 @@ async function handler(ctx) {
|
|||
item_desc = content_data.comment;
|
||||
item_url = content_data.comment;
|
||||
break;
|
||||
default:
|
||||
throw new Error(`Unknown action key: ${item.key}`);
|
||||
}
|
||||
|
||||
return {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
import * as url from 'node:url';
|
||||
|
||||
import { load } from 'cheerio';
|
||||
|
||||
import type { Route } from '@/types';
|
||||
|
|
@ -72,7 +70,7 @@ async function handler() {
|
|||
list.map(async (info) => {
|
||||
const title = info.title;
|
||||
const date = info.date;
|
||||
const itemUrl = url.resolve(host, info.link);
|
||||
const itemUrl = new URL(info.link, host).href;
|
||||
const cacheIn = await cache.get(itemUrl);
|
||||
if (cacheIn) {
|
||||
return JSON.parse(cacheIn);
|
||||
|
|
|
|||
|
|
@ -1,12 +1,10 @@
|
|||
import URL from 'node:url';
|
||||
|
||||
import { TwitterApi } from 'twitter-api-v2';
|
||||
|
||||
import { config } from '@/config';
|
||||
import { parseDate } from '@/utils/parse-date';
|
||||
import { fallback, queryToBoolean, queryToInteger } from '@/utils/readable-social';
|
||||
|
||||
const getQueryParams = (url) => URL.parse(url, true).query;
|
||||
const getQueryParams = (url) => Object.fromEntries(new URL(url).searchParams.entries());
|
||||
const getOriginalImg = (url) => {
|
||||
// https://greasyfork.org/zh-CN/scripts/2312-resize-image-on-open-image-in-new-tab/code#n150
|
||||
let m = null;
|
||||
|
|
@ -519,4 +517,10 @@ export const keepOnlyMedia = function (tweets) {
|
|||
return excluded;
|
||||
};
|
||||
|
||||
export default { ProcessFeed, getAppClient, parseRouteParams, excludeRetweet, keepOnlyMedia };
|
||||
export default {
|
||||
ProcessFeed,
|
||||
getAppClient,
|
||||
parseRouteParams,
|
||||
excludeRetweet,
|
||||
keepOnlyMedia,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ export const route: Route = {
|
|||
handler,
|
||||
description: `| 个股研报 | 行业研报 | 策略研报 | 宏观研报 | 新股研报 | 券商晨报(今日晨报) |
|
||||
| :-------------: | :----------------: | :----------------: | :-------------: | :-----------: | :------------------: |
|
||||
| stock\_research | industry\_research | strategy\_research | macro\_research | ipo\_research | brokerage\_news |`,
|
||||
| stock_research | industry_research | strategy_research | macro_research | ipo_research | brokerage_news |`,
|
||||
};
|
||||
|
||||
async function handler(ctx) {
|
||||
|
|
|
|||
|
|
@ -56,6 +56,8 @@ async function handler(ctx) {
|
|||
return 'get';
|
||||
case 'Doublechoice':
|
||||
return 'post';
|
||||
default:
|
||||
throw new Error(`Unknown category: ${category}`);
|
||||
}
|
||||
})(),
|
||||
|
||||
|
|
@ -69,6 +71,8 @@ async function handler(ctx) {
|
|||
return `${apiRootUrl}/API/Web/index10358.ashx?rd=${rand}&pagesize=20&pageindex=1&action=bookinglist2&kind=2`;
|
||||
case 'joblist2':
|
||||
return `${apiRootUrl}/API/Web/index10358.ashx?action=joblist2&pagesize=50&pageindex=1&rand=${rand}&keyword=`;
|
||||
default:
|
||||
throw new Error(`Unknown category: ${category}`);
|
||||
}
|
||||
})(),
|
||||
|
||||
|
|
@ -85,6 +89,8 @@ async function handler(ctx) {
|
|||
action: 'recruitlist',
|
||||
rand,
|
||||
};
|
||||
default:
|
||||
throw new Error(`Unknown category: ${category}`);
|
||||
}
|
||||
})(),
|
||||
|
||||
|
|
@ -135,6 +141,8 @@ async function handler(ctx) {
|
|||
return 'get';
|
||||
case 'Doublechoice':
|
||||
return 'post';
|
||||
default:
|
||||
throw new Error(`Unknown category: ${category}`);
|
||||
}
|
||||
})(),
|
||||
|
||||
|
|
@ -148,6 +156,8 @@ async function handler(ctx) {
|
|||
return `${apiRootUrl}/API/Web/index10358.ashx?rd=${rand}&action=binfo&rid=${item.title}&rand=${rand}`;
|
||||
case 'joblist2':
|
||||
return `${apiRootUrl}/API/Web/index10358.ashx?rd=${rand}&action=jobinfo2&jid=${item.title}&rand=${rand}`;
|
||||
default:
|
||||
throw new Error(`Unknown category: ${category}`);
|
||||
}
|
||||
})(),
|
||||
|
||||
|
|
@ -165,6 +175,8 @@ async function handler(ctx) {
|
|||
rid: item.ID,
|
||||
rand,
|
||||
};
|
||||
default:
|
||||
throw new Error(`Unknown category: ${category}`);
|
||||
}
|
||||
})(),
|
||||
|
||||
|
|
@ -180,6 +192,8 @@ async function handler(ctx) {
|
|||
return item.title;
|
||||
case 'joblist2':
|
||||
return detailResponse.data.JobName;
|
||||
default:
|
||||
throw new Error(`Unknown category: ${category}`);
|
||||
}
|
||||
})();
|
||||
|
||||
|
|
@ -207,6 +221,8 @@ async function handler(ctx) {
|
|||
|
||||
case 'joblist2':
|
||||
return detailResponse.data.PostionDesc;
|
||||
default:
|
||||
throw new Error(`Unknown category: ${category}`);
|
||||
}
|
||||
})();
|
||||
|
||||
|
|
|
|||
|
|
@ -50,6 +50,8 @@ async function handler(ctx) {
|
|||
feedTitle += 'In The News';
|
||||
listSelector += 'div.news-wrapper > section.news-list > article';
|
||||
break;
|
||||
default:
|
||||
throw new Error(`Unknown category: ${category}`);
|
||||
}
|
||||
|
||||
const response = await got(newsURL);
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ export const route: Route = {
|
|||
description: `::: tip
|
||||
Subscribe pages starting with \`https://wallhaven.cc/search\`, fill the text after \`?\` as \`filter\` in the route. The following is an example:
|
||||
|
||||
The text after \`?\` is \`q=id%3A711&sorting=random&ref=fp&seed=8g0dgd\` for [Wallpaper Search: #landscape - wallhaven.cc](https://wallhaven.cc/search?q=id%3A711\&sorting=random\&ref=fp\&seed=8g0dgd), so the route is [/wallhaven/q=id%3A711\&sorting=random\&ref=fp\&seed=8g0dgd](https://rsshub.app/wallhaven/q=id%3A711\&sorting=random\&ref=fp\&seed=8g0dgd)
|
||||
The text after \`?\` is \`q=id%3A711&sorting=random&ref=fp&seed=8g0dgd\` for [Wallpaper Search: #landscape - wallhaven.cc](https://wallhaven.cc/search?q=id%3A711&sorting=random&ref=fp&seed=8g0dgd), so the route is [/wallhaven/q=id%3A711&sorting=random&ref=fp&seed=8g0dgd](https://rsshub.app/wallhaven/q=id%3A711&sorting=random&ref=fp&seed=8g0dgd)
|
||||
:::`,
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ export const route: Route = {
|
|||
handler,
|
||||
description: `只适用拥有首页模板 (分享链接带有 homepage) 的公众号。例如从公众号分享出来的链接为 \`https://mp.weixin.qq.com/mp/homepage?__biz=MzA3MDM3NjE5NQ==&hid=4\`,\`biz\` 为 \`MzA3MDM3NjE5NQ==\`,\`hid\` 为 \`4\`。
|
||||
|
||||
有些页面里会有分栏, \`cid\` 可以通过元素选择器选中栏目查看\`data-index\`。如[链接](https://mp.weixin.qq.com/mp/homepage?__biz=MzA3MDM3NjE5NQ==\&hid=4)里的 \`京都职人\` 栏目的 \`cid\` 为 \`0\`,\`文艺时光\` 栏目的 \`cid\` 为 \`2\`。如果不清楚的话最左边的栏目为\`0\`,其右方栏目依次递增 \`1\`。`,
|
||||
有些页面里会有分栏, \`cid\` 可以通过元素选择器选中栏目查看\`data-index\`。如[链接](https://mp.weixin.qq.com/mp/homepage?__biz=MzA3MDM3NjE5NQ==&hid=4)里的 \`京都职人\` 栏目的 \`cid\` 为 \`0\`,\`文艺时光\` 栏目的 \`cid\` 为 \`2\`。如果不清楚的话最左边的栏目为\`0\`,其右方栏目依次递增 \`1\`。`,
|
||||
};
|
||||
|
||||
async function handler(ctx) {
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ export const namespace: Namespace = {
|
|||
|
||||
指定更多与默认值不同的参数选项可以改善 RSS 的可读性,如
|
||||
|
||||
[https://rsshub.app/weibo/user/1642909335/readable=1\&authorNameBold=1\&showAuthorInTitle=1\&showAuthorInDesc=1\&showAuthorAvatarInDesc=1\&showEmojiForRetweet=1\&showRetweetTextInTitle=0\&addLinkForPics=1\&showTimestampInDescription=1\&showTimestampInDescription=1\&heightOfPics=150](https://rsshub.app/weibo/user/1642909335/readable=1\&authorNameBold=1\&showAuthorInTitle=1\&showAuthorInDesc=1\&showAuthorAvatarInDesc=1\&showEmojiForRetweet=1\&showRetweetTextInTitle=0\&addLinkForPics=1\&showTimestampInDescription=1\&showTimestampInDescription=1\&heightOfPics=150)
|
||||
[https://rsshub.app/weibo/user/1642909335/readable=1&authorNameBold=1&showAuthorInTitle=1&showAuthorInDesc=1&showAuthorAvatarInDesc=1&showEmojiForRetweet=1&showRetweetTextInTitle=0&addLinkForPics=1&showTimestampInDescription=1&showTimestampInDescription=1&heightOfPics=150](https://rsshub.app/weibo/user/1642909335/readable=1&authorNameBold=1&showAuthorInTitle=1&showAuthorInDesc=1&showAuthorAvatarInDesc=1&showEmojiForRetweet=1&showRetweetTextInTitle=0&addLinkForPics=1&showTimestampInDescription=1&showTimestampInDescription=1&heightOfPics=150)
|
||||
|
||||
的效果为
|
||||
|
||||
|
|
|
|||
|
|
@ -40,8 +40,8 @@ export const route: Route = {
|
|||
| soul | 精华 |
|
||||
| video | 视频(暂不支持) |
|
||||
| album | 相册(暂不支持) |
|
||||
| hot\_sort | 热门 |
|
||||
| sort\_time | 最新帖子 |
|
||||
| hot_sort | 热门 |
|
||||
| sort_time | 最新帖子 |
|
||||
| feed | 最新评论 |`,
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ export const route: Route = {
|
|||
name: 'News',
|
||||
maintainers: ['oppilate'],
|
||||
handler,
|
||||
description: `en\_us
|
||||
description: `en_us
|
||||
|
||||
| World | U.S. | Politics | Economy | Business | Tech | Markets | Opinion | Books & Arts | Real Estate | Life & Work | Sytle | Sports |
|
||||
| ----- | ---- | -------- | ------- | -------- | ---------- | ------- | ------- | ------------ | ----------- | ----------- | ------------------- | ------ |
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
import * as url from 'node:url';
|
||||
|
||||
import { load } from 'cheerio';
|
||||
|
||||
import type { Route } from '@/types';
|
||||
|
|
@ -73,7 +71,7 @@ async function handler(ctx) {
|
|||
|
||||
const out = await Promise.all(
|
||||
urlList.map(async (itemUrl, index) => {
|
||||
itemUrl = url.resolve(baseUrl, itemUrl);
|
||||
itemUrl = new URL(itemUrl, baseUrl).href;
|
||||
if (itemUrl.includes('.htm')) {
|
||||
const cacheIn = await cache.get(itemUrl);
|
||||
if (cacheIn) {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
import { URL } from 'node:url';
|
||||
|
||||
import { load } from 'cheerio';
|
||||
|
||||
import type { Route } from '@/types';
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ export const route: Route = {
|
|||
| books | 阅读周刊 |
|
||||
| loushi | 地产 |
|
||||
| automobile | 汽车 |
|
||||
| china\_financial\_herald | 对话陆家嘴 |
|
||||
| china_financial_herald | 对话陆家嘴 |
|
||||
| fashion | 时尚 |
|
||||
| ad | 商业资讯 |
|
||||
| info | 资讯 |
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ function parseJSONP(jsonpData) {
|
|||
try {
|
||||
const startPos = jsonpData.indexOf('({');
|
||||
const endPos = jsonpData.lastIndexOf('})');
|
||||
let jsonString = jsonpData.substring(startPos + 1, endPos + 1);
|
||||
let jsonString = jsonpData.slice(startPos + 1, endPos + 1);
|
||||
|
||||
// remove escaped single quotes since they are not valid json
|
||||
jsonString = jsonString.replaceAll(String.raw`\'`, "'");
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ export const route: Route = {
|
|||
:::
|
||||
|
||||
::: tip
|
||||
YouTube provides official RSS feeds for channels, for instance [https://www.youtube.com/feeds/videos.xml?channel\_id=UCDwDMPOZfxVV0x\_dz0eQ8KQ](https://www.youtube.com/feeds/videos.xml?channel_id=UCDwDMPOZfxVV0x_dz0eQ8KQ).
|
||||
YouTube provides official RSS feeds for channels, for instance [https://www.youtube.com/feeds/videos.xml?channel_id=UCDwDMPOZfxVV0x_dz0eQ8KQ](https://www.youtube.com/feeds/videos.xml?channel_id=UCDwDMPOZfxVV0x_dz0eQ8KQ).
|
||||
:::`,
|
||||
features: {
|
||||
requireConfig: [
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ export const route: Route = {
|
|||
url: 'yxdzqb.com/',
|
||||
description: `| Steam 最新折扣 | Steam 热门游戏折扣 | Steam 热门中文游戏折扣 | Steam 历史低价 | Steam 中文游戏历史低价 |
|
||||
| -------------- | ------------------ | ---------------------- | -------------- | ---------------------- |
|
||||
| discount | popular | popular\_cn | low | low\_cn |`,
|
||||
| discount | popular | popular_cn | low | low_cn |`,
|
||||
};
|
||||
|
||||
async function handler(ctx) {
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ export const route: Route = {
|
|||
handler,
|
||||
description: `| 全部 | 影视资讯 | 收视快报 | 人人影评 | 人人剧评 | 新剧评测 | 片单推荐 |
|
||||
| ---- | -------- | -------- | --------- | --------- | ----------- | -------- |
|
||||
| | news | report | m\_review | t\_review | new\_review | recom |`,
|
||||
| | news | report | m_review | t_review | new_review | recom |`,
|
||||
};
|
||||
|
||||
async function handler(ctx) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue