talmobi / yt-search

97 stars 31 forks source link

Not showing all videos #37

Closed ezpotd closed 3 years ago

ezpotd commented 3 years ago

I am not sure whether this was a built in limitation, but I can only see 17-20 videos from one search, even when I print the whole list. Is this a mistake, or was this intentional? image image

talmobi commented 3 years ago

It's not precisely intentional, it's just the first page results that youtube provides from the initial http request.

I have thought about supporting getting more results indefinitely and at one point had something working but have decided against developing it further for now. The reason is I want to keep it simple and basically work as a proxy for a simple youtube search. Also YouTube provides its own API if you want full control, although I think it costs a bit of money.

Also, I think https://github.com/TimeForANinja/node-ytsr supports getting additional/next page results as well as some filtering support (e.g. searching by length and date).

Filtering support may be added to yt-search at some point (same things you can control on a simple youtube page search). Next/more page results isn't on the road plan as of yet. This isn't really intended for bulk crawling. node-ytsr or YouTubes own API may be better for those kinds of use cases.