parent
c597754f75
commit
31a62d2a7d
|
|
@ -1610,3 +1610,11 @@ IATA 国际航空运输协会机场代码, 参见[维基百科 国际航空运
|
|||
> 少数派专栏需要付费订阅, RSS 仅做更新提醒, 不含付费内容.
|
||||
|
||||
</route>
|
||||
|
||||
### 电影首发站
|
||||
|
||||
<route name="电影首发站" author="epirus" example="/dysfz/index" path="/dysfz/index">
|
||||
|
||||
> 高清电影,百度网盘跟迅雷下载
|
||||
|
||||
</route>
|
||||
|
|
|
|||
|
|
@ -566,4 +566,7 @@ router.get('/embassy/:country/:city?', require('./routes/embassy/index'));
|
|||
// 澎湃新闻
|
||||
router.get('/thepaper/featured', require('./routes/thepaper/featured'));
|
||||
|
||||
// 电影首发站
|
||||
router.get('/dysfz/index', require('./routes/dysfz/index'));
|
||||
|
||||
module.exports = router;
|
||||
|
|
|
|||
|
|
@ -0,0 +1,33 @@
|
|||
const axios = require('../../utils/axios');
|
||||
const cheerio = require('cheerio');
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const response = await axios.get('http://www.dysfz.cc');
|
||||
const $ = cheerio.load(response.data);
|
||||
const list = $('.movie-list li')
|
||||
.get()
|
||||
.slice(2);
|
||||
const data = {
|
||||
title: '电影首发站',
|
||||
link: 'http://www.dysfz.cc',
|
||||
description: '高清电影',
|
||||
item: list.map((item) => ({
|
||||
title: $(item)
|
||||
.find('a')
|
||||
.text(),
|
||||
description: $(item)
|
||||
.find('.txt')
|
||||
.text(),
|
||||
pubDate: new Date(
|
||||
$(item)
|
||||
.find('.txt p>span:nth-child(1)')
|
||||
.text()
|
||||
).toUTCString(),
|
||||
link: $(item)
|
||||
.find('h2 a')
|
||||
.attr('href'),
|
||||
})),
|
||||
};
|
||||
|
||||
ctx.state.data = data;
|
||||
};
|
||||
Loading…
Reference in New Issue