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.
Merge pull request #574 from DIYgod/master
[pull] master from diygod:master
- Loading branch information
Showing
13 changed files
with
233 additions
and
12 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
module.exports = { | ||
'/zw/projectList': ['TonyRL'], | ||
}; |
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,49 @@ | ||
const got = require('@/utils/got'); | ||
const cheerio = require('cheerio'); | ||
const { parseDate } = require('@/utils/parse-date'); | ||
const timezone = require('@/utils/timezone'); | ||
const { art } = require('@/utils/render'); | ||
const path = require('path'); | ||
|
||
module.exports = async (ctx) => { | ||
const url = 'https://zw.cdzjryb.com/lottery/accept/projectList'; | ||
const { data: response } = await got(url); | ||
const $ = cheerio.load(response); | ||
|
||
const list = $('#_projectInfo tr') | ||
.toArray() | ||
.map((item) => | ||
$(item) | ||
.find('td') | ||
.toArray() | ||
.map((td) => $(td).text().trim()) | ||
); | ||
|
||
const items = await Promise.all( | ||
list.map((item) => | ||
ctx.cache.tryGet(`cdzjryb:zw:projectList${item[0]}`, async () => { | ||
const { data: notice } = await got.post('https://zw.cdzjryb.com/lottery/accept/getProjectRule', { | ||
form: { | ||
projectUuid: item[0], | ||
}, | ||
}); | ||
return { | ||
title: item[3], | ||
description: art(path.join(__dirname, 'templates/projectList.art'), { | ||
item, | ||
notice: notice.message, | ||
}), | ||
link: url, | ||
guid: `cdzjryb:zw:projectList:${item[0]}`, | ||
pubDate: timezone(parseDate(item[8]), 8), | ||
}; | ||
}) | ||
) | ||
); | ||
|
||
ctx.state.data = { | ||
title: $('head title').text(), | ||
link: url, | ||
item: items, | ||
}; | ||
}; |
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,13 @@ | ||
module.exports = { | ||
'cdzjryb.com': { | ||
_name: '成都住建蓉 e 办', | ||
zw: [ | ||
{ | ||
title: '商品住房购房登记', | ||
docs: 'https://docs.rsshub.app/other.html#cheng-dou-zhu-jian-rong-e-ban', | ||
source: ['/lottery/accept/projectList', '/'], | ||
target: '/cdzjryb/zw/projectList', | ||
}, | ||
], | ||
}, | ||
}; |
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,3 @@ | ||
module.exports = (router) => { | ||
router.get('/zw/projectList', require('./projectList')); | ||
}; |
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,23 @@ | ||
<table> | ||
<tr> | ||
<th>区域</th> | ||
<th>项目名称</th> | ||
<th>预售证号</th> | ||
<th>预售范围</th> | ||
<th>住房套数</th> | ||
<th>开发商咨询电话</th> | ||
<th>登记开始时间</th> | ||
<th>登记结束时间</th> | ||
<th>名单外人员资格已释放时间</th> | ||
<th>名单内人员资格已释放时间</th> | ||
<th>预审码取得截止时间</th> | ||
<th>项目报名状态</th> | ||
</tr> | ||
<tr> | ||
<% for(let i = 2; i < item.length - 1; i++){ %> | ||
<td><%= item[i] %></td> | ||
<% } %> | ||
</tr> | ||
</table> | ||
<h2 style="text-align: center;">登记规则</h2> | ||
{{@ notice }} |
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,39 @@ | ||
const util = require('./utils'); | ||
const baseUrl = 'https://lib.nua.edu.cn'; | ||
|
||
module.exports = async (ctx) => { | ||
const type = ctx.params.type; | ||
let webPageName; | ||
|
||
switch (type) { | ||
case 'xwdt': | ||
webPageName = '.wp_column.column-1.selected'; | ||
break; | ||
case 'djdt': | ||
webPageName = '.wp_column.column-2.selected'; | ||
break; | ||
case 'zydt': | ||
webPageName = '.wp_column.column-3.selected'; | ||
break; | ||
case 'fwdt': | ||
webPageName = '.wp_column.column-4.selected'; | ||
break; | ||
default: | ||
throw Error(`暂不支持对${type}的订阅`); | ||
} | ||
|
||
const newsUrl = `${baseUrl}/${type}/list.htm`; | ||
const listName = 'div.news_con'; | ||
const artiContent = '.wp_articlecontent'; | ||
const listDate = '.news_date'; | ||
|
||
const items = await util.ProcessList(newsUrl, baseUrl, listName, listDate, webPageName); | ||
const results = await util.ProcessFeed(items[0], artiContent, ctx); | ||
|
||
ctx.state.data = { | ||
title: 'NUA-图书馆-' + items[1], | ||
link: `${baseUrl}/${type}/list.htm`, | ||
description: '南京艺术学院 图书馆 ' + items[1], | ||
item: results, | ||
}; | ||
}; |
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
361b074
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
rsshub-master – ./
rsshub-master.vercel.app
rsshub-master-git-master-auto-bot-ty.vercel.app
rsshub-master-auto-bot-ty.vercel.app