Merge branch 'master' of https://github.com/DIYgod/RSSHub into DIYgod
This commit is contained in:
commit
79143113cd
|
|
@ -532,7 +532,8 @@ See docs of the specified route and `lib/config.js` for detailed information.
|
|||
- `EH_IPB_MEMBER_ID`: The value of `ipb_member_id` in the cookie header after logging in E-Hentai
|
||||
- `EH_IPB_PASS_HASH`: The value of `ipb_pass_hash` in the cookie header after logging in E-Hentai
|
||||
- `EH_SK`: The value of `sk` in the cookie header after logging in E-Hentai
|
||||
- `EH_IGNEOUS`: The value of `igneous` in the cookie header after logging in ExHentai. If this value is set, RSS will be generated from ExHentai, `EH_SK` will be ignored.
|
||||
- `EH_IGNEOUS`: The value of `igneous` in the cookie header after logging in ExHentai. If this value is set, RSS will be generated from ExHentai
|
||||
- `EH_IMG_PROXY`: Cover proxy address. If this is set, the link to the cover image will be replaced with this value at the beginning. When using ExHentai, the cover image requires cookies to access it, so you can use this with a cookie-added proxy server to access the cover image without cookies in some readers.
|
||||
|
||||
- GitHub: [Access Token application](https://github.com/settings/tokens)
|
||||
|
||||
|
|
|
|||
|
|
@ -116,6 +116,27 @@ pageClass: routes
|
|||
|
||||
<RouteEn name="Daily Strip" author="Maecenas" example="/dilbert/strip" path="/dilbert/strip"/>
|
||||
|
||||
## E-Hentai
|
||||
|
||||
For RSS content, specify options in the `routeParams` parameter in query string format to control additional functionality
|
||||
|
||||
| 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 |
|
||||
|
||||
### Favorites
|
||||
|
||||
<RouteEn author="yindaheng98" example="/ehentai/favorites/0/posted/1" path="/ehentai/favorites/:favcat?/:order?/:page?/:routeParams?" :paramsDesc="['Favorites folder number','`posted`(Sort by gallery release time) , `favorited`(Sort by time added to favorites)', 'Page number', 'Additional parameters, see the table above']" anticrawler="1" supportBT="1" />
|
||||
|
||||
### Tag
|
||||
|
||||
<RouteEn author="yindaheng98" example="/ehentai/tag/language:chinese/1" path="/ehentai/tag/:tag/:page?/:routeParams?" :paramsDesc="['Tag', 'Page number', 'Additional parameters, see the table above']" anticrawler="1" supportBT="1" />
|
||||
|
||||
### Search
|
||||
|
||||
<RouteEn author="yindaheng98" example="/ehentai/search/f_search=artist%3Amana%24/1" path="/ehentai/search/:params?/:page?/:routeParams?" :paramsDesc="['Search parameters. You can copy the content after `https://e-hentai.org/?`', 'Page number', 'Additional parameters, see the table above']" anticrawler="1" supportBT="1" />
|
||||
|
||||
## Elite Babes
|
||||
|
||||
### Home
|
||||
|
|
|
|||
|
|
@ -563,7 +563,8 @@ RSSHub 支持使用访问密钥 / 码,白名单和黑名单三种方式进行
|
|||
- `EH_IPB_MEMBER_ID`: E-Hentai 账户登录后 cookie 的 `ipb_member_id` 值
|
||||
- `EH_IPB_PASS_HASH`: E-Hentai 账户登录后 cookie 的 `ipb_pass_hash` 值
|
||||
- `EH_SK`: E-Hentai 账户登录后 cookie 中的`sk`值
|
||||
- `EH_IGNEOUS`: ExHentai 账户登录后 cookie 中的`igneous`值。若设置此值,RSS 数据将全部从里站获取,`EH_SK`将被忽略
|
||||
- `EH_IGNEOUS`: ExHentai 账户登录后 cookie 中的`igneous`值。若设置此值,RSS 数据将全部从里站获取
|
||||
- `EH_IMG_PROXY`: 封面代理访问地址。若设置此值,封面图链接将被替换为以此值开头。使用 ExHentai 时,封面图需要有 Cookie 才能访问,在一些阅读软件上没法显示封面,可以使用此值搭配一个加 Cookie 的代理服务器实现阅读软件无 Cookie 获取封面图。
|
||||
|
||||
- GitHub 全部路由:[申请地址](https://github.com/settings/tokens)
|
||||
|
||||
|
|
|
|||
|
|
@ -1807,6 +1807,18 @@ area 分区选项
|
|||
|
||||
</Route>
|
||||
|
||||
## 封面新闻
|
||||
|
||||
### 频道
|
||||
|
||||
<Route author="yuxinliu-alex" example="/thecover/channel/3560" path="/thecover/channel/:id?" :paramsDesc="['对应id,可在频道链接中获取,默认为3892']">
|
||||
|
||||
| 天下 | 四川 | 辟谣 | 国际 | 云招考 | 30 秒 | 拍客 | 体育 | 国内 | 帮扶铁军 | 文娱 | 宽窄 | 商业 | 千面 | 封面号 |
|
||||
| ---- | ---- | ---- | ---- | --- | ---- | ---- | ---- | -- | ---- | -- | -- | -- | -- | --- |
|
||||
| 3892 | 3560 | 3909 | 3686 | 11 | 3902 | 3889 | 3689 | 1 | 4002 | 12 | 46 | 4 | 21 | 17 |
|
||||
|
||||
</Route>
|
||||
|
||||
## 風傳媒
|
||||
|
||||
### 分类
|
||||
|
|
@ -3435,14 +3447,6 @@ wechat-feeds 来源[已停止更新](https://github.com/hellodword/wechat-feeds/
|
|||
|
||||
</Route>
|
||||
|
||||
### 公众平台系统公告栏目
|
||||
|
||||
<Route author="xyqfer" example="/wechat/announce" path="/wechat/announce" />
|
||||
|
||||
### 小程序插件
|
||||
|
||||
<Route author="xyqfer" example="/wechat/miniprogram/plugins" path="/wechat/miniprogram/plugins" />
|
||||
|
||||
## 维基百科
|
||||
|
||||
### 中国大陆新闻动态
|
||||
|
|
@ -3817,6 +3821,12 @@ wechat-feeds 来源[已停止更新](https://github.com/hellodword/wechat-feeds/
|
|||
|
||||
</Route>
|
||||
|
||||
## 云奇网
|
||||
|
||||
### 微语简报
|
||||
|
||||
<Route author="x2009again" example="/yunspe/newsflash" path="/yunspe/newsflash" />
|
||||
|
||||
## 中国纺织经济信息网
|
||||
|
||||
### 资讯
|
||||
|
|
|
|||
|
|
@ -146,17 +146,24 @@ pageClass: routes
|
|||
|
||||
## E-Hentai
|
||||
|
||||
对于 RSS 内容,在 `routeParams` 参数中以 query string 格式指定选项,可以控制额外的功能
|
||||
|
||||
| 键 | 含义 | 接受的值 | 默认值 |
|
||||
| ----------- | -------------------------- | -------------- | ----- |
|
||||
| bittorrent | 是否包含最新种子的链接 | 0/1/true/false | false |
|
||||
| embed_thumb | 是否将封面图片嵌入 RSS 中而不是以链接的形式给出 | 0/1/true/false | false |
|
||||
|
||||
### 收藏
|
||||
|
||||
<Route author="Howard Yin" example="/ehentai/favorites/0/posted" path="/ehentai/favorites/:favcat?/:order?/:page?/:bittorrent?" :paramsDesc="['收藏夹编号,可选','顺序,可选:posted-按画廊发布时间排序,favorited-按添加收藏的时间排序', '爬获取第多少页的数据', '是否获取种子链接']" anticrawler="1" supportBT="1" />
|
||||
<Route author="yindaheng98" example="/ehentai/favorites/0/posted/1" path="/ehentai/favorites/:favcat?/:order?/:page?/:routeParams?" :paramsDesc="['收藏夹编号','顺序:posted-按画廊发布时间排序,favorited-按添加收藏的时间排序', '爬获取第多少页的数据', '额外参数;请参阅上面的说明和表格']" anticrawler="1" supportBT="1" />
|
||||
|
||||
### 标签
|
||||
|
||||
<Route author="Howard Yin" example="/ehentai/tag/language:chinese/1" path="/ehentai/tag/:tag/:page?/:bittorrent?" :paramsDesc="['标签', '爬获取第多少页的数据', '是否获取种子链接']" anticrawler="1" supportBT="1" />
|
||||
<Route author="yindaheng98" example="/ehentai/tag/language:chinese/1" path="/ehentai/tag/:tag/:page?/:routeParams?" :paramsDesc="['标签', '爬获取第多少页的数据', '额外参数;请参阅上面的说明和表格']" anticrawler="1" supportBT="1" />
|
||||
|
||||
### 搜索
|
||||
|
||||
<Route author="Howard Yin" example="/ehentai/search/:params?/:page?" path="/ehentai/search/:params?/:page?/:bittorrent?" :paramsDesc="['用于搜索的关键词。可在原网站搜索后复制 `https://e-hentai.org/?` 后面的内容', '爬获取第多少页的数据', '是否获取种子链接']" anticrawler="1" supportBT="1" />
|
||||
<Route author="yindaheng98" example="/ehentai/search/f_search=artist%3Amana%24/1" path="/ehentai/search/:params?/:page?/:routeParams?" :paramsDesc="['用于搜索的关键词。可在原网站搜索后复制 `https://e-hentai.org/?` 后面的内容', '爬获取第多少页的数据', '额外参数;请参阅上面的说明和表格']" anticrawler="1" supportBT="1" />
|
||||
|
||||
## Elite Babes
|
||||
|
||||
|
|
|
|||
|
|
@ -1036,6 +1036,10 @@ GitHub 官方也提供了一些 RSS:
|
|||
|
||||
## 微信小程序
|
||||
|
||||
### 公众平台系统公告栏目
|
||||
|
||||
<Route author="xyqfer" example="/wechat/announce" path="/wechat/announce" />
|
||||
|
||||
### 基础库更新日志
|
||||
|
||||
<Route author="magicLaLa nczitzk" example="/weixin/miniprogram/framework" path="/weixin/miniprogram/framework"/>
|
||||
|
|
@ -1044,6 +1048,10 @@ GitHub 官方也提供了一些 RSS:
|
|||
|
||||
<Route author="nczitzk" example="/weixin/miniprogram/devtools" path="/weixin/miniprogram/devtools"/>
|
||||
|
||||
### 小程序插件
|
||||
|
||||
<Route author="xyqfer" example="/wechat/miniprogram/plugins" path="/wechat/miniprogram/plugins" />
|
||||
|
||||
### 云开发更新日志
|
||||
|
||||
<Route author="nczitzk" example="/weixin/miniprogram/wxcloud/cloud-sdk" path="/weixin/miniprogram/wxcloud/:caty?" :paramsDesc="['日志分类']">
|
||||
|
|
|
|||
|
|
@ -1709,6 +1709,12 @@ category 对应的关键词有
|
|||
|
||||
</Route>
|
||||
|
||||
## 中国新闻网
|
||||
|
||||
### 最新
|
||||
|
||||
<Route author="yuxinliu-alex" example="/chinanews" path="/chinanews" radar="1" rssbud="1" />
|
||||
|
||||
## 中山网
|
||||
|
||||
### 中山网新闻
|
||||
|
|
|
|||
|
|
@ -128,6 +128,7 @@ const calculateValue = () => {
|
|||
ipb_pass_hash: envs.EH_IPB_PASS_HASH,
|
||||
sk: envs.EH_SK,
|
||||
igneous: envs.EH_IGNEOUS,
|
||||
img_proxy: envs.EH_IMG_PROXY,
|
||||
},
|
||||
email: {
|
||||
config: email_config,
|
||||
|
|
|
|||
|
|
@ -421,20 +421,18 @@ router.get('/tucaoqq/post/:project/:key', lazyloadRouteHandler('./routes/tencent
|
|||
// Bugly SDK
|
||||
router.get('/bugly/changelog/:platform', lazyloadRouteHandler('./routes/tencent/bugly/changelog'));
|
||||
|
||||
// wechat
|
||||
router.get('/wechat/wemp/:id', lazyloadRouteHandler('./routes/tencent/wechat/wemp'));
|
||||
router.get('/wechat/csm/:id', lazyloadRouteHandler('./routes/tencent/wechat/csm'));
|
||||
router.get('/wechat/ce/:id', lazyloadRouteHandler('./routes/tencent/wechat/ce'));
|
||||
router.get('/wechat/announce', lazyloadRouteHandler('./routes/tencent/wechat/announce'));
|
||||
// wechat migrated to v2
|
||||
// router.get('/wechat/wemp/:id', lazyloadRouteHandler('./routes/tencent/wechat/wemp'));
|
||||
// router.get('/wechat/ce/:id', lazyloadRouteHandler('./routes/tencent/wechat/ce'));
|
||||
// router.get('/wechat/announce', lazyloadRouteHandler('./routes/tencent/wechat/announce'));
|
||||
router.get('/wechat/miniprogram/plugins', lazyloadRouteHandler('./routes/tencent/wechat/miniprogram/plugins'));
|
||||
router.get('/wechat/tgchannel/:id/:mpName?/:searchQueryType?', lazyloadRouteHandler('./routes/tencent/wechat/tgchannel'));
|
||||
router.get('/wechat/uread/:userid', lazyloadRouteHandler('./routes/tencent/wechat/uread'));
|
||||
router.get('/wechat/ershicimi/:id', lazyloadRouteHandler('./routes/tencent/wechat/ershcimi'));
|
||||
router.get('/wechat/wjdn/:id', lazyloadRouteHandler('./routes/tencent/wechat/wjdn'));
|
||||
router.get('/wechat/wxnmh/:id', lazyloadRouteHandler('./routes/tencent/wechat/wxnmh'));
|
||||
router.get('/wechat/mp/homepage/:biz/:hid/:cid?', lazyloadRouteHandler('./routes/tencent/wechat/mp'));
|
||||
router.get('/wechat/mp/msgalbum/:biz/:aid', lazyloadRouteHandler('./routes/tencent/wechat/msgalbum'));
|
||||
router.get('/wechat/feeds/:id', lazyloadRouteHandler('./routes/tencent/wechat/feeds'));
|
||||
// router.get('/wechat/tgchannel/:id/:mpName?/:searchQueryType?', lazyloadRouteHandler('./routes/tencent/wechat/tgchannel'));
|
||||
// router.get('/wechat/uread/:userid', lazyloadRouteHandler('./routes/tencent/wechat/uread'));
|
||||
// router.get('/wechat/ershicimi/:id', lazyloadRouteHandler('./routes/tencent/wechat/ershcimi'));
|
||||
// router.get('/wechat/wxnmh/:id', lazyloadRouteHandler('./routes/tencent/wechat/wxnmh'));
|
||||
// router.get('/wechat/mp/homepage/:biz/:hid/:cid?', lazyloadRouteHandler('./routes/tencent/wechat/mp'));
|
||||
// router.get('/wechat/mp/msgalbum/:biz/:aid', lazyloadRouteHandler('./routes/tencent/wechat/msgalbum'));
|
||||
// router.get('/wechat/feeds/:id', lazyloadRouteHandler('./routes/tencent/wechat/feeds'));
|
||||
|
||||
// All the Flight Deals
|
||||
router.get('/atfd/:locations/:nearby?', lazyloadRouteHandler('./routes/atfd/index'));
|
||||
|
|
@ -3939,10 +3937,10 @@ router.get('/tongli/news/:type', lazyloadRouteHandler('./routes/tongli/news'));
|
|||
// OR
|
||||
router.get('/or/:id?', lazyloadRouteHandler('./routes/or'));
|
||||
|
||||
// e-hentai
|
||||
router.get('/ehentai/favorites/:favcat?/:order?/:page?/:bittorrent?', lazyloadRouteHandler('./routes/ehentai/favorites'));
|
||||
router.get('/ehentai/search/:params?/:page?/:bittorrent?', lazyloadRouteHandler('./routes/ehentai/search'));
|
||||
router.get('/ehentai/tag/:tag/:page?/:bittorrent?', lazyloadRouteHandler('./routes/ehentai/tag'));
|
||||
// e-hentai migrated to v2
|
||||
// router.get('/ehentai/favorites/:favcat?/:order?/:page?/:routeParams?', lazyloadRouteHandler('./routes/ehentai/favorites'));
|
||||
// router.get('/ehentai/search/:params?/:page?/:routeParams?', lazyloadRouteHandler('./routes/ehentai/search'));
|
||||
// router.get('/ehentai/tag/:tag/:page?/:routeParams?', lazyloadRouteHandler('./routes/ehentai/tag'));
|
||||
|
||||
// 字型故事
|
||||
router.get('/fontstory', lazyloadRouteHandler('./routes/fontstory/tw'));
|
||||
|
|
|
|||
|
|
@ -1 +0,0 @@
|
|||
Make sure you read lib/utils/wechat-mp.js before adding a new route.
|
||||
|
|
@ -1,5 +1,7 @@
|
|||
const got = require('@/utils/got');
|
||||
const cheerio = require('cheerio');
|
||||
const { parseDate } = require('@/utils/parse-date');
|
||||
const timezone = require('@/utils/timezone');
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const link = `https://developers.weixin.qq.com/miniprogram/dev/framework/release/`;
|
||||
|
|
@ -16,14 +18,14 @@ module.exports = async (ctx) => {
|
|||
ctx.state.data = {
|
||||
title: name,
|
||||
link,
|
||||
item: $('#docContent .content h3')
|
||||
item: $('#docContent .content h2')
|
||||
.map((_, item) => {
|
||||
item = $(item);
|
||||
const title = item.text().replace(/[\s|#]/g, '');
|
||||
return {
|
||||
title,
|
||||
description: item.next().html(),
|
||||
pubDate: new Date(new RegExp(/\d{4}-\d{2}-\d{2}/).exec(title) + ' GMT+8').toUTCString(),
|
||||
pubDate: timezone(parseDate(new RegExp(/\d{4}-\d{2}-\d{2}/).exec(title)), +8),
|
||||
link: link + item.find('a.header-anchor').attr('href'),
|
||||
};
|
||||
})
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ if (config.proxyUri && typeof config.proxyUri === 'string') {
|
|||
HttpsProxyAgent = HttpsProxyAgent || require('https-proxy-agent');
|
||||
proxy = new HttpsProxyAgent(config.proxyUri);
|
||||
} else if (config.proxyUri.startsWith('socks')) {
|
||||
SocksProxyAgent = SocksProxyAgent || require('socks-proxy-agent');
|
||||
SocksProxyAgent = SocksProxyAgent || require('socks-proxy-agent').SocksProxyAgent;
|
||||
proxy = new SocksProxyAgent(config.proxyUri);
|
||||
} else {
|
||||
throw 'Unknown proxy-uri format';
|
||||
|
|
@ -30,7 +30,7 @@ if (config.proxyUri && typeof config.proxyUri === 'string') {
|
|||
|
||||
switch (config.proxy.protocol) {
|
||||
case 'socks':
|
||||
SocksProxyAgent = SocksProxyAgent || require('socks-proxy-agent');
|
||||
SocksProxyAgent = SocksProxyAgent || require('socks-proxy-agent').SocksProxyAgent;
|
||||
agent.http = new SocksProxyAgent(proxyUrl);
|
||||
agent.https = new SocksProxyAgent(proxyUrl);
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@
|
|||
* Author: @Rongronggg9
|
||||
*
|
||||
* There are at least three folders which are relevant with WeChat MP (Official Account Platform / Media Platform):
|
||||
* lib/route/tencent/wechat
|
||||
* lib/v2/wechat
|
||||
* lib/v2/gzh360
|
||||
* lib/v2/sdu/cs
|
||||
|
|
@ -181,7 +180,7 @@ const fetchArticle = async (ctx, url, bypassHostCheck = false) => {
|
|||
const response = await got(url);
|
||||
const $ = cheerio.load(response.data);
|
||||
|
||||
const title = $('meta[property="og:title"]').attr('content').replace(/\\r/g, '').replace(/\\n/g, ' ');
|
||||
const title = ($('meta[property="og:title"]').attr('content') || '').replace(/\\r/g, '').replace(/\\n/g, ' ');
|
||||
const author = $('meta[name=author]').attr('content');
|
||||
let summary = $('meta[name=description]').attr('content');
|
||||
summary = summary !== title ? summary : '';
|
||||
|
|
|
|||
|
|
@ -0,0 +1,65 @@
|
|||
const got = require('@/utils/got');
|
||||
const timezone = require('@/utils/timezone');
|
||||
const { parseDate } = require('@/utils/parse-date');
|
||||
const cheerio = require('cheerio');
|
||||
|
||||
const rootUrl = 'https://www.chinanews.com.cn';
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const currentUrl = `${rootUrl}/scroll-news/news1.html`;
|
||||
const response = await got({
|
||||
method: 'get',
|
||||
url: currentUrl,
|
||||
});
|
||||
const $ = cheerio.load(response.data);
|
||||
const list = $('a', '.dd_bt')
|
||||
.map((_, item) => ({
|
||||
link: rootUrl + $(item).attr('href'),
|
||||
title: $(item).text(),
|
||||
}))
|
||||
.get()
|
||||
.slice(0, ctx.query.limit ? (parseInt(ctx.query.limit) > 125 ? 125 : parseInt(ctx.query.limit)) : 50);
|
||||
|
||||
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);
|
||||
if (content('div.content_desc').length > 0) {
|
||||
item.description = content('div.content_desc').text();
|
||||
item.author = content('a.source').text();
|
||||
const info = content('p', '.left').text().trim().slice(5).split(' ');
|
||||
item.author = info[2].trim();
|
||||
item.pubDate = timezone(parseDate(info[0] + info[1], 'YYYY年MM月DD日HH:mm'), +8);
|
||||
} else if (content('div.t3').length > 0) {
|
||||
item.description = content('div.t3').text();
|
||||
const info = content('div[style="text-align:right;font-size:12px;"]').text().slice(5).split(' ');
|
||||
item.author = info[2];
|
||||
item.pubDate = timezone(parseDate(info[0] + info[1], 'YYYY-MM-DDHH:mm'), +8);
|
||||
} else {
|
||||
item.description = content('div.left_zw').text();
|
||||
const info = content('div.left-t')
|
||||
.contents()
|
||||
.filter(function () {
|
||||
return this.type === 'text';
|
||||
})
|
||||
.text()
|
||||
.split(' ');
|
||||
item.pubDate = timezone(parseDate(info[0], 'YYYY年MM月DD日 HH:mm'), +8);
|
||||
item.author = info[1] + content('a.source').text();
|
||||
}
|
||||
return item;
|
||||
})
|
||||
)
|
||||
);
|
||||
ctx.state.data = {
|
||||
title: '中国新闻网',
|
||||
link: currentUrl,
|
||||
description: '中国新闻网(简称“中新网”),由中国新闻社主办,为中央重点新闻网站。',
|
||||
language: 'zh-cn',
|
||||
item: items,
|
||||
};
|
||||
};
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
module.exports = {
|
||||
'/': ['yuxinliu-alex'],
|
||||
};
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
module.exports = {
|
||||
'chinanews.com.cn': {
|
||||
_name: '中国新闻网',
|
||||
'.': [
|
||||
{
|
||||
title: '最新',
|
||||
docs: 'https://docs.rsshub.app/traditional-media.html#zhong-xin-wang',
|
||||
source: ['/'],
|
||||
target: '/chinanews',
|
||||
},
|
||||
],
|
||||
},
|
||||
};
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
module.exports = function (router) {
|
||||
router.get('/', require('./index'));
|
||||
};
|
||||
|
|
@ -6,19 +6,37 @@ module.exports = {
|
|||
title: '分类',
|
||||
docs: 'https://docs.rsshub.app/multimedia.html#e-hentai-fen-lei',
|
||||
source: ['/:category', '/'],
|
||||
target: '/e-hentai/category/:category?',
|
||||
target: '/e-hentai/category/:category',
|
||||
},
|
||||
{
|
||||
title: '收藏',
|
||||
docs: 'https://docs.rsshub.app/picture.html#e-hentai',
|
||||
source: ['/favorites.php', '/'],
|
||||
target: (_params, url) => `/ehentai/favorites/${new URL(url).searchParams.get('favcat')}`,
|
||||
},
|
||||
{
|
||||
title: '标签',
|
||||
docs: 'https://docs.rsshub.app/multimedia.html#e-hentai-biao-qian',
|
||||
source: ['/tag/:tag', '/'],
|
||||
target: '/e-hentai/tag/:tag?',
|
||||
target: '/e-hentai/tag/:tag',
|
||||
},
|
||||
{
|
||||
title: '标签',
|
||||
docs: 'https://docs.rsshub.app/picture.html#e-hentai',
|
||||
source: ['/tag/:tag', '/'],
|
||||
target: '/ehentai/tag/:tag',
|
||||
},
|
||||
{
|
||||
title: '搜索',
|
||||
docs: 'https://docs.rsshub.app/multimedia.html#e-hentai-sou-suo',
|
||||
source: ['/:keyword', '/'],
|
||||
target: '/e-hentai/search/:keyword?',
|
||||
target: '/e-hentai/search/:keyword',
|
||||
},
|
||||
{
|
||||
title: '搜索',
|
||||
docs: 'https://docs.rsshub.app/picture.html#e-hentai',
|
||||
source: ['/'],
|
||||
target: (_params, url) => `/ehentai/search/${new URL(url).searchParams.get('f_search')}`,
|
||||
},
|
||||
],
|
||||
},
|
||||
|
|
|
|||
|
|
@ -1,14 +1,16 @@
|
|||
const got = require('@/utils/got');
|
||||
const logger = require('@/utils/logger');
|
||||
const cheerio = require('cheerio');
|
||||
const path = require('path');
|
||||
const config = require('@/config').value.ehentai;
|
||||
|
||||
const headers = {};
|
||||
const has_cookie = config.ipb_member_id && config.ipb_pass_hash && (config.sk || config.igneous);
|
||||
const has_cookie = config.ipb_member_id && config.ipb_pass_hash && config.sk;
|
||||
const from_ex = has_cookie && config.igneous;
|
||||
if (has_cookie) {
|
||||
if (from_ex) {
|
||||
const { ipb_member_id, ipb_pass_hash, igneous } = config;
|
||||
headers.cookie = `ipb_member_id=${ipb_member_id};ipb_pass_hash=${ipb_pass_hash};igneous=${igneous}`;
|
||||
const { ipb_member_id, ipb_pass_hash, sk, igneous } = config;
|
||||
headers.cookie = `ipb_member_id=${ipb_member_id};ipb_pass_hash=${ipb_pass_hash};sk=${sk};igneous=${igneous}`;
|
||||
} else {
|
||||
const { ipb_member_id, ipb_pass_hash, sk } = config;
|
||||
headers.cookie = `ipb_member_id=${ipb_member_id};ipb_pass_hash=${ipb_pass_hash};sk=${sk}`;
|
||||
|
|
@ -23,26 +25,53 @@ function ehgot(url) {
|
|||
}
|
||||
}
|
||||
|
||||
async function parsePage(cache, data, get_bittorrent = false) {
|
||||
function ehgot_thumb(cache, thumb_url) {
|
||||
return cache.tryGet(thumb_url, async () => {
|
||||
try {
|
||||
const buffer = await got({ method: 'get', url: thumb_url, headers });
|
||||
const data = new Buffer.from(buffer.rawBody).toString('base64');
|
||||
const ext = path.extname(thumb_url).slice(1);
|
||||
return `data:image/${ext};base64,${data}`;
|
||||
} catch (e) {
|
||||
logger.warn('Cannot download thumbnail: ' + thumb_url, e);
|
||||
return thumb_url;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
async function parsePage(cache, data, get_bittorrent = false, embed_thumb = false) {
|
||||
const $ = cheerio.load(data);
|
||||
const table = $('table[class="itg gltc"] tbody');
|
||||
const table = $('table[class^="itg glt"] tbody');
|
||||
if (!table) {
|
||||
return [];
|
||||
}
|
||||
|
||||
async function parseTableRow(cache, element) {
|
||||
const el = $(element);
|
||||
const el_a = el.find('td[class="gl3c glname"] a');
|
||||
const el_img = el.find('td.gl2c div.glthumb div img');
|
||||
const title = el_a.find('div.glink').html();
|
||||
const thumbnail = el_img.attr('data-src') ? el_img.attr('data-src') : el_img.attr('src');
|
||||
const description = `<img src='${thumbnail}' alt='thumbnail'>`;
|
||||
const title = el.find('div.glink').html();
|
||||
const pubDate = el.find('div[id^="posted_"]').html();
|
||||
// match "Minimal", "Minimal+" and "Compact"
|
||||
let el_a = el.find('td[class^="gl3"] a');
|
||||
let el_img = el.find('td[class^=gl2] div.glthumb div img');
|
||||
// if not, match "Extended"
|
||||
if (!(el_a.length && el_img.length)) {
|
||||
el_a = el.find('td[class^="gl1"] a');
|
||||
el_img = el_a.find('img');
|
||||
}
|
||||
const link = el_a.attr('href');
|
||||
let thumbnail = el_img.attr('data-src') ? el_img.attr('data-src') : el_img.attr('src');
|
||||
if (config.img_proxy && thumbnail) {
|
||||
const url = new URL(thumbnail);
|
||||
thumbnail = config.img_proxy + url.pathname + url.search;
|
||||
}
|
||||
if (embed_thumb && thumbnail) {
|
||||
thumbnail = await ehgot_thumb(cache, thumbnail);
|
||||
}
|
||||
const description = `<img src='${thumbnail}' alt='thumbnail'>`;
|
||||
if (title && link) {
|
||||
const item = { title, description, pubDate, link };
|
||||
if (get_bittorrent) {
|
||||
const el_down = el.find('td.gl2c div div.gldown');
|
||||
const el_down = el.find('div.gldown');
|
||||
const bittorrent_page_url = el_down.find('a').attr('href');
|
||||
if (bittorrent_page_url) {
|
||||
const bittorrent_url = await getBittorrent(cache, bittorrent_page_url);
|
||||
|
|
@ -113,31 +142,31 @@ function updateBittorrent_url(cache, items) {
|
|||
return items;
|
||||
}
|
||||
|
||||
async function gatherItemsByPage(cache, url, get_bittorrent = false) {
|
||||
async function gatherItemsByPage(cache, url, get_bittorrent = false, embed_thumb = false) {
|
||||
const response = await ehgot(url);
|
||||
const items = await parsePage(cache, response.data, get_bittorrent);
|
||||
const items = await parsePage(cache, response.data, get_bittorrent, embed_thumb);
|
||||
return updateBittorrent_url(cache, items);
|
||||
}
|
||||
|
||||
async function getFavoritesItems(cache, page, favcat, inline_set, get_bittorrent = false) {
|
||||
async function getFavoritesItems(cache, page, favcat, inline_set, get_bittorrent = false, embed_thumb = false) {
|
||||
const response = await ehgot(`favorites.php?favcat=${favcat}&inline_set=${inline_set}`);
|
||||
if (parseInt(page) === 0) {
|
||||
const items = await parsePage(cache, response.data, get_bittorrent);
|
||||
const items = await parsePage(cache, response.data, get_bittorrent, embed_thumb);
|
||||
return updateBittorrent_url(cache, items);
|
||||
}
|
||||
return gatherItemsByPage(cache, `favorites.php?page=${page}&favcat=${favcat}`, get_bittorrent);
|
||||
return gatherItemsByPage(cache, `favorites.php?page=${page}&favcat=${favcat}`, get_bittorrent, embed_thumb);
|
||||
}
|
||||
|
||||
function getSearchItems(cache, params, page = undefined, get_bittorrent = false) {
|
||||
function getSearchItems(cache, params, page = undefined, get_bittorrent = false, embed_thumb = false) {
|
||||
if (page) {
|
||||
return gatherItemsByPage(cache, `?page=${page}&${params}`, get_bittorrent);
|
||||
return gatherItemsByPage(cache, `?page=${page}&${params}`, get_bittorrent, embed_thumb);
|
||||
} else {
|
||||
return gatherItemsByPage(cache, `?${params}`, get_bittorrent);
|
||||
return gatherItemsByPage(cache, `?${params}`, get_bittorrent, embed_thumb);
|
||||
}
|
||||
}
|
||||
|
||||
function getTagItems(cache, tag, page, get_bittorrent = false) {
|
||||
return gatherItemsByPage(cache, `tag/${tag}/${page}`, get_bittorrent);
|
||||
function getTagItems(cache, tag, page, get_bittorrent = false, embed_thumb = false) {
|
||||
return gatherItemsByPage(cache, `tag/${tag}/${page}`, get_bittorrent, embed_thumb);
|
||||
}
|
||||
|
||||
module.exports = { getFavoritesItems, getSearchItems, getTagItems, has_cookie, from_ex };
|
||||
|
|
@ -6,9 +6,11 @@ module.exports = async (ctx) => {
|
|||
}
|
||||
const favcat = ctx.params.favcat ? parseInt(ctx.params.favcat) : 0;
|
||||
const page = ctx.params.page ? parseInt(ctx.params.page) : 0;
|
||||
const bittorrent = ctx.params.bittorrent || false;
|
||||
const routeParams = new URLSearchParams(ctx.params.routeParams);
|
||||
const bittorrent = routeParams.get('bittorrent') || false;
|
||||
const embed_thumb = routeParams.get('embed_thumb') || false;
|
||||
const inline_set = ctx.params.order === 'posted' ? 'fs_p' : 'fs_f';
|
||||
const items = await EhAPI.getFavoritesItems(ctx.cache, page, favcat, inline_set, bittorrent);
|
||||
const items = await EhAPI.getFavoritesItems(ctx.cache, page, favcat, inline_set, bittorrent, embed_thumb);
|
||||
|
||||
if (EhAPI.from_ex) {
|
||||
ctx.state.data = {
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
module.exports = {
|
||||
'/favorites/:favcat?/:order?/:page?/:routeParams?': ['yindaheng98'],
|
||||
'/search/:params?/:page?/:routeParams?': ['yindaheng98'],
|
||||
'/tag/:tag/:page?/:routeParams?': ['yindaheng98'],
|
||||
};
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
module.exports = (router) => {
|
||||
router.get('/favorites/:favcat?/:order?/:page?/:routeParams?', require('./favorites'));
|
||||
router.get('/search/:params?/:page?/:routeParams?', require('./search'));
|
||||
router.get('/tag/:tag/:page?/:routeParams?', require('./tag'));
|
||||
};
|
||||
|
|
@ -3,14 +3,16 @@ const EhAPI = require('./ehapi');
|
|||
module.exports = async (ctx) => {
|
||||
const page = ctx.params.page;
|
||||
let params = ctx.params.params;
|
||||
const bittorrent = ctx.params.bittorrent || false;
|
||||
const routeParams = new URLSearchParams(ctx.params.routeParams);
|
||||
const bittorrent = routeParams.get('bittorrent') || false;
|
||||
const embed_thumb = routeParams.get('embed_thumb') || false;
|
||||
let items;
|
||||
if (page) {
|
||||
// 如果定义了page,就要覆盖params
|
||||
params = params.replace(/&*page=[^&]$/, '').replace(/page=[^&]&/, '');
|
||||
items = await EhAPI.getSearchItems(ctx.cache, params, parseInt(page), bittorrent);
|
||||
items = await EhAPI.getSearchItems(ctx.cache, params, parseInt(page), bittorrent, embed_thumb);
|
||||
} else {
|
||||
items = await EhAPI.getSearchItems(ctx.cache, params, undefined, bittorrent);
|
||||
items = await EhAPI.getSearchItems(ctx.cache, params, undefined, bittorrent, embed_thumb);
|
||||
}
|
||||
let title = params;
|
||||
const match = /f_search=([^&]+)/.exec(title);
|
||||
|
|
@ -3,8 +3,10 @@ const EhAPI = require('./ehapi');
|
|||
module.exports = async (ctx) => {
|
||||
const page = ctx.params.page ? parseInt(ctx.params.page) : 0;
|
||||
const tag = ctx.params.tag;
|
||||
const bittorrent = ctx.params.bittorrent || false;
|
||||
const items = await EhAPI.getTagItems(ctx.cache, tag, page, bittorrent);
|
||||
const routeParams = new URLSearchParams(ctx.params.routeParams);
|
||||
const bittorrent = routeParams.get('bittorrent') || false;
|
||||
const embed_thumb = routeParams.get('embed_thumb') || false;
|
||||
const items = await EhAPI.getTagItems(ctx.cache, tag, page, bittorrent, embed_thumb);
|
||||
|
||||
if (EhAPI.from_ex) {
|
||||
ctx.state.data = {
|
||||
|
|
@ -0,0 +1,66 @@
|
|||
const got = require('@/utils/got');
|
||||
const cheerio = require('cheerio');
|
||||
const { parseDate } = require('@/utils/parse-date');
|
||||
const timezone = require('@/utils/timezone');
|
||||
const rootUrl = 'https://www.thecover.cn';
|
||||
|
||||
const nodes = {
|
||||
3892: '天下',
|
||||
3560: '四川',
|
||||
3909: '辟谣',
|
||||
3686: '国际',
|
||||
11: '云招考',
|
||||
3902: '30秒',
|
||||
3889: '拍客',
|
||||
3689: '体育',
|
||||
1: '国内',
|
||||
4002: '帮扶铁军',
|
||||
12: '文娱',
|
||||
46: '宽窄',
|
||||
4: '商业',
|
||||
21: '千面',
|
||||
17: '封面号',
|
||||
};
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const id = ctx.params.id ?? '3892';
|
||||
const targetUrl = rootUrl.concat(`/channel_${id}`);
|
||||
const resp = await got({
|
||||
method: 'get',
|
||||
url: targetUrl,
|
||||
});
|
||||
const $ = cheerio.load(resp.data);
|
||||
const list = $('a.link-to-article')
|
||||
.filter(function () {
|
||||
return $(this).attr('href').startsWith('/');
|
||||
})
|
||||
.map((_, item) => ({
|
||||
link: rootUrl.concat($(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);
|
||||
item.title = content('h1', '.main-article').text();
|
||||
item.description = content('section.article-content').html();
|
||||
const info = content('span', '.props-of-title');
|
||||
item.author = info.eq(0).text();
|
||||
item.pubDate = timezone(parseDate(info.eq(1).text(), 'YYYY-MM-DD HH:mm'), +8);
|
||||
return item;
|
||||
})
|
||||
)
|
||||
);
|
||||
|
||||
ctx.state.data = {
|
||||
title: `${nodes[id]}-封面新闻`,
|
||||
link: targetUrl,
|
||||
description: `封面新闻作为华西都市报深度融合转型和打造新型主流媒体的载体,牢固确立移动优先战略,创新移动新闻产品,打造移动传播矩阵,封面新闻的传播力、引导力、影响力和公信力不断得到各方肯定。封面新闻突破千万的用户下载量,呈现出以四川为主阵地的全国分布态势,用户年龄构成以20-35岁为主,“亿万年轻人的生活方式”的定位初步得到体现。`,
|
||||
language: 'zh-cn',
|
||||
item: items,
|
||||
};
|
||||
};
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
module.exports = {
|
||||
'/channel/:id?': ['yuxinliu-alex'],
|
||||
};
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
module.exports = {
|
||||
'thecover.cn': {
|
||||
_name: '封面新闻',
|
||||
'.': [
|
||||
{
|
||||
title: '频道',
|
||||
docs: 'https://docs.rsshub.app/new-media.html#the-cover',
|
||||
source: ['/:id', '/'],
|
||||
target: (params) => `/thecover/channel/${params.id.replace('channel_', '')}`,
|
||||
},
|
||||
],
|
||||
},
|
||||
};
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
module.exports = function (router) {
|
||||
router.get('/channel/:id?', require('./channel'));
|
||||
};
|
||||
|
|
@ -1,5 +1,6 @@
|
|||
const got = require('@/utils/got');
|
||||
const cheerio = require('cheerio');
|
||||
const { parseDate } = require('@/utils/parse-date');
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const { data: htmlString } = await got({
|
||||
|
|
@ -20,13 +21,13 @@ module.exports = async (ctx) => {
|
|||
title: `${time} ${title}`,
|
||||
link: `https://mp.weixin.qq.com${$link.attr('href')}`,
|
||||
description: title,
|
||||
pubDate: new Date(time).toUTCString(),
|
||||
pubDate: parseDate(time),
|
||||
});
|
||||
});
|
||||
|
||||
ctx.state.data = {
|
||||
title: '微信公众平台-系统公告栏目',
|
||||
link: 'https://mp.weixin.qq.com/cgi-bin/announce?action=getannouncementlist&lang=zh_CN&token=',
|
||||
link: 'https://mp.weixin.qq.com/cgi-bin/announce?action=getannouncementlist&lang=zh_CN',
|
||||
item: announceList,
|
||||
};
|
||||
};
|
||||
|
|
@ -1,4 +1,14 @@
|
|||
module.exports = {
|
||||
'/feeddd/:id': ['TonyRL', 'Rongronggg9'],
|
||||
'/announce': ['xyqfer'],
|
||||
'/ce/:id': ['HenryQW'],
|
||||
'/ershicimi/:id': ['sanmmm'],
|
||||
'/data258/:id?': ['Rongronggg9'],
|
||||
'/feeddd/:id': ['TonyRL', 'Rongronggg9'],
|
||||
'/feeds': ['tylinux'],
|
||||
'/mp/homepage/:biz/:hid/:cid?': ['MisteryMonster'],
|
||||
'/mp/msgalbum/:biz/:aid': ['MisteryMonster'],
|
||||
'/tgchannel/:id/:mpName?/:searchQueryType?': ['LogicJake', 'Rongronggg9'],
|
||||
'/uread/:userid': ['kt286'],
|
||||
'/wemp/:id': ['HenryQW'],
|
||||
'/wxnmh/:id': ['laampui'],
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,11 +1,23 @@
|
|||
module.exports = {
|
||||
'feeddd.org': {
|
||||
'careerengine.us': {
|
||||
_name: '微信',
|
||||
posts: [
|
||||
{
|
||||
title: '公众号(CareerEngine 来源)',
|
||||
docs: 'https://docs.rsshub.app/new-media.html#wei-xin',
|
||||
source: ['/author/*id/posts'],
|
||||
target: (params) => `/wechat/ce/${params.id}`,
|
||||
},
|
||||
],
|
||||
},
|
||||
'cimidata.com': {
|
||||
_name: '微信',
|
||||
'.': [
|
||||
{
|
||||
title: '公众号 (feeddd 来源)',
|
||||
title: '公众号(二十次幂来源)',
|
||||
docs: 'https://docs.rsshub.app/new-media.html#wei-xin',
|
||||
source: ['/'],
|
||||
source: ['/a/:id'],
|
||||
target: '/wechat/ce/:id',
|
||||
},
|
||||
],
|
||||
},
|
||||
|
|
@ -13,11 +25,63 @@ module.exports = {
|
|||
_name: '微信',
|
||||
mp: [
|
||||
{
|
||||
title: '公众号 (微阅读来源)',
|
||||
title: '公众号(微阅读来源)',
|
||||
docs: 'https://docs.rsshub.app/new-media.html#wei-xin',
|
||||
source: ['/', '/article/category/:id'],
|
||||
target: '/wechat/data258/:id?',
|
||||
},
|
||||
],
|
||||
},
|
||||
'feeddd.org': {
|
||||
_name: '微信',
|
||||
'.': [
|
||||
{
|
||||
title: '公众号(feeddd 来源)',
|
||||
docs: 'https://docs.rsshub.app/new-media.html#wei-xin',
|
||||
source: ['/'],
|
||||
},
|
||||
],
|
||||
},
|
||||
'mp.weixin.qq.com': {
|
||||
_name: '微信',
|
||||
'.': [
|
||||
{
|
||||
title: '公众平台系统公告栏目',
|
||||
docs: 'https://docs.rsshub.app/new-media.html#wei-xin',
|
||||
source: ['/cgi-bin/announce'],
|
||||
target: '/wechat/announce',
|
||||
},
|
||||
],
|
||||
},
|
||||
'privacyhide.com': {
|
||||
_name: '微信',
|
||||
wechat: [
|
||||
{
|
||||
title: '公众号(wechat-feeds 来源)',
|
||||
docs: 'https://docs.rsshub.app/new-media.html#wei-xin',
|
||||
},
|
||||
],
|
||||
},
|
||||
'wemp.app': {
|
||||
_name: '微信',
|
||||
'.': [
|
||||
{
|
||||
title: '公众号(wemp.app 来源)',
|
||||
docs: 'https://docs.rsshub.app/new-media.html#wei-xin',
|
||||
source: ['/accounts/:id'],
|
||||
target: '/wechat/wemp/:id',
|
||||
},
|
||||
],
|
||||
},
|
||||
'wxnmh.com': {
|
||||
_name: '微信',
|
||||
'.': [
|
||||
{
|
||||
title: '公众号(wxnmh.com 来源)',
|
||||
docs: 'https://docs.rsshub.app/new-media.html#wei-xin',
|
||||
source: ['/:id'],
|
||||
target: (params) => `/wechat/wxnmh/${params.id.replace('user-', '').replace('.htm', '')}`,
|
||||
},
|
||||
],
|
||||
},
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,4 +1,14 @@
|
|||
module.exports = function (router) {
|
||||
router.get('/feeddd/:id', require('./feeddd'));
|
||||
router.get('/announce', require('./announce'));
|
||||
router.get('/ce/:id', require('./ce'));
|
||||
router.get('/data258/:id?', require('./data258'));
|
||||
router.get('/ershicimi/:id', require('./ershcimi'));
|
||||
router.get('/feeddd/:id', require('./feeddd'));
|
||||
router.get('/feeds/:id', require('./feeds'));
|
||||
router.get('/mp/homepage/:biz/:hid/:cid?', require('./mp'));
|
||||
router.get('/mp/msgalbum/:biz/:aid', require('./msgalbum'));
|
||||
router.get('/tgchannel/:id/:mpName?/:searchQueryType?', require('./tgchannel'));
|
||||
router.get('/uread/:userid', require('./uread'));
|
||||
router.get('/wemp/:id', require('./wemp'));
|
||||
router.get('/wxnmh/:id', require('./wxnmh'));
|
||||
};
|
||||
|
|
|
|||
|
|
@ -0,0 +1,3 @@
|
|||
module.exports = {
|
||||
'/newsflash': ['x2009again'],
|
||||
};
|
||||
|
|
@ -0,0 +1,42 @@
|
|||
const got = require('@/utils/got');
|
||||
const { parseDate } = require('@/utils/parse-date');
|
||||
const timezone = require('@/utils/timezone');
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const response = await got({
|
||||
method: 'post',
|
||||
url: 'https://www.yunspe.com/wp-json/b2/v1/getNewsflashesList',
|
||||
headers: {
|
||||
Referer: 'https://www.yunspe.com/newsflashes',
|
||||
'content-type': 'application/x-www-form-urlencoded',
|
||||
},
|
||||
body: 'paged=1&term=0&post_paged=1',
|
||||
});
|
||||
const data = response.data.data;
|
||||
|
||||
const out = data.map((item) => {
|
||||
const title = item[0].title.replace('【微语简报】', '');
|
||||
const link = item[0].link;
|
||||
const datematch = item[0]._date.match(/datetime="(.*)" itemprop/);
|
||||
const date = datematch && datematch[1];
|
||||
const description = item[0].content
|
||||
.substring(item[0].content.indexOf('【今日简报】') + 6)
|
||||
.replace(/(\d*\.\s)|(【)/g, '<br>$1$2')
|
||||
.substring(4);
|
||||
|
||||
const single = {
|
||||
title,
|
||||
link,
|
||||
pubDate: date && timezone(parseDate(date, 'YYYY-M-D H:mm:ss'), +8),
|
||||
description,
|
||||
};
|
||||
|
||||
return single;
|
||||
});
|
||||
ctx.state.data = {
|
||||
title: '微语简报',
|
||||
link: 'https://www.yunspe.com/newsflashes',
|
||||
description: '微语简报',
|
||||
item: out,
|
||||
};
|
||||
};
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
module.exports = {
|
||||
'yunspe.com': {
|
||||
_name: '云奇网',
|
||||
'.': [
|
||||
{
|
||||
title: '微语简报',
|
||||
docs: 'https://docs.rsshub.app/new-media.html#wei-yu-jian-bao',
|
||||
source: ['/newsflashes/微语简报', '/newsflashes', '/'],
|
||||
target: '/yunspe/newsflashes',
|
||||
},
|
||||
],
|
||||
},
|
||||
};
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
module.exports = (router) => {
|
||||
router.get('/newsflash', require('./newsflash'));
|
||||
};
|
||||
|
|
@ -117,14 +117,14 @@
|
|||
"parse-torrent": "9.1.5",
|
||||
"pidusage": "3.0.0",
|
||||
"plist": "3.0.5",
|
||||
"puppeteer": "13.5.2",
|
||||
"puppeteer": "13.6.0",
|
||||
"query-string": "7.1.1",
|
||||
"rand-user-agent": "1.0.59",
|
||||
"require-all": "3.0.0",
|
||||
"rss-parser": "3.12.0",
|
||||
"showdown": "2.0.3",
|
||||
"simplecc-wasm": "0.1.4",
|
||||
"socks-proxy-agent": "6.1.1",
|
||||
"socks-proxy-agent": "6.2.0",
|
||||
"string-similarity": "4.0.4",
|
||||
"tiny-async-pool": "2.0.1",
|
||||
"torrent-search-api": "2.1.4",
|
||||
|
|
|
|||
34
yarn.lock
34
yarn.lock
|
|
@ -4571,7 +4571,7 @@ debug@2.6.9, debug@^2.2.0, debug@^2.3.3, debug@^2.6.9:
|
|||
dependencies:
|
||||
ms "2.0.0"
|
||||
|
||||
debug@4, debug@4.3.4, debug@^4.0.0, debug@^4.0.1, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.2, debug@^4.3.3, debug@^4.3.4:
|
||||
debug@4, debug@4.3.4, debug@^4.0.0, debug@^4.0.1, debug@^4.1.0, debug@^4.1.1, debug@^4.3.2, debug@^4.3.3, debug@^4.3.4:
|
||||
version "4.3.4"
|
||||
resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865"
|
||||
integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==
|
||||
|
|
@ -4808,10 +4808,10 @@ detect-node@^2.0.4:
|
|||
resolved "https://registry.yarnpkg.com/detect-node/-/detect-node-2.1.0.tgz#c9c70775a49c3d03bc2c06d9a73be550f978f8b1"
|
||||
integrity sha512-T0NIuQpnTvFDATNuHN5roPwSBG83rFsuO+MXXH9/3N1eFbn4wcPjttvjMLEPWJ0RGUYgQE7cGgS3tNxbqCGM7g==
|
||||
|
||||
devtools-protocol@0.0.969999:
|
||||
version "0.0.969999"
|
||||
resolved "https://registry.yarnpkg.com/devtools-protocol/-/devtools-protocol-0.0.969999.tgz#3d6be0a126b3607bb399ae2719b471dda71f3478"
|
||||
integrity sha512-6GfzuDWU0OFAuOvBokXpXPLxjOJ5DZ157Ue3sGQQM3LgAamb8m0R0ruSfN0DDu+XG5XJgT50i6zZ/0o8RglreQ==
|
||||
devtools-protocol@0.0.981744:
|
||||
version "0.0.981744"
|
||||
resolved "https://registry.yarnpkg.com/devtools-protocol/-/devtools-protocol-0.0.981744.tgz#9960da0370284577d46c28979a0b32651022bacf"
|
||||
integrity sha512-0cuGS8+jhR67Fy7qG3i3Pc7Aw494sb9yG9QgpG97SFVWwolgYjlhJg7n+UaHxOQT30d1TYu/EYe9k01ivLErIg==
|
||||
|
||||
dezalgo@1.0.3:
|
||||
version "1.0.3"
|
||||
|
|
@ -11255,14 +11255,14 @@ pupa@^2.0.1, pupa@^2.1.1:
|
|||
dependencies:
|
||||
escape-goat "^2.0.0"
|
||||
|
||||
puppeteer@13.5.2:
|
||||
version "13.5.2"
|
||||
resolved "https://registry.yarnpkg.com/puppeteer/-/puppeteer-13.5.2.tgz#73ae84969cbf514aeee871a05ec4549d67f6abee"
|
||||
integrity sha512-DJAyXODBikZ3xPs8C35CtExEw78LZR9RyelGDAs0tX1dERv3OfW7qpQ9VPBgsfz+hG2HiMTO/Tyf7BuMVWsrxg==
|
||||
puppeteer@13.6.0:
|
||||
version "13.6.0"
|
||||
resolved "https://registry.yarnpkg.com/puppeteer/-/puppeteer-13.6.0.tgz#3583fc60c1af59af838d65a09680f2d07f3608f9"
|
||||
integrity sha512-EJXhTyY5bXNPLFXPGcY9JaF6EKJIX8ll8cGG3WUK+553Jx96oDf1cB+lkFOro9p0X16tY+9xx7zYWl+vnWgW2g==
|
||||
dependencies:
|
||||
cross-fetch "3.1.5"
|
||||
debug "4.3.4"
|
||||
devtools-protocol "0.0.969999"
|
||||
devtools-protocol "0.0.981744"
|
||||
extract-zip "2.0.1"
|
||||
https-proxy-agent "5.0.0"
|
||||
pkg-dir "4.2.0"
|
||||
|
|
@ -12311,16 +12311,16 @@ socks-proxy-agent@5, socks-proxy-agent@^5.0.0:
|
|||
debug "4"
|
||||
socks "^2.3.3"
|
||||
|
||||
socks-proxy-agent@6.1.1:
|
||||
version "6.1.1"
|
||||
resolved "https://registry.yarnpkg.com/socks-proxy-agent/-/socks-proxy-agent-6.1.1.tgz#e664e8f1aaf4e1fb3df945f09e3d94f911137f87"
|
||||
integrity sha512-t8J0kG3csjA4g6FTbsMOWws+7R7vuRC8aQ/wy3/1OWmsgwA68zs/+cExQ0koSitUDXqhufF/YJr9wtNMZHw5Ew==
|
||||
socks-proxy-agent@6.2.0:
|
||||
version "6.2.0"
|
||||
resolved "https://registry.yarnpkg.com/socks-proxy-agent/-/socks-proxy-agent-6.2.0.tgz#f6b5229cc0cbd6f2f202d9695f09d871e951c85e"
|
||||
integrity sha512-wWqJhjb32Q6GsrUqzuFkukxb/zzide5quXYcMVpIjxalDBBYy2nqKCFQ/9+Ie4dvOYSQdOk3hUlZSdzZOd3zMQ==
|
||||
dependencies:
|
||||
agent-base "^6.0.2"
|
||||
debug "^4.3.1"
|
||||
socks "^2.6.1"
|
||||
debug "^4.3.3"
|
||||
socks "^2.6.2"
|
||||
|
||||
socks@^2.3.3, socks@^2.6.1:
|
||||
socks@^2.3.3, socks@^2.6.2:
|
||||
version "2.6.2"
|
||||
resolved "https://registry.yarnpkg.com/socks/-/socks-2.6.2.tgz#ec042d7960073d40d94268ff3bb727dc685f111a"
|
||||
integrity sha512-zDZhHhZRY9PxRruRMR7kMhnf3I8hDs4S3f9RecfnGxvcBHQcKcIH/oUcEWffsfl1XxdYlA7nnlGbbTvPz9D8gA==
|
||||
|
|
|
|||
Loading…
Reference in New Issue