添加腾讯云直播 SDK 更新日志 (#449)
This commit is contained in:
@@ -220,6 +220,8 @@ RSSHub 是一个轻量、易于扩展的 RSS 生成器,可以给任何奇奇
|
||||
- 博文
|
||||
- 开源中国
|
||||
- 资讯
|
||||
- 腾讯云
|
||||
- 移动直播 SDK 更新日志
|
||||
|
||||
</details>
|
||||
|
||||
|
||||
@@ -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`
|
||||
|
||||
参数:无
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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,
|
||||
};
|
||||
};
|
||||
Reference in New Issue
Block a user