youtube-scrape icon indicating copy to clipboard operation
youtube-scrape copied to clipboard

Option to search by type (channel / playlist / video)?

Open patrickkfkan opened this issue 4 years ago • 2 comments

Hello,

On the YouTube website, you have the option to filter search results by type (channel, playlist, video...). The URL then gets appended with "sp={some string}" (which does not seem to be predefined) and the results will be limited to the specified type.

With youtube-scrape, is it possible to do the same thing? Currently, it returns a bunch of results that can be channels, playlists or videos. I can filter the results to include only, say, channels after the search is completed. But if I were to obtain 30 channels or playlists matching a keyword, I would need many iterations because channels and playlists appear far less frequently than videos in the general search results (which you can observe by searching for something on the YouTube website).

Thanks for the great work!

-Patrick

patrickkfkan avatar Dec 09 '20 13:12 patrickkfkan

Hmm if it's part of the URL than that should be fairly easy to implement, I'll see what I can do

HermanFassett avatar Dec 09 '20 20:12 HermanFassett

@HermanFassett , I've submitted a PR on this for your review.

Thanks, Patrick

patrickkfkan avatar Dec 14 '20 13:12 patrickkfkan