Closed MikeDev96 closed 4 years ago
Seems like a Youtube issue, I will see if there's a workaround for this.
If not, I'm gonna add search type "all" which includes Channel, Video, and Playlist by searching without filter, and distinguish it manually from the scrapper.
Sounds good to me, thanks for the prompt response!
Published the update to NPM (@1.4.0
)
Applying the filter can sometimes remove videos from the results, I'm unsure if this is a YouTube issue or not.
Take the following links as examples:
This first link will bring up the correct video/song that I want: https://www.youtube.com/results?search_query=official+audio+Stand+High+Patrol+Commando
But when you apply the video filter (which is correct as it is a video...), you will see it disappears: https://www.youtube.com/results?search_query=official+audio+Stand+High+Patrol+Commando&sp=EgIQAQ%253D%253D
I've looked at the code and can see you're filtering the results by the type param as well as passing it in the query. It would be useful if we could pass a type but not have it included in the query.
As a test I commented out 4 lines in the dist code and it works as intended for me now.
https://i.imgur.com/4Yp7ZP0.png