From eddba23099a5de0e43cb6eee41792a01f1239999 Mon Sep 17 00:00:00 2001 From: sabuaka18 <68864526+sabuaka18@users.noreply.github.com> Date: Tue, 28 Jul 2020 10:59:30 -0400 Subject: [PATCH] feat: javbus routes: `director` `label` `studio` (#5271) Co-authored-by: zrenca <42361841+zrenca@users.noreply.github.com> --- assets/radar-rules.js | 38 ++++++++++++------------- docs/en/program-update.md | 2 +- docs/new-media.md | 8 +++--- docs/program-update.md | 2 +- docs/university.md | 6 ---- lib/router.js | 10 +++---- lib/routes/12379/index.js | 2 +- lib/routes/acfun/bangumi.js | 35 ++++++++++++++++------- lib/routes/anitama/channel.js | 3 +- lib/routes/aptonic/action.js | 34 +++++++++-------------- lib/routes/bilibili/user_bangumi.js | 2 +- lib/routes/bjp/apod.js | 8 ++++-- lib/routes/github/search.js | 5 ++-- lib/routes/hanime/video.js | 7 ++--- lib/routes/ikea/uk/new.js | 2 +- lib/routes/ithome/ranking.js | 43 ++++++++++++----------------- lib/routes/javbus/director.js | 7 +++++ lib/routes/javbus/label.js | 7 +++++ lib/routes/javbus/studio.js | 7 +++++ lib/routes/pocket/trending.js | 15 ++++------ lib/routes/transferwise/pair.js | 13 ++++----- lib/routes/universities/jlu/oa.js | 31 --------------------- lib/routes/xiaohongshu/user.js | 2 +- lib/utils/date.js | 3 -- package.json | 4 +-- yarn.lock | 16 +++++------ 26 files changed, 139 insertions(+), 173 deletions(-) create mode 100644 lib/routes/javbus/director.js create mode 100644 lib/routes/javbus/label.js create mode 100644 lib/routes/javbus/studio.js delete mode 100644 lib/routes/universities/jlu/oa.js diff --git a/assets/radar-rules.js b/assets/radar-rules.js index b7e92ec48..19eb612f8 100644 --- a/assets/radar-rules.js +++ b/assets/radar-rules.js @@ -908,26 +908,6 @@ 'ithome.com': { _name: 'IT 之家', - '.': [ - { - title: '24 小时阅读榜', - docs: 'https://docs.rsshub.app/new-media.html#it-zhi-jia', - source: ['', '/*'], - target: '/ithome/ranking/24h', - }, - { - title: '7 天最热', - docs: 'https://docs.rsshub.app/new-media.html#it-zhi-jia', - source: ['', '/*'], - target: '/ithome/ranking/7days', - }, - { - title: '月榜', - docs: 'https://docs.rsshub.app/new-media.html#it-zhi-jia', - source: ['', '/*'], - target: '/ithome/ranking/monthly', - }, - ], it: [ { title: 'IT 资讯', @@ -1849,6 +1829,24 @@ source: '/uncensored/series/:seriesid', target: '/javbus/uncensored/series/:seriesid', }, + { + title: 'director', + docs: 'https://docs.rsshub.app/multimedia.html#javbus', + source: '/director/:directorid', + target: '/javbus/director/:directorid', + }, + { + title: 'label', + docs: 'https://docs.rsshub.app/multimedia.html#javbus', + source: '/label/:labelid', + target: '/javbus/label/:labelid', + }, + { + title: 'studio', + docs: 'https://docs.rsshub.app/multimedia.html#javbus', + source: '/studio/:studioid', + target: '/javbus/studio/:studioid', + }, ], }, 'javbus.one': { diff --git a/docs/en/program-update.md b/docs/en/program-update.md index bf9ae400d..a00befe8f 100644 --- a/docs/en/program-update.md +++ b/docs/en/program-update.md @@ -28,7 +28,7 @@ pageClass: routes ### New Dropzone Actions - + ## Chocolatey diff --git a/docs/new-media.md b/docs/new-media.md index aa468da21..606132e95 100644 --- a/docs/new-media.md +++ b/docs/new-media.md @@ -162,11 +162,11 @@ pageClass: routes ### 热榜 - + -| 24h | 7days | monthly | -| ------------- | -------- | ------- | -| 24 小时阅读榜 | 7 天最热 | 月榜 | +| 1 | 2 | 3 | 4 | +| ------------- | ---- | -------- | ---- | +| 24 小时阅读榜 | 周榜 | 7 天热评 | 月榜 | diff --git a/docs/program-update.md b/docs/program-update.md index 69efe4d85..a76784da5 100644 --- a/docs/program-update.md +++ b/docs/program-update.md @@ -46,7 +46,7 @@ pageClass: routes ### 新的 Dropzone 动作 - + ## Bugly SDK diff --git a/docs/university.md b/docs/university.md index 492bed720..4b2f55ed0 100644 --- a/docs/university.md +++ b/docs/university.md @@ -757,12 +757,6 @@ jsjxy.hbut.edu.cn 证书链不全,自建 RSSHub 可设置环境变量 NODE_TLS -## 吉林大学 - -### 校内通知 - - - ## 江南大学 ### 教务处通知 diff --git a/lib/router.js b/lib/router.js index c80f616b5..3a38c1db5 100644 --- a/lib/router.js +++ b/lib/router.js @@ -1091,6 +1091,9 @@ router.get('/javbus/western/home', require('./routes/javbus/western/home')); router.get('/javbus/western/genre/:gid', require('./routes/javbus/western/genre')); router.get('/javbus/western/star/:sid', require('./routes/javbus/western/star')); router.get('/javbus/western/series/:seriesid', require('./routes/javbus/western/series')); +router.get('/javbus/director/:directorid', require('./routes/javbus/director')); +router.get('/javbus/label/:labelid', require('./routes/javbus/label')); +router.get('/javbus/studio/:studioid', require('./routes/javbus/studio')); // 中山大学 router.get('/sysu/sdcs', require('./routes/universities/sysu/sdcs')); @@ -1768,7 +1771,7 @@ router.get('/tprtc/news', require('./routes/tprtc/news')); router.get('/archdaily', require('./routes/archdaily/home')); // aptonic Dropzone actions -router.get('/aptonic/action/:untested?', require('./routes/aptonic/action')); +router.get('/aptonic/action', require('./routes/aptonic/action')); // 印记中文周刊 router.get('/docschina/jsweekly', require('./routes/docschina/jsweekly')); @@ -2245,7 +2248,7 @@ router.get('/pianyuan/:media?', require('./routes/pianyuan/app')); // ITHome router.get('/ithome/:caty', require('./routes/ithome/index')); -router.get('/ithome/ranking/:type', require('./routes/ithome/ranking')); +router.get('/ithome/ranking/:type?', require('./routes/ithome/ranking')); // 巴哈姆特 router.get('/bahamut/creation/:author/:category?', require('./routes/bahamut/creation')); @@ -2953,7 +2956,4 @@ router.get('/ngbj/cat/:cat', require('./routes/niaogebiji/cat')); // 东方我乐多丛志 router.get('/touhougarakuta/:language/:type', require('./routes/touhougarakuta')); -// 吉林大学校内通知 -router.get('/jlu/oa', require('./routes/universities/jlu/oa')); - module.exports = router; diff --git a/lib/routes/12379/index.js b/lib/routes/12379/index.js index a9a5e8e41..f4ed76fc8 100644 --- a/lib/routes/12379/index.js +++ b/lib/routes/12379/index.js @@ -10,7 +10,7 @@ module.exports = async (ctx) => { const list = data.map((item) => ({ title: item.headline, - link: `http://www.12379.cn/html/new2018/alarmcontent.shtml?file=${item.identifier}.html`, + link: `http://www.12379.cn/html/new2018/alarmcontent.shtml?file=${item.identifier}.html}`, description: item.description, pubDate: new Date(item.sendTime).toUTCString(), })); diff --git a/lib/routes/acfun/bangumi.js b/lib/routes/acfun/bangumi.js index 4dfd5df64..6ce29e34a 100644 --- a/lib/routes/acfun/bangumi.js +++ b/lib/routes/acfun/bangumi.js @@ -11,18 +11,33 @@ module.exports = async (ctx) => { Referer: 'http://www.acfun.cn', }, }); - const bangumiData = JSON.parse(bangumiPage.data.match(/window.bangumiData = (.*?);\n/)[1]); - const bangumiList = JSON.parse(bangumiPage.data.match(/window.bangumiList = (.*?);\n/)[1]); + const albumInfo = JSON.parse(bangumiPage.data.match(/window.bangumiData = (.*?);\n/)[1]) || {}; + const api = `http://www.acfun.cn/album/abm/bangumis/video?albumId=${id}&num=1&size=${albumInfo.itemCount || 9999}`; + + const response = await got({ + method: 'get', + url: api, + headers: { + Referer: 'http://www.acfun.cn', + }, + }); + const data = response.data.data; ctx.state.data = { - title: bangumiData.bangumiTitle, + title: albumInfo.bangumiTitle, link: url, - description: bangumiData.bangumiIntro, - item: bangumiList.items.map((item) => ({ - title: `${item.episodeName} - ${item.title}`, - description: ``, - link: `http://www.acfun.cn/bangumi/aa${id}_36188_${item.itemId}`, - pubDate: new Date(item.updateTime).toUTCString(), - })), + description: albumInfo.bangumiIntro, + item: data.content + .map((item) => { + const video = item.videos[0] || {}; + + return { + title: `${video.episodeName}-${video.newTitle}`, + description: ``, + link: `http://www.acfun.cn/bangumi/ab${id}_${video.groupId}_${video.id}`, + pubDate: new Date(video.onlineTime).toUTCString(), + }; + }) + .reverse(), }; }; diff --git a/lib/routes/anitama/channel.js b/lib/routes/anitama/channel.js index b31c2bf64..bb3200e74 100644 --- a/lib/routes/anitama/channel.js +++ b/lib/routes/anitama/channel.js @@ -1,6 +1,5 @@ const got = require('@/utils/got'); const cheerio = require('cheerio'); -const date = require('@/utils/date'); module.exports = async (ctx) => { const baseUrl = 'http://www.anitama.cn'; @@ -43,7 +42,7 @@ module.exports = async (ctx) => { } }); const single = { - pubDate: date($('.time').text()), + pubDate: $('.time').text(), author: $('.author').text(), link: link, title: $('h1').text() + '-' + $('h2').text(), diff --git a/lib/routes/aptonic/action.js b/lib/routes/aptonic/action.js index 74cdb7dae..ef98c4ac5 100644 --- a/lib/routes/aptonic/action.js +++ b/lib/routes/aptonic/action.js @@ -3,36 +3,28 @@ const url = require('url'); const cheerio = require('cheerio'); module.exports = async (ctx) => { - const untested = ctx.params.untested || false; + const link = `https://aptonic.com/actions/`; - const getItems = async (link) => { - const res = await got.get(link); - const $ = cheerio.load(res.body); + const res = await got.get(link); + const $ = cheerio.load(res.body); - return $('table.actions >> tr') + ctx.state.data = { + title: 'Dropzone Actions', + link, + item: $('table.actions >> tr') .get() .map((item) => { item = $(item); return { title: item.find('h2').text(), - description: `
${$(item.find('td')[1]).children().remove().end().text()}`, + description: ` + +
+ ${$(item.find('td')[1]).children().remove().end().text()} + `, pubDate: new Date().toUTCString(), link: url.resolve(link, item.find('td.icon a').attr('href')), }; - }); - }; - - const link = `https://aptonic.com/actions/`; - - const items = await getItems(link); - - if (untested) { - items.push(...(await getItems('https://aptonic.com/actions/untested'))); - } - - ctx.state.data = { - title: 'Dropzone Actions', - link, - item: items, + }), }; }; diff --git a/lib/routes/bilibili/user_bangumi.js b/lib/routes/bilibili/user_bangumi.js index 9dcd50986..864450d18 100644 --- a/lib/routes/bilibili/user_bangumi.js +++ b/lib/routes/bilibili/user_bangumi.js @@ -9,7 +9,7 @@ module.exports = async (ctx) => { const response = await got({ method: 'get', - url: `https://api.bilibili.com/x/space/bangumi/follow/list?type=${type}&follow_status=0&pn=1&ps=15&vmid=${uid}`, + url: `https://api.bilibili.com/x/space/bangumi/follow/list?type=${type}&follow_status=0&pn=1&ps=50&vmid=${uid}`, headers: { Referer: `https://space.bilibili.com/${uid}/${type_name}`, }, diff --git a/lib/routes/bjp/apod.js b/lib/routes/bjp/apod.js index da57fdae0..1f76b61d7 100644 --- a/lib/routes/bjp/apod.js +++ b/lib/routes/bjp/apod.js @@ -3,7 +3,7 @@ const got = require('@/utils/got'); module.exports = async (ctx) => { const baseUrl = 'http://www.bjp.org.cn'; - const indexUrl = baseUrl + '/mryt/index.shtml'; + const indexUrl = baseUrl + '/col/col89/index.html'; const res = await got.get(indexUrl); @@ -28,10 +28,12 @@ module.exports = async (ctx) => { const content = $($('body > table')[1]); + const image = ``; + const item = { title: $(e).attr('title'), - pubDate: new Date(data.data.match(/\d{4}-\d{2}-\d{2}/)[0]).toUTCString(), - description: content.find('table').last().html(), + pubDate: new Date($('meta[name=pubDate]').attr('content')).toUTCString(), + description: image + content.find('table').last().html(), link, guid: link, }; diff --git a/lib/routes/github/search.js b/lib/routes/github/search.js index 9c5e861e5..14def463f 100644 --- a/lib/routes/github/search.js +++ b/lib/routes/github/search.js @@ -21,10 +21,9 @@ module.exports = async (ctx) => { const out = $('.repo-list li') .slice(0, 10) .map(function () { - const a = $(this).find('.f4.text-normal > a'); const single = { - title: a.text(), - link: host.concat(a.attr('href')), + title: $(this).find('div h3 a').text(), + link: host.concat($(this).find('div h3 a').attr('href')), description: $(this).find('div p').text().trim(), }; return single; diff --git a/lib/routes/hanime/video.js b/lib/routes/hanime/video.js index 53d307d0d..d1b97965d 100644 --- a/lib/routes/hanime/video.js +++ b/lib/routes/hanime/video.js @@ -3,7 +3,7 @@ const got = require('@/utils/got'); module.exports = async (ctx) => { const response = await got({ method: 'POST', - url: 'https://search.htv-services.com/', + url: 'https://search.hanimetv.club/', headers: { Referer: 'https://hanime.tv/', 'Content-Type': 'application/json;charset=utf-8', @@ -29,7 +29,7 @@ module.exports = async (ctx) => { item: list.map((item) => { const videoUrl = 'https://hanime.tv/hentai-videos/' + item.slug; // 视频预览图,可通过视频页面的预览图片获取 - const videoImage = item.poster_url; + const videoImage = 'https://i1.wp.com/cdn.tw-hoa-licensing.com/images/storyboards/' + item.slug + '-720p-v1x.jpg'; const videoCover = item.cover_url; const videoDescription = item.description; const videoTags = item.tags; @@ -42,10 +42,7 @@ module.exports = async (ctx) => { title: videoEnglishName, description: 'Name: '.bold() + - videoEnglishName + - ' (' + videoJapanseName + - ')' + '
' + 'Brand: '.bold() + videoBrand + diff --git a/lib/routes/ikea/uk/new.js b/lib/routes/ikea/uk/new.js index 4b34579d2..d2fbc36f5 100644 --- a/lib/routes/ikea/uk/new.js +++ b/lib/routes/ikea/uk/new.js @@ -3,7 +3,7 @@ const got = require('@/utils/got'); module.exports = async (ctx) => { const link = 'https://www.ikea.com/gb/en/news/product-news-gallery/'; - const count = (await got.get('https://sik.search.blue.cdtapps.com/gb/en/product-list-page?category=products&f-toggles2=new_product')).data.productListPage.productCount; + const count = (await got.get('https://sik.search.blue.cdtapps.com/gb/en/product-list-page?category=products&toggles2=new_product')).data.productListPage.productCount; const products = (await got.get(`http://sik.search.blue.cdtapps.com/gb/en/product-list-page/more-products?category=products&start=1&end=${count}`)).data.moreProducts.productWindow; diff --git a/lib/routes/ithome/ranking.js b/lib/routes/ithome/ranking.js index 4f11fd07e..46e84162c 100644 --- a/lib/routes/ithome/ranking.js +++ b/lib/routes/ithome/ranking.js @@ -1,38 +1,28 @@ const got = require('@/utils/got'); const cheerio = require('cheerio'); -const iconv = require('iconv-lite'); module.exports = async (ctx) => { - const option = ctx.params.type; + const option = ctx.params.type || '1'; + const link = `https://www.ithome.com/`; - const response = await got({ - method: 'get', - url: 'https://www.ithome.com/block/rank.html', - encoding: 'binary', - }); - const content = iconv.decode(Buffer.from(response.data, 'binary'), 'gb2312'); - const $ = cheerio.load(content); + const response = await got.get(link); + const $ = cheerio.load(response.data); const config = { - '24h': '24 小时最热', - '7days': '7 天最热', - monthly: '月榜', - }; - - const type2id = { - '24h': 'd-1', - '7days': 'd-2', - monthly: 'd-3', + 1: '24小时阅读榜', + 2: '周榜', + 3: '7天热评', + 4: '月榜', }; const title = config[option]; - const id = type2id[option]; - if (!id) { - throw Error('Bad type. See https://docs.rsshub.app/new-media.html#it-zhi-jia'); + let elem = $('.lst.lst-2.hot-list').find('.bx').first(); + for (let i = 0; i < Number(option) - 1; ++i) { + elem = elem.next(); } - - const list = $(`#${id} > li`) + const list = elem + .find('li') .map(function () { const info = { title: $(this).find('a').text(), @@ -51,7 +41,8 @@ module.exports = async (ctx) => { url: item.link, }); const content = cheerio.load(res.data); - const paragraph = content('#paragraph'); + const post = content('div#con div.content'); + const paragraph = post.find('div#paragraph'); paragraph.find('img[data-original]').each((_, ele) => { ele = $(ele); ele.attr('src', ele.attr('data-original')); @@ -59,7 +50,7 @@ module.exports = async (ctx) => { ele.removeAttr('data-original'); }); item.description = paragraph.html(); - item.pubDate = new Date(content('#pubtime_baidu').text() + ' GMT+8').toUTCString(); + item.pubDate = new Date(post.find('span#pubtime_baidu').text() + ' GMT+8').toUTCString(); return item; }) ) @@ -67,7 +58,7 @@ module.exports = async (ctx) => { ctx.state.data = { title: `IT之家-${title}`, - link: 'https://www.ithome.com', + link: link, item: items, }; }; diff --git a/lib/routes/javbus/director.js b/lib/routes/javbus/director.js new file mode 100644 index 000000000..b3cbc6fb8 --- /dev/null +++ b/lib/routes/javbus/director.js @@ -0,0 +1,7 @@ +const { getPage } = require('./util'); + +module.exports = async (ctx) => { + const { directorid } = ctx.params; + + ctx.state.data = await getPage(`https://www.javbus.com/director/${directorid}`, ctx); +}; diff --git a/lib/routes/javbus/label.js b/lib/routes/javbus/label.js new file mode 100644 index 000000000..756b80644 --- /dev/null +++ b/lib/routes/javbus/label.js @@ -0,0 +1,7 @@ +const { getPage } = require('./util'); + +module.exports = async (ctx) => { + const { labelid } = ctx.params; + + ctx.state.data = await getPage(`https://www.javbus.com/label/${labelid}`, ctx); +}; diff --git a/lib/routes/javbus/studio.js b/lib/routes/javbus/studio.js new file mode 100644 index 000000000..7f88abbbb --- /dev/null +++ b/lib/routes/javbus/studio.js @@ -0,0 +1,7 @@ +const { getPage } = require('./util'); + +module.exports = async (ctx) => { + const { studioid } = ctx.params; + + ctx.state.data = await getPage(`https://www.javbus.com/studio/${studioid}`, ctx); +}; diff --git a/lib/routes/pocket/trending.js b/lib/routes/pocket/trending.js index c03c69fc8..83736c9eb 100644 --- a/lib/routes/pocket/trending.js +++ b/lib/routes/pocket/trending.js @@ -7,24 +7,19 @@ module.exports = async (ctx) => { const response = await got.get(url); const $ = cheerio.load(response.data); - const list = $('article').get(); + const list = $('.item').toArray(); + ctx.state.data = { title: 'Trending on Pocket', description: 'Top Articles and Videos about Trending on Pocket', link: url, item: list.map((item) => { item = $(item); - const middle_link = new URL(item.find('a').first().attr('href')); - const media = item - .find('.media') - .attr('style') - .match(/url\('(.*?)'\);/)[1]; - const pic_html = media ? `` : ''; return { title: item.find('.title').text(), - author: item.find('.details > span').first().text(), - description: `

${item.find('.excerpt').text()}

` + pic_html, - link: middle_link.searchParams.get('url') || middle_link.href, + author: item.find('.domain > a').text(), + description: `

${item.find('.excerpt').text()}

`, + link: item.find('.item_link').attr('data-saveurl'), }; }), }; diff --git a/lib/routes/transferwise/pair.js b/lib/routes/transferwise/pair.js index c16d128c2..bb9ff9162 100644 --- a/lib/routes/transferwise/pair.js +++ b/lib/routes/transferwise/pair.js @@ -19,7 +19,7 @@ module.exports = async (ctx) => { } else { const source = ctx.params.source.toUpperCase(); const target = ctx.params.target.toUpperCase(); - const api = `https://api.transferwise.com/v1/rates?source=${source}&target=${target}&from=${dayBefore}&to=${dayjs().format('YYYY-MM-DDTHH:mm:ssZ')}&group=day`; + const api = `https://api.transferwise.com/v1/rates?source=${source}&target=${target}&from=${dayBefore}&to=${yesterday}&group=day`; const response = await got({ method: 'get', @@ -32,17 +32,14 @@ module.exports = async (ctx) => { }); const data = response.data; - - const yRate = data[1]; - const byRate = data[2]; - const trend = yRate.rate > byRate.rate; - const diff = (yRate.rate - byRate.rate) / yRate.rate; + const trend = data[0].rate > data[1].rate; + const diff = (data[0].rate - data[1].rate) / data[1].rate; const percent = (Math.abs(diff) * 100).toFixed(4); - const title = `${source}/${target} ${trend ? '📈' : '📉'} @${yRate.rate} ${diff > 0 ? '' : '-'}${percent}%`; + const title = `${source}/${target} ${trend ? '📈' : '📉'} @${data[0].rate} ${diff > 0 ? '' : '-'}${percent}%`; - const description = `

${source} to ${target}

DateRate
${yesterday}${yRate.rate}
${dayBefore}${byRate.rate}
`; + const description = `

${source} to ${target}

DateRate
${yesterday}${data[0].rate}
${dayBefore}${data[1].rate}
`; const single = { title, diff --git a/lib/routes/universities/jlu/oa.js b/lib/routes/universities/jlu/oa.js deleted file mode 100644 index b850e0c0d..000000000 --- a/lib/routes/universities/jlu/oa.js +++ /dev/null @@ -1,31 +0,0 @@ -const got = require('@/utils/got'); -const cheerio = require('cheerio'); - -module.exports = async (ctx) => { - const response = await got({ - method: 'get', - url: 'https://oa.jlu.edu.cn/defaultroot/PortalInformation!jldxList.action', - }); - - const data = response.data; - - const $ = cheerio.load(data); // 使用 cheerio 加载返回的 HTML - const list = $('div[class="li rel"]'); - - ctx.state.data = { - title: 'jlu oa', - link: 'https://oa.jlu.edu.cn/defaultroot/PortalInformation!jldxList.action', - item: - list && - list - .map((index, item) => { - item = $(item); - return { - title: item.find('a.font14').text(), - description: item.find('a.column').text(), - link: item.find('a.font14').attr('href'), - }; - }) - .get(), - }; -}; diff --git a/lib/routes/xiaohongshu/user.js b/lib/routes/xiaohongshu/user.js index 93aca8197..af658dfea 100644 --- a/lib/routes/xiaohongshu/user.js +++ b/lib/routes/xiaohongshu/user.js @@ -18,7 +18,7 @@ module.exports = async (ctx) => { const list = main.notesDetail; const resultItem = list.map((item) => ({ title: `${item.title}`, - link: `https://www.xiaohongshu.com/discovery/item/${item.id}`, + link: `${item.link}`, description: `
${item.title}`, })); diff --git a/lib/utils/date.js b/lib/utils/date.js index 3bc00d44d..993e99be7 100644 --- a/lib/utils/date.js +++ b/lib/utils/date.js @@ -53,9 +53,6 @@ module.exports = (html, timeZone = -serverOffset) => { } else if (/(\d+)月(\d+)日 (\d+):(\d+)/.exec(html)) { math = /(\d+)月(\d+)日 (\d+):(\d+)/.exec(html); date = new Date(date.getFullYear(), parseInt(math[1]) - 1, math[2], math[3], math[4]); - } else if (/(\d+)月(\d+)日 (\d+)时(\d+)分/.exec(html)) { - math = /(\d+)月(\d+)日 (\d+)时(\d+)分/.exec(html); - date = new Date(date.getFullYear(), parseInt(math[1]) - 1, math[2], math[3], math[4]); } else if (/(\d+)月(\d+)日/.exec(html)) { math = /(\d+)月(\d+)日/.exec(html); date = new Date(date.getFullYear(), parseInt(math[1]) - 1, math[2]); diff --git a/package.json b/package.json index 96ae9b55f..869a67249 100644 --- a/package.json +++ b/package.json @@ -47,7 +47,7 @@ "eslint-plugin-prettier": "3.1.4", "jest": "26.1.0", "mockdate": "3.0.2", - "nock": "13.0.3", + "nock": "13.0.2", "nodemon": "2.0.4", "pinyin": "2.9.1", "prettier": "2.0.5", @@ -80,7 +80,7 @@ "etag": "1.8.1", "fanfou-sdk": "4.1.0", "git-rev-sync": "2.0.0", - "googleapis": "57.0.0", + "googleapis": "56.0.0", "got": "11.5.1", "he": "1.2.0", "hooman": "1.2.5", diff --git a/yarn.lock b/yarn.lock index cb2a62bf1..4a5056fd9 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5789,10 +5789,10 @@ googleapis-common@^4.4.0: url-template "^2.0.8" uuid "^8.0.0" -googleapis@57.0.0: - version "57.0.0" - resolved "https://registry.yarnpkg.com/googleapis/-/googleapis-57.0.0.tgz#d19184ac4b2056e3e7d5f4c78baf7cbc1cf08460" - integrity sha512-QTeh4/i1xsueUVRzVZ3zYIfckPnmSpVeBIkWGh1BJtXUrUapaVMIp+wuJ3Z10anHwvy+n24ypBtuuRX0oR7dPQ== +googleapis@56.0.0: + version "56.0.0" + resolved "https://registry.yarnpkg.com/googleapis/-/googleapis-56.0.0.tgz#28f55e1e6ba72e523895f0afe6bc8529b9c3bcef" + integrity sha512-qf8Xp7QV7h81nWzspRCMIEnFsG6aBrsomkl0H/578G8/8lIZ/tt+6yDexVTPsR6XDo/jhSb4rtN9462AmLhQxA== dependencies: google-auth-library "^6.0.0" googleapis-common "^4.4.0" @@ -8531,10 +8531,10 @@ no-case@^2.2.0: dependencies: lower-case "^1.1.1" -nock@13.0.3: - version "13.0.3" - resolved "https://registry.yarnpkg.com/nock/-/nock-13.0.3.tgz#9f81f04499af6a87f9c419a023920b623d715110" - integrity sha512-hDscKS5chEfyEiF8J1syz8mkkH6Wetp04ECAAPNdL5k6e6WmRgx9FZZNnCrjePNdykgiiPXORBcXbNmMzFOP5w== +nock@13.0.2: + version "13.0.2" + resolved "https://registry.yarnpkg.com/nock/-/nock-13.0.2.tgz#3e50f88348edbb90cce1bbbf0a3ea6a068993983" + integrity sha512-Wm8H22iT3UKPDf138tmgJ0NRfCLd9f2LByki9T2mGHnB66pEqvJh3gV/up1ZufZF24n7/pDYyLGybdqOzF3JIw== dependencies: debug "^4.1.0" json-stringify-safe "^5.0.1"