mirror of
https://github.com/DIYgod/RSSHub.git
synced 2026-09-19 09:52:21 +08:00
feat: 支持订阅 Kaggle 全站 discussions (#3456)
This commit is contained in:
+1
-1
@@ -158,7 +158,7 @@ GitHub 官方也提供了一些 RSS:
|
||||
|
||||
### Discussion
|
||||
|
||||
<Route author="LogicJake" example="/kaggle/discussion/387811/active" path="/kaggle/discussion/:forumId/:sort?" :paramsDesc="['讨论区 id, 打开网页请求, 搜索 forumId', '排序方式见下表, 默认为 hot']">
|
||||
<Route author="LogicJake" example="/kaggle/discussion/387811/active" path="/kaggle/discussion/:forumId/:sort?" :paramsDesc="['讨论区 id, 打开网页请求, 搜索 forumId;填 all 可以订阅全站讨论区', '排序方式见下表, 默认为 hot']">
|
||||
|
||||
| hot | recent | new | top | active |
|
||||
| ------- | --------------- | --------------- | ---------- | ------------- |
|
||||
|
||||
@@ -18,7 +18,10 @@ module.exports = async (ctx) => {
|
||||
|
||||
const response = await got({
|
||||
method: 'get',
|
||||
url: `https://www.kaggle.com/forums/${forumId}/topics.json?sortBy=${sort}&group=all&page=1&pageSize=20&category=all`,
|
||||
url:
|
||||
forumId !== 'all'
|
||||
? `https://www.kaggle.com/forums/${forumId}/topics.json?sortBy=${sort}&group=all&page=1&pageSize=20&category=all`
|
||||
: `https://www.kaggle.com/topics.json?sortBy=${sort}&group=all&page=1&pageSize=20&category=all`,
|
||||
headers: {
|
||||
Referer: rootUrl,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user