LuanRT / YouTube.js

A wrapper around YouTube's internal API — reverse engineering InnerTube
https://www.npmjs.com/package/youtubei.js
MIT License
3.3k stars 199 forks source link

Don't collapse with a letter difference. #559

Open byadems opened 6 months ago

byadems commented 6 months ago

Steps to reproduce

When we type the command ".song yan Diyarbakır" in a WhatsApp group, it causes an error. However, when I tried it as ".song yan diyarbakır", I noticed that we did not encounter any errors.

Failure Logs

InnertubeError: SearchHeader not found!

This is a bug, want to help us fix it? Follow the instructions at https://github.com/LuanRT/YouTube.js/blob/main/docs/updating-the-parser.md or report it at https://github.com/LuanRT/YouTube.js/issues!

at Parser._Parser_printError (/railway/Raganork/node_modules/youtubei.js/dist/src/parser/index.js:299:29)

at Parser.parseItem (/railway/Raganork/node_modules/youtubei.js/dist/src/parser/index.js:161:77)

at Parser.parse (/railway/Raganork/node_modules/youtubei.js/dist/src/parser/index.js:205:53)

at Parser.parseResponse (/railway/Raganork/node_modules/youtubei.js/dist/src/parser/index.js:71:45)

at new Feed (/railway/Raganork/node_modules/youtubei.js/dist/src/core/Feed.js:83:70)

at new Search (/railway/Raganork/node_modules/youtubei.js/dist/src/parser/youtube/Search.js:25:9)

at Innertube.<anonymous> (/railway/Raganork/node_modules/youtubei.js/dist/src/Innertube.js:90:20)

at Generator.next (<anonymous>)

at fulfilled (/railway/Raganork/node_modules/youtubei.js/dist/src/Innertube.js:5:58)

at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {

info: {

chipBar: { chipCloudRenderer: [Object] },

searchFilterButton: { buttonRenderer: [Object] },

trackingParams: 'CBAQiOoKIhMI3avxlcmMgwMVGExMCB0Q6Qus'

},

date: 2023-12-13T13:59:18.742Z,

version: '2.9.0'

}

Expected behavior

To download the song smoothly

Current behavior

He's trying to download the song, but I discovered that he got into an endless loop and caused the WhatsApp bot to crash

Version

Default

Anything else?

No response

Checklist

absidue commented 6 months ago

Please upgrade to the latest version of YouTube.js. You are using version 2.9.0 which was released in January 2023, so understandably it doesn't know how to handle recent YouTube changes. (Your log clearly states that the version is 2.9.0, please don't check that checkbox, unless you are actually on the latest version next time).

byadems commented 5 months ago

Please upgrade to the latest version of YouTube.js. You are using version 2.9.0 which was released in January 2023, so understandably it doesn't know how to handle recent YouTube changes. (Your log clearly states that the version is 2.9.0, please don't check that checkbox, unless you are actually on the latest version next time).

How do I update to the latest version?