diff --git a/assets/radar-rules.js b/assets/radar-rules.js index ba67da2896..45b0d18157 100644 --- a/assets/radar-rules.js +++ b/assets/radar-rules.js @@ -2262,4 +2262,15 @@ }, ], }, + 'buaq.net': { + _name: '不安全资讯', + '.': [ + { + title: '不安全资讯', + docs: 'http://docs.rsshub.app/new-media.html#bu-an-quan', + source: '/', + target: '/buaq', + }, + ], + }, }); diff --git a/docs/new-media.md b/docs/new-media.md index 269d857f8f..31a2a79c96 100644 --- a/docs/new-media.md +++ b/docs/new-media.md @@ -1360,3 +1360,9 @@ QueryString: ### 全文 + +## 不安全 + +### 全文 + + diff --git a/lib/router.js b/lib/router.js index 8aef06e1df..f4a7e8f64a 100644 --- a/lib/router.js +++ b/lib/router.js @@ -3156,4 +3156,25 @@ router.get('/mingjian', require('./routes/mingjian/index')); // hentaimama router.get('/hentaimama/videos', require('./routes/hentaimama/videos')); +// 不安全 +router.get('/buaq', require('./routes/buaq/index')); + +// 快出海 +router.get('/kchuhai', require('./routes/kchuhai/index')); + +// i春秋资讯 +router.get('/ichunqiu', require('./routes/ichunqiu/index')); + +// 冰山博客 +router.get('/bsblog123', require('./routes/bsblog123/index')); +// start +// 纳威安全导航 +router.get('/navisec', require('./routes/navisec/index')); + +// 安全师 +router.get('/secshi', require('./routes/secshi/index')); + +// 出海笔记 +router.get('/chuhaibiji', require('./routes/chuhaibiji/index')); + module.exports = router; diff --git a/lib/routes/bsblog123/index.js b/lib/routes/bsblog123/index.js new file mode 100644 index 0000000000..e1aa98fe9d --- /dev/null +++ b/lib/routes/bsblog123/index.js @@ -0,0 +1,29 @@ +const got = require('@/utils/got'); +const cheerio = require('cheerio'); + +module.exports = async (ctx) => { + const baseUrl = 'https://bsblog123.com/'; + const response = await got({ + method: 'get', + url: baseUrl, + }); + const $ = cheerio.load(response.data); // 使用 cheerio 加载返回的 HTML + const list = $('div[class="whitebg bloglist"] li'); + ctx.state.data = { + title: `冰山博客 ~ 资讯`, + link: `https://bsblog123.com`, + description: '冰山博客 ~ 资讯', + item: + list && + list + .map((index, item) => { + item = $(item); + return { + title: $('h3.blogtitle', item).text(), + link: $('h3 a', item).attr('href'), + description: $('p', item).text(), + }; + }) + .get(), + }; +}; diff --git a/lib/routes/buaq/index.js b/lib/routes/buaq/index.js new file mode 100644 index 0000000000..b8371352c3 --- /dev/null +++ b/lib/routes/buaq/index.js @@ -0,0 +1,31 @@ +const got = require('@/utils/got'); +const cheerio = require('cheerio'); + +module.exports = async (ctx) => { + const baseUrl = 'https://buaq.net'; + + const response = await got({ + method: 'get', + url: baseUrl, + }); + const $ = cheerio.load(response.data); // 使用 cheerio 加载返回的 HTML + const list = $('tr[class]'); + + ctx.state.data = { + title: `不安全文章 ~ 资讯`, + link: `https://buaq.net/`, + description: '不安全文章 ~ 资讯', + item: + list && + list + .map((index, item) => { + item = $(item); + return { + title: $('font[size="4"]', item).children('a').text(), + pubDate: new Date($('font[size="1"]', item).children().first().text()).toUTCString(), + link: baseUrl + $('font[size="4"]', item).children('a').attr('href'), + }; + }) + .get(), + }; +}; diff --git a/lib/routes/chuhaibiji/index.js b/lib/routes/chuhaibiji/index.js new file mode 100644 index 0000000000..2ff03882a8 --- /dev/null +++ b/lib/routes/chuhaibiji/index.js @@ -0,0 +1,30 @@ +const got = require('@/utils/got'); +const cheerio = require('cheerio'); + +module.exports = async (ctx) => { + const baseUrl = 'https://www.chuhaibiji.com/'; + const response = await got({ + method: 'get', + url: baseUrl, + }); + const $ = cheerio.load(response.data); // 使用 cheerio 加载返回的 HTML + const list = $('ul[class="post-loop post-loop-default tab-wrap clearfix active"] li[class="item"]'); + ctx.state.data = { + title: `出海笔记 ~ 资讯`, + link: `https://www.secshi.com/`, + description: '出海笔记 ~ 资讯', + item: + list && + list + .map((index, item) => { + item = $(item); + return { + title: $('h2 a', item).text(), + link: $('h2 a', item).attr('href'), + description: $('p', item).text(), + pubDate: new Date($('span[class="item-meta-li date"]', item).text()).toUTCString(), + }; + }) + .get(), + }; +}; diff --git a/lib/routes/ichunqiu/index.js b/lib/routes/ichunqiu/index.js new file mode 100644 index 0000000000..694efa51db --- /dev/null +++ b/lib/routes/ichunqiu/index.js @@ -0,0 +1,30 @@ +const got = require('@/utils/got'); +const cheerio = require('cheerio'); + +module.exports = async (ctx) => { + const baseUrl = 'https://bbs.ichunqiu.com/portal.php'; + const baseSite = 'https://bbs.ichunqiu.com/'; + const response = await got({ + method: 'get', + url: baseUrl, + }); + const $ = cheerio.load(response.data); // 使用 cheerio 加载返回的 HTML + const list = $('li[class="ui_2_ul_li cl border_b_gray"]'); + ctx.state.data = { + title: `i春秋学院 ~ 资讯`, + link: `https://buaq.net/`, + description: 'i春秋学院 ~ 资讯', + item: + list && + list + .map((index, item) => { + item = $(item); + return { + title: $('h3', item).text(), + link: baseSite + $('h3 a', item).attr('href'), + description: $('p', item).text(), + }; + }) + .get(), + }; +}; diff --git a/lib/routes/kchuhai/index.js b/lib/routes/kchuhai/index.js new file mode 100644 index 0000000000..b2fbf2d060 --- /dev/null +++ b/lib/routes/kchuhai/index.js @@ -0,0 +1,29 @@ +const cheerio = require('cheerio'); +const got = require('@/utils/got'); + +module.exports = async (ctx) => { + const url = `https://www.kchuhai.com/report/`; + + const response = await got({ + method: 'get', + url: url, + }); + const $ = cheerio.load(response.data); // 使用 cheerio 加载返回的 HTML + const list = $('div[class="position-relative"]'); + ctx.state.data = { + title: `出海 ~ 资讯`, + link: `www.kchuhai.com`, + description: '出海 ~ 资讯', + item: + list && + list + .map((index, item) => { + item = $(item); + return { + title: $('div', item).children('a').text(), + link: $('div', item).children('a').attr('href'), + }; + }) + .get(), + }; +}; diff --git a/lib/routes/navisec/index.js b/lib/routes/navisec/index.js new file mode 100644 index 0000000000..3bd0c3ede2 --- /dev/null +++ b/lib/routes/navisec/index.js @@ -0,0 +1,29 @@ +const got = require('@/utils/got'); +const cheerio = require('cheerio'); + +module.exports = async (ctx) => { + const baseUrl = 'https://bowen.navisec.it/'; + const response = await got({ + method: 'get', + url: baseUrl, + }); + const $ = cheerio.load(response.data); // 使用 cheerio 加载返回的 HTML + const list = $('tbody tr'); + ctx.state.data = { + title: `纳威安全导航 ~ 资讯`, + link: `https://bowen.navisec.it/`, + description: '纳威安全导航 ~ 资讯', + item: + list && + list + .map((index, item) => { + item = $(item); + return { + title: $('a', item).text(), + link: $('a', item).attr('href'), + pubDate: new Date($('td', item).last().text()).toUTCString(), + }; + }) + .get(), + }; +}; diff --git a/lib/routes/secshi/index.js b/lib/routes/secshi/index.js new file mode 100644 index 0000000000..c7b21e3620 --- /dev/null +++ b/lib/routes/secshi/index.js @@ -0,0 +1,29 @@ +const got = require('@/utils/got'); +const cheerio = require('cheerio'); + +module.exports = async (ctx) => { + const baseUrl = 'https://www.secshi.com/'; + const response = await got({ + method: 'get', + url: baseUrl, + }); + const $ = cheerio.load(response.data); // 使用 cheerio 加载返回的 HTML + const list = $('ul[class="b2_gap"] li[class="post-3-li post-list-item"]'); + ctx.state.data = { + title: `安全师 ~ 资讯`, + link: `https://www.secshi.com/`, + description: '安全师 ~ 资讯', + item: + list && + list + .map((index, item) => { + item = $(item); + return { + title: $('h2', item).text(), + link: $('h2 a', item).attr('href'), + description: $('div[class="post-excerpt"]', item).text(), + }; + }) + .get(), + }; +};