网址: ${item.url}
+作者: ${item.owner}
+更新时间: ${item.update_time}
+${item.rank || item.account ? '其它:' : ''} ${item.rank === true ? '排行榜' : ''} ${item.account === true ? '网站账号登录' : ''}
`, + })), + }; +}; diff --git a/lib/routes/houmo/booksource.js b/lib/routes/houmo/booksource.js deleted file mode 100644 index 47f8c3a86c..0000000000 --- a/lib/routes/houmo/booksource.js +++ /dev/null @@ -1,51 +0,0 @@ -const got = require('@/utils/got'); - -const url = 'http://qingmo.zohar.space/git/repository.json'; -module.exports = async (ctx) => { - const response = await got({ - method: 'get', - url: url, - }); - - const code = ctx.params.code; - - const list = response.data.list; - - if (!code) { - ctx.state.data = { - title: `BookSource`, - link: url, - description: `厚墨书源索引`, - item: list.map((item) => { - const author = item.name.match(/(.*?)-/g)[0].replace('-', ''); - return { - title: item.name + ` v` + item.version, - description: `暗码: ${item.code}
tg群: @deepinkapp
论坛地址: https://andyt.cn/
`, - link: item.url.replace('real site => ', ''), - author: author, - }; - }), - }; - } else { - const items = []; - list.map((item) => { - const author = item.name.match(/(.*?)-/g)[0].replace('-', ''); - if (item.code === code) { - items.push({ - title: item.name + ` v` + item.version, - description: `tg群: @deepinkapp
论坛地址: https://andyt.cn/
`, - link: item.url.replace('real site => ', ''), - author: author, - }); - } - return 0; - }); - - ctx.state.data = { - title: `${code} - BookSource`, - link: url, - description: `暗码: ${code} - 厚墨书源索引`, - item: items, - }; - } -}; diff --git a/lib/routes/ku/index.js b/lib/routes/ku/index.js new file mode 100644 index 0000000000..ad6863517c --- /dev/null +++ b/lib/routes/ku/index.js @@ -0,0 +1,31 @@ +const got = require('@/utils/got'); + +const nameProps = { + yuedu: '阅读', + yiciyuan: '异次元', + haikuo: '海阔', +}; + +module.exports = async (ctx) => { + const name = ctx.params.name || 'yuedu'; + const api = `http://ku.mumuceo.com/${name}/index/getlist`; + const response = await got.post(api, { + json: { + page: 1, + limit: 10, + }, + }); + const data = response.data.data; + ctx.state.data = { + title: `${nameProps[name]} - 源仓库`, + link: 'http://ku.mumuceo.com/', + description: `源仓库 - ${nameProps[name]} RSS`, + item: data.map((item) => ({ + title: item.yuansite, + link: `http://ku.mumuceo.com/${name}/detail/index/id/${item.id}.html`, + author: item.username, + pubDate: item.time, + description: item.yuan, + })), + }; +}; diff --git a/lib/routes/universities/lit/jwc.js b/lib/routes/universities/lit/jwc.js index be67b23af5..9429535ab4 100644 --- a/lib/routes/universities/lit/jwc.js +++ b/lib/routes/universities/lit/jwc.js @@ -25,6 +25,7 @@ module.exports = async (ctx) => { $('img[src="/system/resource/images/fileTypeImages/icon_xls.gif"]').remove(); $('img[src="/system/resource/images/fileTypeImages/icon_doc.gif"]').remove(); $('img[src="/system/resource/images/fileTypeImages/icon_ppt.gif"]').remove(); + $('img[src="/system/resource/images/fileTypeImages/icon_pdf.gif"]').remove(); const description = $('article.entry-content').html(); const pubDate = $('time').text(); diff --git a/lib/routes/universities/lit/tw.js b/lib/routes/universities/lit/tw.js index 2f9b09f80d..1be9df27b2 100644 --- a/lib/routes/universities/lit/tw.js +++ b/lib/routes/universities/lit/tw.js @@ -29,9 +29,12 @@ module.exports = async (ctx) => { const other = await ctx.cache.tryGet(link, async () => { const result = await got.get(link); const $ = cheerio.load(result.data); + $('img[src="/system/resource/images/fileTypeImages/icon_xls.gif"]').remove(); $('img[src="/system/resource/images/fileTypeImages/icon_doc.gif"]').remove(); $('img[src="/system/resource/images/fileTypeImages/icon_ppt.gif"]').remove(); + $('img[src="/system/resource/images/fileTypeImages/icon_pdf.gif"]').remove(); + const description = $('#textarea').html(); const title = $('article > section > form > h2').text(); return { diff --git a/lib/routes/universities/lit/xwzx.js b/lib/routes/universities/lit/xwzx.js index 7d69d82969..83e87c3a0c 100644 --- a/lib/routes/universities/lit/xwzx.js +++ b/lib/routes/universities/lit/xwzx.js @@ -35,6 +35,11 @@ module.exports = async (ctx) => { $('img[src="/system/resource/images/fileTypeImages/icon_xls.gif"]').remove(); $('img[src="/system/resource/images/fileTypeImages/icon_doc.gif"]').remove(); $('img[src="/system/resource/images/fileTypeImages/icon_ppt.gif"]').remove(); + $('img[src="/system/resource/images/fileTypeImages/icon_pdf.gif"]').remove(); + + $('.nr_text') + .find('hr') + .remove(); const delp = $('.nr_text').find('p'); delp.eq(-1).remove(); delp.eq(-2).remove();