style: auto format
This commit is contained in:
+6
-6
@@ -1328,6 +1328,12 @@ JavDB 有多个备用域名,本路由默认使用永久域名 <https://javdb.c
|
||||
|
||||
<Route author="nczitzk" example="/shinybbs/p/1790" path="/shinybbs/p/:id" :paramsDesc="['剧集 id,可在剧集页 URL 中找到']" />
|
||||
|
||||
## 时光网
|
||||
|
||||
### 资讯
|
||||
|
||||
<Route author="TsSmartTT" example="/mtime/news" path="/mtime/news" radar="1" rssbud="1"/>
|
||||
|
||||
## 腾讯视频
|
||||
|
||||
### 播放列表
|
||||
@@ -1496,9 +1502,3 @@ Tiny Tiny RSS 会给所有 iframe 元素添加 `sandbox="allow-scripts"` 属性
|
||||
### 综艺
|
||||
|
||||
<Route author="pharaoh2012" example="/zyshow/chongchongchong" path="/zyshow/:name" :paramsDesc="['综艺 name,对应综艺的 URL 中找到']" radar="1" rssbud="1"/>
|
||||
|
||||
## 时光网
|
||||
|
||||
### 资讯
|
||||
|
||||
<Route author="TsSmartTT" example="/mtime/news" path="/mtime/news" radar="1" rssbud="1"/>
|
||||
|
||||
+48
-48
@@ -1,48 +1,48 @@
|
||||
const got = require('@/utils/got');
|
||||
const cheerio = require('cheerio');
|
||||
const timezone = require('@/utils/timezone');
|
||||
const { parseDate } = require('@/utils/parse-date');
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const link = 'http://news.mtime.com/';
|
||||
const response = await got({
|
||||
method: 'get',
|
||||
url: link,
|
||||
});
|
||||
const $ = cheerio.load(response.data);
|
||||
const list = $('ul.left-cont.fix li')
|
||||
.map((_, item) => {
|
||||
item = $(item);
|
||||
return {
|
||||
title: item.find('h4 a').text(),
|
||||
link: item.find('h4 a').attr('href'),
|
||||
};
|
||||
})
|
||||
.get();
|
||||
|
||||
const items = await Promise.all(
|
||||
list.map((item) =>
|
||||
ctx.cache.tryGet(item.link, async () => {
|
||||
const detailResponse = await got({
|
||||
method: 'get',
|
||||
url: item.link,
|
||||
});
|
||||
const content = cheerio.load(detailResponse.data);
|
||||
|
||||
content('.DRE-subject-wrapper').remove();
|
||||
|
||||
item.author = content('.editor').text().replace('编辑:', '');
|
||||
item.description = content('.body').first().html();
|
||||
item.pubDate = timezone(parseDate(content('.userCreateTime').text()), 8);
|
||||
|
||||
return item;
|
||||
})
|
||||
)
|
||||
);
|
||||
|
||||
ctx.state.data = {
|
||||
title: 'Mtime时光网 - 资讯',
|
||||
link,
|
||||
item: items,
|
||||
};
|
||||
};
|
||||
const got = require('@/utils/got');
|
||||
const cheerio = require('cheerio');
|
||||
const timezone = require('@/utils/timezone');
|
||||
const { parseDate } = require('@/utils/parse-date');
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const link = 'http://news.mtime.com/';
|
||||
const response = await got({
|
||||
method: 'get',
|
||||
url: link,
|
||||
});
|
||||
const $ = cheerio.load(response.data);
|
||||
const list = $('ul.left-cont.fix li')
|
||||
.map((_, item) => {
|
||||
item = $(item);
|
||||
return {
|
||||
title: item.find('h4 a').text(),
|
||||
link: item.find('h4 a').attr('href'),
|
||||
};
|
||||
})
|
||||
.get();
|
||||
|
||||
const items = await Promise.all(
|
||||
list.map((item) =>
|
||||
ctx.cache.tryGet(item.link, async () => {
|
||||
const detailResponse = await got({
|
||||
method: 'get',
|
||||
url: item.link,
|
||||
});
|
||||
const content = cheerio.load(detailResponse.data);
|
||||
|
||||
content('.DRE-subject-wrapper').remove();
|
||||
|
||||
item.author = content('.editor').text().replace('编辑:', '');
|
||||
item.description = content('.body').first().html();
|
||||
item.pubDate = timezone(parseDate(content('.userCreateTime').text()), 8);
|
||||
|
||||
return item;
|
||||
})
|
||||
)
|
||||
);
|
||||
|
||||
ctx.state.data = {
|
||||
title: 'Mtime时光网 - 资讯',
|
||||
link,
|
||||
item: items,
|
||||
};
|
||||
};
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
module.exports = {
|
||||
'mtime.com': {
|
||||
_name: '时光网',
|
||||
'news': [
|
||||
news: [
|
||||
{
|
||||
title: '资讯',
|
||||
docs: 'https://docs.rsshub.app/multimedia.html#shi-guang-wang',
|
||||
|
||||
Reference in New Issue
Block a user