forked from DIYgod/RSSHub
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(route): sina us stock and rollnews (DIYgod#12493)
* refactor: migrate to v2 * refactor: generic rollnews * docs: merge docs * refactor: discovery use common utilities * refactor: china finance use utilities * refactor: csj use utils * feat: us stock * feat: add radar * docs: mention default value * docs: fix build
- Loading branch information
Showing
21 changed files
with
420 additions
and
266 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
const { getRollNewsList, parseRollNewsList, parseArticle } = require('./utils'); | ||
|
||
module.exports = async (ctx) => { | ||
const pageid = '402'; | ||
const lid = '2559'; | ||
const { limit = '50' } = ctx.query; | ||
const response = await getRollNewsList(pageid, lid, limit); | ||
const list = parseRollNewsList(response.data.result.data); | ||
|
||
const out = await Promise.all(list.map((item) => parseArticle(item, ctx.cache.tryGet))); | ||
|
||
ctx.state.data = { | ||
title: '新浪专栏-创事记', | ||
link: 'https://tech.sina.com.cn/chuangshiji', | ||
item: out, | ||
}; | ||
}; |
Oops, something went wrong.