diff --git a/test/constants.js b/test/constants.js index dab67bee..7d43646b 100644 --- a/test/constants.js +++ b/test/constants.js @@ -6,8 +6,7 @@ module.exports = { original_ntoken: 'PqjqqJjdB9K821VIisj', expected_ntoken: 'AxwyS-osUl1WhMUd1', client_version: '2.20211101.01.00', - test_video_id: 'FT_nzxtgXEw', - test_video_id_1: 'YE7VzlLtp-4', + test_video_id: 'dQw4w9WgXcQ', sig_decipher_sc: `fB={RP:function(a,b){a.splice(0,b)}, Td:function(a){a.reverse()}, kq:function(a,b){var c=a[0];a[0]=a[b%a.length];a[b%a.length]=c};fB.kq(a,35);fB.RP(a,2);fB.kq(a,46);fB.Td(a,6);`, diff --git a/test/index.js b/test/index.js index 4de433d4..df866a33 100644 --- a/test/index.js +++ b/test/index.js @@ -22,10 +22,11 @@ async function performTests() { const comments = await youtube.getComments(Constants.test_video_id).catch((error) => error); assert(comments instanceof Error ? false : true, `should retrieve comments for ${Constants.test_video_id}`, comments); - const video = await downloadVideo(Constants.test_video_id_1, youtube).catch((error) => error); - assert(video instanceof Error ? false : true, `should download video (${Constants.test_video_id_1})`, video); + const video = await downloadVideo(Constants.test_video_id, youtube).catch((error) => error); + assert(video instanceof Error ? false : true, `should download video (${Constants.test_video_id})`, video); } + const n_token = new NToken(Constants.n_scramble_sc).transform(Constants.original_ntoken); assert(n_token == Constants.expected_ntoken, `should transform n token into ${Constants.expected_ntoken}`, n_token);