mirror of
https://github.com/DIYgod/RSSHub.git
synced 2025-12-09 23:00:48 +08:00
@@ -90,6 +90,11 @@ IATA 国际航空运输协会机场代码, 参见[维基百科 国际航空运
|
||||
|
||||
<Route author="fengkx" example="/natgeo/environment/article" path="/natgeo/:cat/:type?" :paramsDesc="['分类', '类型, 例如`https://www.natgeomedia.com/environment/photo/`对应 cat, type 分别为 environment, photo']"/>
|
||||
|
||||
## 活动行
|
||||
|
||||
### 最新活动
|
||||
|
||||
<Route author="kfgamehacker" example="/huodongxing/explore" path="/huodongxing/explore"/>
|
||||
## 马蜂窝
|
||||
|
||||
### 游记
|
||||
|
||||
@@ -1453,6 +1453,9 @@ router.get('/sixthtone/news', require('./routes/sixthtone/news'));
|
||||
// AI研习社
|
||||
router.get('/aiyanxishe/:id/:sort?', require('./routes/aiyanxishe/home'));
|
||||
|
||||
// 活动行
|
||||
router.get('/huodongxing/explore', require('./routes/hdx/explore'));
|
||||
|
||||
// 飞客茶馆优惠信息
|
||||
router.get('/flyertea/preferential', require('./routes/flyertea/preferential'));
|
||||
router.get('/flyertea/creditcard/:bank', require('./routes/flyertea/creditcard'));
|
||||
|
||||
44
lib/routes/hdx/explore.js
Normal file
44
lib/routes/hdx/explore.js
Normal file
@@ -0,0 +1,44 @@
|
||||
const got = require('@/utils/got');
|
||||
const cheerio = require('cheerio');
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const response = await got({
|
||||
method: 'get',
|
||||
url: 'https://www.huodongxing.com/eventlist',
|
||||
});
|
||||
|
||||
const data = response.data;
|
||||
const $ = cheerio.load(data);
|
||||
|
||||
const list = $('div.search-tab-content-item');
|
||||
|
||||
ctx.state.data = {
|
||||
title: '活动行',
|
||||
link: 'https://www.huodongxing.com/eventlist',
|
||||
item:
|
||||
list &&
|
||||
list
|
||||
.map((index, item) => {
|
||||
item = $(item);
|
||||
return {
|
||||
title: item
|
||||
.find('.item-title')
|
||||
.text()
|
||||
.trim(),
|
||||
link: item.find('.item-title').attr('href'),
|
||||
description:
|
||||
item.find('.item-data').text() +
|
||||
' ' +
|
||||
item
|
||||
.find('.item-dress')
|
||||
.text()
|
||||
.trim(),
|
||||
author: item
|
||||
.find('.user-name')
|
||||
.text()
|
||||
.trim(),
|
||||
};
|
||||
})
|
||||
.get(),
|
||||
};
|
||||
};
|
||||
Reference in New Issue
Block a user