mirror of
https://github.com/DIYgod/RSSHub.git
synced 2025-12-04 19:59:54 +08:00
feat: add 腾讯柠檬精选 (#5066)
This commit is contained in:
@@ -260,6 +260,12 @@ pageClass: routes
|
||||
|
||||
<Route author="zytomorrow" example="/pgyer/:app" path="/pgyer/kz-test" :paramsDesc="['app为下载页最后的路径']" radar="1"/>
|
||||
|
||||
## 腾讯柠檬 Lab
|
||||
|
||||
### 柠檬精选 Mac Apps
|
||||
|
||||
<Route author="HenryQW" example="/tencent/lemon" path="/tencent/lemon"/>
|
||||
|
||||
## 腾讯云移动直播 SDK
|
||||
|
||||
### 更新日志
|
||||
|
||||
@@ -155,7 +155,7 @@ GitHub 官方也提供了一些 RSS:
|
||||
|
||||
</Route>
|
||||
|
||||
## Go语言中文网
|
||||
## Go 语言中文网
|
||||
|
||||
### 周刊
|
||||
|
||||
|
||||
@@ -2005,6 +2005,9 @@ router.get('/sohu/mp/:id', require('./routes/sohu/mp'));
|
||||
// 腾讯企鹅号
|
||||
router.get('/tencent/news/author/:mid', require('./routes/tencent/news/author'));
|
||||
|
||||
// 腾讯柠檬精选
|
||||
router.get('/tencent/lemon', require('./routes/tencent/lemon/index'));
|
||||
|
||||
// 奈菲影视
|
||||
router.get('/nfmovies/:id?', require('./routes/nfmovies/index'));
|
||||
|
||||
|
||||
29
lib/routes/tencent/lemon/index.js
Normal file
29
lib/routes/tencent/lemon/index.js
Normal file
@@ -0,0 +1,29 @@
|
||||
const got = require('@/utils/got');
|
||||
const date = require('@/utils/date');
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const url = 'https://lemon.qq.com/lab/js/source.js';
|
||||
|
||||
let data = (await got.get(url)).data.match(/(?<=(var list = ))(.*)(\])/gs)[0];
|
||||
|
||||
// eslint-disable-next-line no-eval
|
||||
data = eval('(' + data + ')').slice(0, 10);
|
||||
|
||||
const items = data.map((i) => ({
|
||||
title: i.name,
|
||||
description: `
|
||||
${i.comment}</br>
|
||||
<img src="${i.logo}"></br>
|
||||
<a href="${i.downloadlink}">下载链接</a>
|
||||
`,
|
||||
link: `https://lemon.qq.com/lab/app/${i.shortname}.html`,
|
||||
author: i.referrer,
|
||||
pubDate: date(i.date),
|
||||
}));
|
||||
|
||||
ctx.state.data = {
|
||||
title: '腾讯柠檬精选',
|
||||
link: 'https://lemon.qq.com/lab/',
|
||||
item: items,
|
||||
};
|
||||
};
|
||||
Reference in New Issue
Block a user