diff --git a/docs/new-media.md b/docs/new-media.md index d509a4f9d..28629a097 100644 --- a/docs/new-media.md +++ b/docs/new-media.md @@ -701,6 +701,12 @@ area 分区选项 +## 高科技行业门户 + +### 新闻 + + + ## 谷歌新闻 ### 新闻 diff --git a/docs/other.md b/docs/other.md index 3f8422757..2f1de25e7 100644 --- a/docs/other.md +++ b/docs/other.md @@ -800,6 +800,25 @@ type 为 all 时,category 参数不支持 cost 和 free +## 中国工程科技知识中心 + +### 知识应用 + + + +所属类别 + +| 专题知识服务 | 知识分析 | 知识工具 | 综合性知识服务 | 全部类别 | +| ------------ | -------- | -------- | -------------- | -------- | +| 2 | 3 | 4 | 1 | 0 | + +领域 + +| 综合 | 农业 | 航天 | 地质 | 信息技术 | 林业 | 医药卫生 | 战略性新兴产业 | 能源 | 冶金 | 化工 | 地理信息 | 营养健康 | 工程科教图书 | 交通 | 创新设计 | 地理资源与生态 | 材料 | 气象 | 渔业 | 环境工程 | 试验技术 | 中草药 | 水利 | 海洋工程 | +| ---- | ---- | ---- | ---- | -------- | ---- | -------- | -------------- | ---- | ---- | ---- | -------- | -------- | ------------ | ---- | -------- | -------------- | ---- | ---- | ---- | -------- | -------- | ------ | ---- | -------- | + + + ## 中国银行 ### 中国银行外汇牌价 diff --git a/docs/picture.md b/docs/picture.md index 0352fd8ed..193edec98 100644 --- a/docs/picture.md +++ b/docs/picture.md @@ -117,6 +117,31 @@ pageClass: routes +## MM 范 + +### 分类 + + + +| 最新 | 热门 | 校花 | 森系 | 清纯 | 童颜 | 嫩模 | 少女 | +| ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | + + + +### 标签 + + + +### 集合 + + + +| 清纯唯美 | 摄影私房 | 明星写真 | 三次元 | 异域美景 | 性感妖姬 | 游戏主题 | 美女壁纸 | +| -------- | -------- | -------- | ------ | -------- | -------- | -------- | -------- | +| 1 | 2 | 4 | 5 | 6 | 7 | 9 | 11 | + + + ## NASA 每日天文图片 ### NASA diff --git a/docs/traditional-media.md b/docs/traditional-media.md index e914ff81b..88971d963 100644 --- a/docs/traditional-media.md +++ b/docs/traditional-media.md @@ -279,6 +279,21 @@ Type 栏目: +### 作者 + + + +### 个人订阅追踪动态 + + + +::: warning 注意 + +需要自建,详情见部署页面的配置模块。 + +::: + + ## 多维新闻网 ### 要闻 diff --git a/docs/university.md b/docs/university.md index c5623d634..265cc69f8 100644 --- a/docs/university.md +++ b/docs/university.md @@ -1924,6 +1924,16 @@ type 列表: ## 中国科学院 +### 成果转化 + + + +| 工作动态 | 科技成果转移转化亮点工作 | +| -------- | ------------------------ | +| zh | cgzhld | + + + ### 上海微系统与信息技术研究所学术活动 @@ -1932,6 +1942,10 @@ type 列表: +### 中国科学院电工研究所 科研动态 + + + ## 中国农业大学 ### 中国农业大学研招网通知公告 diff --git a/lib/router.js b/lib/router.js index fc153bf13..e4d5e45f4 100644 --- a/lib/router.js +++ b/lib/router.js @@ -666,6 +666,8 @@ router.get('/gdut/news', require('./routes/universities/gdut/news')); // 中国科学院 router.get('/cas/sim/academic', require('./routes/universities/cas/sim/academic')); router.get('/cas/mesalab/kb', require('./routes/universities/cas/mesalab/kb')); +router.get('/cas/iee/kydt', require('./routes/universities/cas/iee/kydt')); +router.get('/cas/cg/:caty?', require('./routes/universities/cas/cg/index')); // 中国传媒大学 router.get('/cuc/yz', require('./routes/universities/cuc/yz')); @@ -3255,6 +3257,14 @@ router.get('/appsales/:caty?/:time?', require('./routes/appsales/index')); // CGTN router.get('/cgtn/top', require('./routes/cgtn/top')); +// MM范 +router.get('/95mm/tab/:tab?', require('./routes/95mm/tab')); +router.get('/95mm/tag/:tag', require('./routes/95mm/tag')); +router.get('/95mm/category/:category', require('./routes/95mm/category')); + +// 中国工程科技知识中心 +router.get('/cktest/app/:ctgroup?/:domain?', require('./routes/cktest/app')); + // 妈咪帮 router.get('/mamibuy/:caty?/:age?/:sort?', require('./routes/mamibuy/index')); @@ -3292,6 +3302,9 @@ router.get('/gamer/gnn/:category?', require('./routes/gamer/gnn_index')); // 中国人大网 router.get('/npc/:caty', require('./routes/npc/index')); +// 高科技行业门户 +router.get('/ofweek/news', require('./routes/ofweek/news')); + // eventernote router.get('/eventernote/actors/:name/:id', require('./routes/eventernote/actors')); diff --git a/lib/routes/95mm/category.js b/lib/routes/95mm/category.js new file mode 100644 index 000000000..cf164d180 --- /dev/null +++ b/lib/routes/95mm/category.js @@ -0,0 +1,18 @@ +const utils = require('./utils'); + +module.exports = async (ctx) => { + const categories = { + 1: '清纯唯美', + 2: '摄影私房', + 4: '明星写真', + 5: '三次元', + 6: '异域美景', + 7: '性感妖姬', + 9: '游戏主题', + 11: '美女壁纸', + }; + + const rootUrl = `https://www.95mm.net/category-${ctx.params.category}/list-1/index.html?page=1`; + + ctx.state.data = await utils(ctx, categories[ctx.params.category], rootUrl); +}; diff --git a/lib/routes/95mm/tab.js b/lib/routes/95mm/tab.js new file mode 100644 index 000000000..619de6dbd --- /dev/null +++ b/lib/routes/95mm/tab.js @@ -0,0 +1,9 @@ +const utils = require('./utils'); + +module.exports = async (ctx) => { + ctx.params.tab = ctx.params.tab || '最新'; + + const rootUrl = `https://www.95mm.net/home-ajax/index.html?tabcid=${ctx.params.tab}&page=1`; + + ctx.state.data = await utils(ctx, ctx.params.tab, rootUrl); +}; diff --git a/lib/routes/95mm/tag.js b/lib/routes/95mm/tag.js new file mode 100644 index 000000000..0176aaac7 --- /dev/null +++ b/lib/routes/95mm/tag.js @@ -0,0 +1,7 @@ +const utils = require('./utils'); + +module.exports = async (ctx) => { + const rootUrl = `https://www.95mm.net/tag-${ctx.params.tag}/page-1/index.html`; + + ctx.state.data = await utils(ctx, ctx.params.tag, rootUrl); +}; diff --git a/lib/routes/95mm/utils.js b/lib/routes/95mm/utils.js new file mode 100644 index 000000000..f5a8786d4 --- /dev/null +++ b/lib/routes/95mm/utils.js @@ -0,0 +1,52 @@ +const got = require('@/utils/got'); +const cheerio = require('cheerio'); + +module.exports = async (ctx, title, rootUrl) => { + const response = await got({ + method: 'get', + url: rootUrl, + header: { + Referer: 'https://www.95mm.net', + }, + }); + + const $ = cheerio.load(response.data); + + const list = $('div.list-body') + .map((_, item) => { + item = $(item); + const a = item.find('a'); + return { + title: a.text(), + link: a.attr('href'), + }; + }) + .get(); + + const items = await Promise.all( + list.map( + async (item) => + await ctx.cache.tryGet(item.link, async () => { + const detailResponse = await got({ + method: 'get', + url: item.link, + }); + const images = detailResponse.data.match(/src": '(.*?)',"width/g); + + item.description = ''; + + for (const i of images) { + item.description += ``; + } + + return item; + }) + ) + ); + + return { + title: `${title} - MM范`, + link: rootUrl, + item: items, + }; +}; diff --git a/lib/routes/cktest/app.js b/lib/routes/cktest/app.js new file mode 100644 index 000000000..426763259 --- /dev/null +++ b/lib/routes/cktest/app.js @@ -0,0 +1,34 @@ +const got = require('@/utils/got'); +const cheerio = require('cheerio'); + +module.exports = async (ctx) => { + const ctgroup = ctx.params.ctgroup ? (ctx.params.ctgroup === '0' ? '' : 'CTGRGUP==' + ctx.params.ctgroup) : ''; + const domain = ctx.params.domain ? 'DOMAIN==' + ctx.params.domain : ''; + + const rootUrl = `http://www.ckcest.cn/home/app/list?category=${ctgroup}${ctgroup && domain ? ' AND ' : ''}${domain}`; + const response = await got({ + method: 'get', + url: rootUrl, + }); + + const $ = cheerio.load(response.data); + const items = $('.search-result-list') + .map((_, item) => { + item = $(item); + const a = item.find('h4.sc-title a'); + return { + title: a.text(), + link: a.attr('href'), + description: item.find('.applySummary-new').text(), + author: item.find('.applyInfor-new span').eq(1).text(), + pubDate: new Date(item.find('.applyInfor-new span').eq(0).text() + ' GMT+8').toUTCString(), + }; + }) + .get(); + + ctx.state.data = { + title: '知识应用 - 中国工程科技知识中心', + link: rootUrl, + item: items, + }; +}; diff --git a/lib/routes/ff14/ff14_zh.js b/lib/routes/ff14/ff14_zh.js index 8170ff025..0a3dd45a4 100644 --- a/lib/routes/ff14/ff14_zh.js +++ b/lib/routes/ff14/ff14_zh.js @@ -14,7 +14,7 @@ module.exports = async (ctx) => { const response = await got({ method: 'get', - url: `http://api.act.sdo.com/UnionNews/List?gameCode=ma&category=${type_number[type]}&pageIndex=0&pageSize=50`, + url: `http://api.act.sdo.com/UnionNews/List?gameCode=ff&category=${type_number[type]}&pageIndex=0&pageSize=50`, headers: { Referer: referer, }, diff --git a/lib/routes/initium/full.js b/lib/routes/initium/full.js index b84f0ccb7..12414f908 100644 --- a/lib/routes/initium/full.js +++ b/lib/routes/initium/full.js @@ -4,23 +4,21 @@ const cheerio = require('cheerio'); const resolve_url = require('url').resolve; module.exports = async (ctx) => { - // model是channel/tag/etc.,而type是latest/feature/quest-academy/etc. + // model是channel/tag/etc.,而type是latest/feature/quest-academy这些一级栏目/标签/作者名的slug名。如果是追踪的话,那就是model是follow,type是articles。 const model = ctx.params.model || 'channel'; const type = ctx.params.type || 'latest'; const language = ctx.params.language || 'zh-hans'; let listurl; let listlink; switch (model) { - /* case 'author': listurl = `https://api.theinitium.com/api/v2/author/?language=${language}&slug=${type}`; listlink = `https://theinitium.com/author/${type}/`; break; - case 'follows': - listurl = `https://api.theinitium.com/api/v2/user/follows/?language=${language}&slug=${type}`; + case 'follow': + listurl = `https://api.theinitium.com/api/v2/user/follows/${type}/?language=${language}`; listlink = `https://theinitium.com/follow/`; break; - */ case 'channel': listurl = `https://api.theinitium.com/api/v2/channel/articles/?language=${language}&slug=${type}`; listlink = `https://theinitium.com/channel/${type}/`; @@ -90,9 +88,11 @@ module.exports = async (ctx) => { }, }); - const name = response.data.name; - const articles = response.data.digests; - const image = 'https://d32kak7w9u5ewj.cloudfront.net/static/bundles/0b9cf7fe9c518887768e6c485764cd12.ico'; + const name = response.data.name || (response.data[model] && response.data[model].name) || '追踪'; + // 从v1直升的channel和tags里面是digests,v2新增的author和follow出来都是results + const articles = response.data.results ? response.data.results : response.data.digests; + // 如果model=author,那就是avatar;否则都是cover,要么就没封面 + const image = response.data[model] && (response.data[model].cover || response.data[model].avatar); const getFullText = async (slug) => { let content = await ctx.cache.get(slug + language); @@ -125,6 +125,18 @@ module.exports = async (ctx) => { } if (data.content) { content += data.content.replace('