From bcd871971924990f088b0ab6bc269fb9bc7c66e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EB=AA=A8=EB=A9=94MoMe?= Date: Sat, 26 Jun 2021 12:26:07 +0900 Subject: [PATCH] fix: Update getWatchHTMLPage right pos (#946) * fix:update getWatchHTMLPage right pos * fix: move all findJSON right pos. --- lib/info.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/info.js b/lib/info.js index 417f8761..7ef917ca 100644 --- a/lib/info.js +++ b/lib/info.js @@ -308,12 +308,12 @@ 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); } - 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; };