From 9128f407cee82814df7fef14d9c5f6e7aedda668 Mon Sep 17 00:00:00 2001 From: haiyangcui Date: Sun, 8 Nov 2020 12:31:00 +0100 Subject: [PATCH] =?UTF-8?q?=E8=8E=B7=E5=8F=96=E8=B1=86=E7=93=A3=E8=AF=84?= =?UTF-8?q?=E5=88=86=E6=97=B6,=E7=A7=BB=E9=99=A4=E7=A9=BA=E6=A0=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/lib/site/tools.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/lib/site/tools.js b/src/lib/site/tools.js index 56d4ba7..6266ec3 100644 --- a/src/lib/site/tools.js +++ b/src/lib/site/tools.js @@ -17,8 +17,6 @@ var ElectronProxyAgent = require('electron-proxy-agent') // use ElectronProxyAgent as http and https globalAgents http.globalAgent = https.globalAgent = new ElectronProxyAgent(session) -// axios.get('https://api.my-ip.io/ip').then(res => console.log(res)) - // 请求超时时限 axios.defaults.timeout = 10000 // 可能使用代理,增长超时 @@ -363,7 +361,7 @@ const zy = { const parsedHtml = cheerio.load(response.data) var rating = parsedHtml('body').find('#interest_sectl').first().find('strong').first() if (rating.text()) { - resolve(rating.text()) + resolve(rating.text().replace(/\s/g, '')) } else { resolve('暂无评分') }