添加腾讯云直播 SDK 更新日志 (#449)

This commit is contained in:
Kevin
2018-08-12 23:51:21 +08:00
committed by DIYgod
parent 1e9497e04d
commit 20112cd93a
4 changed files with 49 additions and 0 deletions
+2
View File
@@ -220,6 +220,8 @@ RSSHub 是一个轻量、易于扩展的 RSS 生成器,可以给任何奇奇
- 博文
- 开源中国
- 资讯
- 腾讯云
- 移动直播 SDK 更新日志
</details>
+10
View File
@@ -1764,3 +1764,13 @@ id,可选,分区或标签的 ID,对应 URL 中的 `sid` 或 `tid`
路由: `/oschina/news`
参数:无
## 腾讯云
### 移动直播 SDK 更新日志
举例: [https://rsshub.app/qcloud/mlvb/changelog](https://rsshub.app/qcloud/mlvb/changelog)
路由: `/qcloud/mlvb/changelog`
参数:无
+3
View File
@@ -399,4 +399,7 @@ router.get('/linkedkeeper/:type/:id?', require('./routes/linkedkeeper/index'));
// 开源中国
router.get('/oschina/news', require('./routes/oschina/news'));
// 腾讯视频 SDK
router.get('/qcloud/mlvb/changelog', require('./routes/qcloud/mlvb/changelog'));
module.exports = router;
+34
View File
@@ -0,0 +1,34 @@
const axios = require('../../../utils/axios');
const cheerio = require('cheerio');
const config = require('../../../config');
module.exports = async (ctx) => {
const url = 'https://cloud.tencent.com/document/product/454/7878';
const res = await axios({
method: 'get',
url: url,
headers: {
'User-Agent': config.ua,
},
});
const data = res.data;
const $ = cheerio.load(data);
const resultItem = [];
$('#docArticleContent h3').each(function() {
const item = {};
item.title = $(this).text();
item.description = $(this)
.nextUntil('h3')
.text();
item.link = url;
resultItem.push(item);
});
ctx.state.data = {
title: '腾讯移动直播 SDK 更新日志',
link: url,
item: resultItem,
};
};