From 186f423c336ff9c401ee2e93e9c38391627de3fa Mon Sep 17 00:00:00 2001 From: HCLonely Date: Tue, 30 Jun 2020 09:45:39 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dnode=208.x=20=E6=8F=90?= =?UTF-8?q?=E7=A4=BAURL=E6=9C=AA=E5=AE=9A=E4=B9=89=E7=9A=84bug(#6)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.js | 2 ++ package.json | 2 +- src/index.js | 4 +++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index 93f0ca8..07374c1 100644 --- a/index.js +++ b/index.js @@ -26,6 +26,8 @@ var log = require('hexo-log')({ silent: false }); +if (typeof URL !== 'function') var _require = require('url'), + URL = _require.URL; var options = { options: [{ name: '-u, --update', diff --git a/package.json b/package.json index dc6981a..c89b57a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "hexo-bilibili-bangumi", - "version": "1.3.1", + "version": "1.3.2", "description": "hexo bilibili番剧页", "main": "index.js", "scripts": { diff --git a/src/index.js b/src/index.js index 60f6e4d..6ec11b5 100644 --- a/src/index.js +++ b/src/index.js @@ -8,6 +8,8 @@ const log = require('hexo-log')({ silent: false }); +if (typeof URL !== 'function') var { URL } = require('url') + let options = { options: [ { name: '-u, --update', desc: 'Update bangumi data' }, @@ -128,4 +130,4 @@ async function saveBangumiData(vmid) { log.info("Bilibili bangumis data has been saved"); } }); -} \ No newline at end of file +}