feat: 指数差价合约 每周派息调整 (#4837)

This commit is contained in:
Henry Wang 2020-05-22 09:19:46 +01:00 committed by GitHub
parent 8f91cd763e
commit cf298a9f03
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
15 changed files with 86 additions and 43 deletions

View File

@ -8,24 +8,24 @@ pageClass: routes
### General Subforum - Auto detection
<Route author="junfengP" example="/discuz/http%3a%2f%2fwww.u-share.cn%2fforum.php%3fmod%3dforumdisplay%26fid%3d56" path="/discuz/:link" :paramsDesc="['link of subforum, require url encoded ']"/>
<RouteEn author="junfengP" example="/discuz/http%3a%2f%2fwww.u-share.cn%2fforum.php%3fmod%3dforumdisplay%26fid%3d56" path="/discuz/:link" :paramsDesc="['link of subforum, require url encoded ']"/>
### General Subforum - Manual version
<Route author="junfengP" example="/discuz/x/https%3a%2f%2fwww.52pojie.cn%2fforum-16-1.html" path="/discuz/:ver/:link" :paramsDesc="['discuz versionsee below table','link of subforum, require url encoded']" >
<RouteEn author="junfengP" example="/discuz/x/https%3a%2f%2fwww.52pojie.cn%2fforum-16-1.html" path="/discuz/:ver/:link" :paramsDesc="['discuz versionsee below table','link of subforum, require url encoded']" >
| Discuz X Series | Discuz 7.x Series |
| --------------- | ----------------- |
| x | 7 |
</Route>
</RouteEn>
### General Subforum - Support cookie
<Route author="junfengP" example="/discuz/x/00/https%3a%2f%2fbbs.zdfx.net%2fforum-2-1.html" path="/discuz/:ver/:cid/:link" :paramsDesc="['discuz versionsee below table', 'Cookie idrequire self hosted and set environment parameters, see Deploy - Configuration pages for detail','link of subforum, require url encoded']" >
<RouteEn author="junfengP" example="/discuz/x/00/https%3a%2f%2fbbs.zdfx.net%2fforum-2-1.html" path="/discuz/:ver/:cid/:link" :paramsDesc="['discuz versionsee below table', 'Cookie idrequire self hosted and set environment parameters, see Deploy - Configuration pages for detail','link of subforum, require url encoded']" >
| Discuz X Series | Discuz 7.x Series |
| --------------- | ----------------- |
| x | 7 |
</Route>
</RouteEn>

View File

@ -4,8 +4,14 @@ pageClass: routes
# Finance
## CFD
### Indices Dividend Adjustment (GBP)
<RouteEn author="HenryQW" example="/cfd/div_gbp" path="/cfd/div_gbp" />
## finviz
### US stock news
### US Stock News
<Route author="HenryQW" example="/finviz/news/AAPL" path="/finviz/news/:ticker" :paramsDesc="['The stock ticker']"/>
<RouteEn author="HenryQW" example="/finviz/news/AAPL" path="/finviz/news/:ticker" :paramsDesc="['The stock ticker']"/>

View File

@ -46,7 +46,7 @@ Sorting types, default to `date`:
### Java Game Update
<Route author="TheresaQWQ" example="/minecraft/version" path="/minecraft/version" />
<RouteEn author="TheresaQWQ" example="/minecraft/version" path="/minecraft/version" />
### CurseForge Mod Update

View File

@ -32,27 +32,27 @@ Official RSS: https://eztv.io/ezrss.xml
### Videos
<Route author="Diygod junfengP" example="/javlibrary/videos/bestrated" path="/javlibrary/videos/:vtype" :paramsDesc="['video type']" radar="1" >
<RouteEn author="Diygod junfengP" example="/javlibrary/videos/bestrated" path="/javlibrary/videos/:vtype" :paramsDesc="['video type']" radar="1" >
|New Comments|New Release|New Entries|Most Wanted|Best Rated|
|-----|------|------|-----|------|
|update|newrelease|newentries|mostwanted|bestrated|
</Route>
</RouteEn>
### Stars
<Route author="Diygod junfengP" example="/javlibrary/stars/afisw" path="/javlibrary/stars/:sid" :paramsDesc="['star id, find it from link']" radar="1" />
<RouteEn author="Diygod junfengP" example="/javlibrary/stars/afisw" path="/javlibrary/stars/:sid" :paramsDesc="['star id, find it from link']" radar="1" />
### Users
<Route author="Diygod junfengP" example="/javlibrary/users/mangudai/userposts" path="/javlibrary/users/:uid/:utype" :paramsDesc="['user id','user choice, see table below']" radar="1" >
<RouteEn author="Diygod junfengP" example="/javlibrary/users/mangudai/userposts" path="/javlibrary/users/:uid/:utype" :paramsDesc="['user id','user choice, see table below']" radar="1" >
|User wanted|User watched|User owned|User posts|
|-----|------|------|-----|
|userwanted|userwatched|userowned|userposts|
</Route>
</RouteEn>
### Bestreviews
<Route author="DCJaous" example="/javlibrary/bestreviews" path="/javlibrary/bestreviews" radar="1" />
<RouteEn author="DCJaous" example="/javlibrary/bestreviews" path="/javlibrary/bestreviews" radar="1" />
## Nyaa

View File

@ -51,23 +51,23 @@ Compared to the official one, the RSS feed generated by RSSHub not only has more
### Chinese
<Route author="JamesWDGu" example="/engadget-cn" path="/engadget-cn"/>
<RouteEn author="JamesWDGu" example="/engadget-cn" path="/engadget-cn"/>
### Multi-language
<Route author="JamesWDGu KeiLongW" example="/engadget/chinese" path="/engadget/:lang" :paramsDesc="['Language']">
<RouteEn author="JamesWDGu KeiLongW" example="/engadget/chinese" path="/engadget/:lang" :paramsDesc="['Language']">
| Traditional Chinese | Simplified Chinese | US | Japanese |
| ------------------- | ------------------ | --- | -------- |
| chinese | cn | us | japanese |
</Route>
</RouteEn>
## Google News
### News
<Route author="zoenglinghou" example="/google/news/Headlines/hl=en-US&gl=US&ceid=US:en" path="/google/news/:category/:locale" :paramsDesc="['Category Title', 'locales, could be found behind `?`, including `hl`, `gl`, and `ceid` as parameters']"/>
<RouteEn author="zoenglinghou" example="/google/news/Headlines/hl=en-US&gl=US&ceid=US:en" path="/google/news/:category/:locale" :paramsDesc="['Category Title', 'locales, could be found behind `?`, including `hl`, `gl`, and `ceid` as parameters']"/>
## Grub Street
@ -99,19 +99,19 @@ Provides a better reading experience (full text articles) over the official one.
### Latest
<Route author="xyqfer Cerebrater" example="/matters/latest" path="/matters/latest" radar="1"/>
<RouteEn author="xyqfer Cerebrater" example="/matters/latest" path="/matters/latest" radar="1"/>
### Hot
<Route author="Cerebrater" example="/matters/hot" path="/matters/hot" radar="1"/>
<RouteEn author="Cerebrater" example="/matters/hot" path="/matters/hot" radar="1"/>
### Tags
<Route author="Cerebrater" example="/matters/tags/VGFnOjk3Mg" path="/matters/tags/:tid" :paramsDesc="['Tag id, can be found in the url of the tag page']" radar="1"/>
<RouteEn author="Cerebrater" example="/matters/tags/VGFnOjk3Mg" path="/matters/tags/:tid" :paramsDesc="['Tag id, can be found in the url of the tag page']" radar="1"/>
### Author
<Route author="Cerebrater" example="/matters/author/az" path="/matters/author/:uid" :paramsDesc="['Author id, can be found at author\'s homepage url']" radar="1"/>
<RouteEn author="Cerebrater" example="/matters/author/az" path="/matters/author/:uid" :paramsDesc="['Author id, can be found at author\'s homepage url']" radar="1"/>
## Nautilus

View File

@ -79,7 +79,7 @@ Official Website: [https://www.ssm.gov.mo/apps1/PreventWuhanInfection/en.aspx](h
### HackerOne Hacker Activity
<Route author="imlonghao" example="/hackerone/hacktivity" path="/hackerone/hacktivity" radar="1"/>
<RouteEn author="imlonghao" example="/hackerone/hacktivity" path="/hackerone/hacktivity" radar="1"/>
## Instapaper

View File

@ -30,7 +30,7 @@ pageClass: routes
### Public Albums
<Route author="hoilc" example="/google/album/msFFnAzKmQmWj76EA" path="/google/album/:id" :paramsDesc="['album ID, can be found in URL, for example, `https://photos.app.goo.gl/msFFnAzKmQmWj76EA` to `msFFnAzKmQmWj76EA`']" radar="1" />
<RouteEn author="hoilc" example="/google/album/msFFnAzKmQmWj76EA" path="/google/album/:id" :paramsDesc="['album ID, can be found in URL, for example, `https://photos.app.goo.gl/msFFnAzKmQmWj76EA` to `msFFnAzKmQmWj76EA`']" radar="1" />
## Konachan Anime Wallpapers

View File

@ -157,7 +157,7 @@ Refer to [#minecraft](/en/game.html#minecraft)
### New sponsors
<Route author="DIYgod" example="/rsshub/sponsors" path="/rsshub/sponsors" radar="1"/>
<RouteEn author="DIYgod" example="/rsshub/sponsors" path="/rsshub/sponsors" radar="1"/>
## sketch.com
@ -191,4 +191,4 @@ Refer to [#minecraft](/en/game.html#minecraft)
### Module Update
<Route author="nczitzk" example="/xposed/module/com.ext.star.wars" path="/xposed/module/:mod" :paramsDesc="['module package name']"/>
<RouteEn author="nczitzk" example="/xposed/module/com.ext.star.wars" path="/xposed/module/:mod" :paramsDesc="['module package name']"/>

View File

@ -8,7 +8,7 @@ pageClass: routes
### Search Result
<Route author="fengkx" example="/cve/search/PostgreSQL" path="/cve/search/:keyword" :paramsDesc="['keyword']" />
<RouteEn author="fengkx" example="/cve/search/PostgreSQL" path="/cve/search/:keyword" :paramsDesc="['keyword']" />
## GitHub
@ -130,8 +130,8 @@ Website: https://news.ycombinator.com/
### Hex-Rays News
<Route author="hellodword" example="/hex-rays/news" path="/hex-rays/news">
</Route>
<RouteEn author="hellodword" example="/hex-rays/news" path="/hex-rays/news">
</RouteEn>
## Kaggle
@ -199,7 +199,7 @@ Website: https://news.ycombinator.com/
### issues
<Route author="hellodword" example="/project-zero-issues" path="/project-zero-issues" />
<RouteEn author="hellodword" example="/project-zero-issues" path="/project-zero-issues" />
## Scala

View File

@ -24,7 +24,7 @@ pageClass: routes
### theses
<Route author="yech1990" example="/linkresearcher/category=theses&subject=生物" path="/linkresearcher/theses/:param" :paramsDesc="['key=valueeg. subject=生物']"/>
<RouteEn author="yech1990" example="/linkresearcher/category=theses&subject=生物" path="/linkresearcher/theses/:param" :paramsDesc="['key=valueeg. subject=生物']"/>
| `:param` | example | definition |
| -------- | --------------- | -------------------------------------- |
@ -63,7 +63,7 @@ pageClass: routes
### innovation
<Route author="yech1990" example="/zhishifenzi/innovation/company" path="/zhishifenzi/innovation/:type" :paramsDesc="['typeeg. company']"/>
<RouteEn author="yech1990" example="/zhishifenzi/innovation/company" path="/zhishifenzi/innovation/:type" :paramsDesc="['typeeg. company']"/>
| `:type` | type name |
| ------------- | ------------- |

View File

@ -8,7 +8,7 @@ pageClass: routes
### Topics
<Route author="zoenglinghou" example="/apnews/topics/apf-topnews" path="/apnews/topics/:topic" :paramsDesc="['Topic namecan be found in URL. For example: the topic name of AP Top News [https://apnews.com/apf-topnews](https://apnews.com/apf-topnews) is `apf-topnews`']" radar="1"/>
<RouteEn author="zoenglinghou" example="/apnews/topics/apf-topnews" path="/apnews/topics/:topic" :paramsDesc="['Topic namecan be found in URL. For example: the topic name of AP Top News [https://apnews.com/apf-topnews](https://apnews.com/apf-topnews) is `apf-topnews`']" radar="1"/>
## BBC
@ -30,23 +30,23 @@ Support major channels, refer to [BBC RSS feeds](https://www.bbc.co.uk/news/1062
### Topics
<Route author="zoenglinghou" example="/chinadialogue/topics/cities" path="/chinadialogue/topics/:topic" :paramsDesc="['Topics']">
<RouteEn author="zoenglinghou" example="/chinadialogue/topics/cities" path="/chinadialogue/topics/:topic" :paramsDesc="['Topics']">
| Business | Cities | Climate Change | Conservation | Governance & Law | Health and Food | Natural Disasters | Pollution | Science & Tech | Security | Water |
| -------- | ------ | ------------------------- | ------------ | ------------------ | --------------- | ----------------- | --------- | ---------------- | -------- | ----- |
| business | cities | climate-change-and-energy | conservation | governance-and-law | health-and-food | natural-disasters | pollution | science-and-tech | security | water |
</Route>
</RouteEn>
### Columns
<Route author="zoenglinghou" example="/chinadialogue/article" path="/chinadialogue/:column" :paramsDesc="['栏目分类']">
<RouteEn author="zoenglinghou" example="/chinadialogue/article" path="/chinadialogue/:column" :paramsDesc="['栏目分类']">
| Articles | Blogs | Culture | Reports |
| -------- | ----- | ------- | ------- |
| article | blog | culture | reports |
</Route>
</RouteEn>
## China Times
@ -74,13 +74,13 @@ RTHK offical provides full text RSS, check the offical website for detail inform
This route adds the missing photo and Link element. (Offical RSS doesn't have Link element may cause issue on some RSS client)
<Route author="KeiLongW" example="/rthk-news/hk/international" path="/rthk-news/:lang/:category" :paramsDesc="['LanguageTraditional Chinese`hk`English`en`','Category']">
<RouteEn author="KeiLongW" example="/rthk-news/hk/international" path="/rthk-news/:lang/:category" :paramsDesc="['LanguageTraditional Chinese`hk`English`en`','Category']">
| local | greaterchina | international | finance | sport |
| ---------- | ------------------ | ------------- | ------------ | ---------- |
| Local News | Greater China News | World News | Finance News | Sport News |
</Route>
</RouteEn>
## The Economist
@ -124,7 +124,7 @@ Provides a better reading experience (full text articles) over the official one.
### News
<Route author="KeiLongW" example="/yahoo-news/hk/world" path="/yahoo-news/:region/:category?" :paramsDesc="['Region','Category']">
<RouteEn author="KeiLongW" example="/yahoo-news/hk/world" path="/yahoo-news/:region/:category?" :paramsDesc="['Region','Category']">
`Region`
| Hong Kong | Taiwan | US |
@ -136,4 +136,4 @@ Provides a better reading experience (full text articles) over the official one.
| ------- | ----- | -------- | ------------- | ------ | ------ |
| (Empty) | world | business | entertainment | sports | health |
</Route>
</RouteEn>

View File

@ -28,8 +28,8 @@ pageClass: routes
### College of Electrical and Computer Engineering News
<Route author="gammapi" example="/umass/amherst/ecenews" path="/umass/amherst/ecenews" radar="1"/>
<RouteEn author="gammapi" example="/umass/amherst/ecenews" path="/umass/amherst/ecenews" radar="1"/>
### College of Information & Computer Sciences News
<Route author="gammapi" example="/umass/amherst/csnews" path="/umass/amherst/csnews" radar="1"/>
<RouteEn author="gammapi" example="/umass/amherst/csnews" path="/umass/amherst/csnews" radar="1"/>

View File

@ -4,6 +4,12 @@ pageClass: routes
# 金融
## CFD
### 每周股指派息调整 (GBP)
<Route author="HenryQW" example="/cfd/div_gbp" path="/cfd/div_gbp" />
## finviz
### 美股股票新闻

View File

@ -2738,6 +2738,9 @@ router.get('/grubstreet', require('./routes/grubstreet/index'));
// Aljazeera 半岛网
router.get('/aljazeera/news', require('./routes/aljazeera/news'));
// CFD indices dividend adjustment
router.get('/cfd/gbp_div', require('./routes/cfd/gbp_div'));
// 中国人民银行
router.get('/pbc/goutongjiaoliu', require('./routes/pbc/goutongjiaoliu'));
router.get('/pbc/tradeAnnouncement', require('./routes/pbc/tradeAnnouncement'));

28
lib/routes/cfd/gbp_div.js Normal file
View File

@ -0,0 +1,28 @@
const got = require('@/utils/got');
const cheerio = require('cheerio');
const dateParser = require('@/utils/dateParser');
module.exports = async (ctx) => {
const link = 'https://www.cmcmarkets.com/en-gb/news-and-analysis/upcoming-indices-dividend-drop-points';
const response = await got.get(link);
const $ = cheerio.load(response.data);
const title = $('.news-table-wrapper')[0].prev.prev.children[2].data.replace('*', '');
const pubDate = dateParser($('meta[itemprop="datePublished"]').attr('content'), 'YYYY-MM-DD-HH:mm');
ctx.state.data = {
title: 'Upcoming CFD indices dividend adjustments',
link,
item: [
{
title,
description: $('.news-table-wrapper').html(),
pubDate,
link,
guid: title + pubDate,
},
],
};
};