Closed Erfesto closed 2 years ago
Sup. On some videos id, "video" method gives error. Videos example: https://www.youtube.com/watch?v=HA8JI1vM2FA https://www.youtube.com/watch?v=MTvUCo0h8PI
Code example: async function test() { let video = await ytt.video('HA8JI1vM2FA') console.log(video) } test()
async function test() { let video = await ytt.video('HA8JI1vM2FA') console.log(video) } test()
Error: (node:400) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'simpleText' of undefined at Object.text ("your project"/node_modules/ytt/src/lib/util.js:16:66) at Object.makeVideoObject ("your project"/node_modules/ytt/src/lib/builder.js:114:35) at Object.module.exports [as video] ("your project"/node_modules/ytt/src/video.js:9:23) at processTicksAndRejections (internal/process/task_queues.js:97:5) at async Client.<anonymous> ("your project"/Test/main.js:1473:13)
(node:400) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'simpleText' of undefined at Object.text ("your project"/node_modules/ytt/src/lib/util.js:16:66) at Object.makeVideoObject ("your project"/node_modules/ytt/src/lib/builder.js:114:35) at Object.module.exports [as video] ("your project"/node_modules/ytt/src/video.js:9:23) at processTicksAndRejections (internal/process/task_queues.js:97:5) at async Client.<anonymous> ("your project"/Test/main.js:1473:13)
Oh! Channel having no subscriber count made it break. Fixed in 2.1.4.
Thanks for reporting!
Sup. On some videos id, "video" method gives error. Videos example: https://www.youtube.com/watch?v=HA8JI1vM2FA https://www.youtube.com/watch?v=MTvUCo0h8PI
Code example:
async function test() { let video = await ytt.video('HA8JI1vM2FA') console.log(video) } test()
Error:
(node:400) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'simpleText' of undefined at Object.text ("your project"/node_modules/ytt/src/lib/util.js:16:66) at Object.makeVideoObject ("your project"/node_modules/ytt/src/lib/builder.js:114:35) at Object.module.exports [as video] ("your project"/node_modules/ytt/src/video.js:9:23) at processTicksAndRejections (internal/process/task_queues.js:97:5) at async Client.<anonymous> ("your project"/Test/main.js:1473:13)