mirror of
https://github.com/DIYgod/RSSHub.git
synced 2026-09-19 01:43:35 +08:00
feat: add Quicker (#5259)
Co-authored-by: root <root@DESKTOP-G9ROLIE.localdomain>
This commit is contained in:
@@ -118,6 +118,12 @@ pageClass: routes
|
||||
|
||||
<Route author="xyqfer" example="/nga/post/18449558" path="/nga/post/:tid" :paramsDesc="['帖子 id, 可在帖子 URL 找到']" radar="1"/>
|
||||
|
||||
## Quicker
|
||||
|
||||
### 讨论区
|
||||
|
||||
<Route author="Cesaryuan" example="/quicker/qa" path="/quicker/qa"/>
|
||||
|
||||
## RF 技术社区
|
||||
|
||||
### 文章
|
||||
|
||||
@@ -196,6 +196,12 @@ pageClass: routes
|
||||
|
||||
见 [#playstation](/game.html#playstation)
|
||||
|
||||
## Quicker
|
||||
|
||||
### 版本更新
|
||||
|
||||
<Route author="Cesaryuan" example="/quicker/update" path="/quicker/update"/>
|
||||
|
||||
## RSSHub
|
||||
|
||||
### 有新路由啦
|
||||
|
||||
@@ -42,6 +42,10 @@ router.get('/rsshub/sponsors', require('./routes/rsshub/sponsors'));
|
||||
// 1draw
|
||||
router.get('/1draw', require('./routes/1draw/index'));
|
||||
|
||||
// quicker
|
||||
router.get('/quicker/qa', require('./routes/quicker/qa.js'));
|
||||
router.get('/quicker/update', require('./routes/quicker/update.js'));
|
||||
|
||||
// bilibili
|
||||
router.get('/bilibili/user/video/:uid/:disableEmbed?', require('./routes/bilibili/video'));
|
||||
router.get('/bilibili/user/article/:uid', require('./routes/bilibili/article'));
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
const cheerio = require('cheerio');
|
||||
const got = require('@/utils/got');
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const response = await got({
|
||||
method: 'get',
|
||||
url: 'https://getquicker.net/QA',
|
||||
});
|
||||
const data = response.data;
|
||||
const $ = cheerio.load(data);
|
||||
const list = $('div.question-title > a');
|
||||
|
||||
const out = await Promise.all(
|
||||
list
|
||||
.map(async (index, item) => {
|
||||
item = $(item);
|
||||
const response_item = await got({
|
||||
method: 'get',
|
||||
url: 'https://getquicker.net' + item.attr('href'),
|
||||
});
|
||||
const a = cheerio.load(response_item.data);
|
||||
return Promise.resolve({
|
||||
title: item.text(),
|
||||
description: `作者:${a('.user-link').first().text()}<br>描述:${a('.user-content').first().html()}`,
|
||||
pubDate:
|
||||
a('.user-content span')
|
||||
.last()
|
||||
.text()
|
||||
.match(/最后更新于\s*\S+/) || '1900/1/1',
|
||||
link: item.attr('href'),
|
||||
});
|
||||
})
|
||||
.get()
|
||||
);
|
||||
|
||||
ctx.state.data = {
|
||||
title: '讨论区 - Quicker',
|
||||
link: 'https://getquicker.net/QA',
|
||||
item: out,
|
||||
};
|
||||
};
|
||||
@@ -0,0 +1,30 @@
|
||||
const cheerio = require('cheerio');
|
||||
const got = require('@/utils/got');
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const response = await got({
|
||||
method: 'get',
|
||||
url: 'https://getquicker.net/Help/Versions',
|
||||
});
|
||||
const data = response.data;
|
||||
const $ = cheerio.load(data);
|
||||
const list = $('div.version-list > div');
|
||||
|
||||
const out = list
|
||||
.map((index, item) => {
|
||||
item = $(item);
|
||||
return {
|
||||
title: item.find('h2 > a').text(),
|
||||
description: item.find('div.article-content').html(),
|
||||
pubDate: item.find('div > span.text-secondary.d-lg-block.mb-2').text() || '1900/1/1',
|
||||
link: item.find('h2 > a').attr('href'),
|
||||
};
|
||||
})
|
||||
.get();
|
||||
|
||||
ctx.state.data = {
|
||||
title: '版本更新 - Quicker',
|
||||
link: 'https://getquicker.net/Help/Versions',
|
||||
item: out,
|
||||
};
|
||||
};
|
||||
Reference in New Issue
Block a user