From 1f0e125d431b60e1e036034d0f4ab14763c37477 Mon Sep 17 00:00:00 2001 From: MoartMedia Date: Wed, 23 Jun 2021 14:47:08 +0900 Subject: [PATCH 1/2] fix:update getWatchHTMLPage right pos --- lib/info.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/info.js b/lib/info.js index 417f8761..6d678f03 100644 --- a/lib/info.js +++ b/lib/info.js @@ -313,7 +313,7 @@ const getWatchHTMLPage = async(id, options) => { let args = findJSON('watch.html', 'player_response', body, /\bytplayer\.config\s*=\s*{/, '', '{'); info.player_response = findPlayerResponse('watch.html', args); } - info.response = findJSON('watch.html', 'response', body, /\bytInitialData("\])?\s*=\s*\{/i, '\n', '{'); + info.response = findJSON('watch.html', 'response', body, /\bytInitialData("\])?\s*=\s*\{/i, '', '{'); info.html5player = getHTML5player(body); return info; }; From 990a3d35fe91ee4a20d4b8f6fcca956eda2210d2 Mon Sep 17 00:00:00 2001 From: MoartMedia Date: Thu, 24 Jun 2021 09:02:40 +0900 Subject: [PATCH 2/2] fix: move all findJSON right pos. --- lib/info.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/info.js b/lib/info.js index 6d678f03..7ef917ca 100644 --- a/lib/info.js +++ b/lib/info.js @@ -308,7 +308,7 @@ const getWatchHTMLPage = async(id, options) => { let info = { page: 'watch' }; try { info.player_response = findJSON('watch.html', 'player_response', - body, /\bytInitialPlayerResponse\s*=\s*\{/i, '\n', '{'); + body, /\bytInitialPlayerResponse\s*=\s*\{/i, '', '{'); } catch (err) { let args = findJSON('watch.html', 'player_response', body, /\bytplayer\.config\s*=\s*{/, '', '{'); info.player_response = findPlayerResponse('watch.html', args);