SuspiciousLookingOwl / scrape-yt

Simple lib to scrape information from youtube such as search results, video information, related videos, playlist information and up next video
https://www.npmjs.com/package/scrape-yt
MIT License
9 stars 3 forks source link

[BUG] scrapeYt.getVideo(videoID); throws an error when trying to get a video with no description #18

Closed th13n-h4ck3r closed 4 years ago

th13n-h4ck3r commented 4 years ago

Thank you so much for making this repo possible. This repo has everything I needed.

Describe the bug Here is the url to the video that scrapeYt.getVideo(videoID) throws the error.

The error TypeError: Cannot read property 'runs' of undefined at Object.parseGetVideo (node_modules\scrape-yt\dist\common\parser.js:364:31) at node_modules\scrape-yt\dist\index.js:196:64 at step (node_modules\scrape-yt\dist\index.js:44:23) at Object.next (node_modules\scrape-yt\dist\index.js:25:53) at fulfilled (node_modules\scrape-yt\dist\index.js:16:58) at processTicksAndRejections (internal/process/task_queues.js:97:5)

To Reproduce use scrapeYt.getVideo(videoID) where videoID is a video without a description like this one I found.

Expected behavior A clear and concise description of what you expected to happen.

Additional context I think it's because the code always expect a description on every video. I could be wrong.

SuspiciousLookingOwl commented 4 years ago

Glad you like it!

The error is fixed on 1.4.2, please update the package.

npm update scrape-yt