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.
* Add tingshuitz in Hanghou, Xiaoshan, Dalian area * 更新 停水通知 文档 * 更正文档链接错误处 * Remove package-lock.json * Change .gitignore
- Loading branch information
Showing
7 changed files
with
157 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,7 @@ node_modules | |
npm-debug.log | ||
error.log | ||
combined.log | ||
package-lock.json | ||
.vscode | ||
docs/.vuepress/dist | ||
|
||
|
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 |
---|---|---|
|
@@ -157,6 +157,10 @@ RSSHub 是一个轻量、易于扩展的 RSS 生成器,可以给任何奇奇 | |
- 教务信息 | ||
- 新京报 | ||
- 快讯 | ||
- 停水通知 | ||
- 杭州市 | ||
- 萧山区 | ||
- 大连市 | ||
|
||
## 鸣谢 | ||
|
||
|
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,38 @@ | ||
const axios = require('../../utils/axios'); | ||
const cheerio = require('cheerio'); | ||
const config = require('../../config'); | ||
|
||
module.exports = async (ctx) => { | ||
//const area = ctx.params.area; | ||
const url = `http://www.swj.dl.gov.cn/html/tstz/`; | ||
const response = await axios({ | ||
method: 'get', | ||
url: url, | ||
headers: { | ||
'User-Agent': config.ua, | ||
}, | ||
}); | ||
|
||
const data = response.data; | ||
const $ = cheerio.load(data); | ||
const list = $('.listBox li'); | ||
|
||
ctx.state.data = { | ||
title: $('title').text() || '停水通知 - 大连市水务局', | ||
link: `http://www.swj.dl.gov.cn/html/tstz/`, | ||
description: $('meta[name="description"]').attr('content') || $('title').text() || '停水通知 - 大连市水务局', | ||
item: | ||
list && | ||
list | ||
.map((index, item) => { | ||
item = $(item); | ||
return { | ||
title: item.find('a').text(), | ||
description: `大连市停水通知:${item.find('a').text()}`, | ||
pubDate: new Date(item.find('span').text()).toUTCString(), | ||
link: `${item.find('a').attr('href')}`, | ||
}; | ||
}) | ||
.get(), | ||
}; | ||
}; |
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,38 @@ | ||
const axios = require('../../utils/axios'); | ||
const cheerio = require('cheerio'); | ||
const config = require('../../config'); | ||
|
||
module.exports = async (ctx) => { | ||
//const area = ctx.params.area; | ||
const url = `http://www.hzwgc.com/public/stop_the_water/`; | ||
const response = await axios({ | ||
method: 'get', | ||
url: url, | ||
headers: { | ||
'User-Agent': config.ua, | ||
}, | ||
}); | ||
|
||
const data = response.data; | ||
const $ = cheerio.load(data); | ||
const list = $('.datalist li'); | ||
|
||
ctx.state.data = { | ||
title: $('title').text(), | ||
link: `http://www.hzwgc.com/public/stop_the_water/`, | ||
description: $('meta[name="description"]').attr('content') || $('title').text(), | ||
item: | ||
list && | ||
list | ||
.map((index, item) => { | ||
item = $(item); | ||
return { | ||
title: item.find('.title').text(), | ||
description: `杭州市停水通知:${item.find('.title').text()}`, | ||
pubDate: new Date(item.find('.published').text()).toUTCString(), | ||
link: `http://www.hzwgc.com${item.find('.btn-read').attr('href')}`, | ||
}; | ||
}) | ||
.get(), | ||
}; | ||
}; |
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,43 @@ | ||
const axios = require('../../utils/axios'); | ||
const cheerio = require('cheerio'); | ||
const config = require('../../config'); | ||
|
||
module.exports = async (ctx) => { | ||
//const area = ctx.params.area; | ||
const url = 'http://www.xswater.com/gongshui/channels/227.html'; | ||
const response = await axios({ | ||
method: 'get', | ||
url: url, | ||
headers: { | ||
'User-Agent': config.ua, | ||
}, | ||
}); | ||
|
||
const data = response.data; | ||
const $ = cheerio.load(data); | ||
const list = $('.ul-list li'); | ||
|
||
ctx.state.data = { | ||
title: $('title').text(), | ||
link: `http://www.xswater.com/gongshui/channels/227.html`, | ||
description: $('meta[name="description"]').attr('content') || $('title').text(), | ||
item: | ||
list && | ||
list | ||
.map((index, item) => { | ||
item = $(item); | ||
return { | ||
title: item.find('a').text(), | ||
description: `萧山区停水通知:${item.find('a').text()}`, | ||
pubDate: new Date( | ||
item | ||
.find('span') | ||
.text() | ||
.slice(1, 11) | ||
).toUTCString(), | ||
link: `http://www.xswater.com${item.find('a').attr('href')}`, | ||
}; | ||
}) | ||
.get(), | ||
}; | ||
}; |