-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
addParam('type', 'video') doesn't filter out all videos #41
Comments
I'm having the same problem! |
Have an example of implementation code? |
As the README sugsessed (https://github.com/nodenica/youtube-node#optional-parameters), I used this code: const YouTube = require("youtube-node");
const yt= new YouTube();
yt.setKey(settings.youtubeApiKey);
yt.addParam("type", "video"); But I still get playlists in my results. |
After searching for a bit, the search method calls the clearParams method which removes the The pull request #40 should prevent the issue you are describing if it is merged. Meanwhile, you can add the params in the search method parameters yt.search(keyword, maxResults, { type: 'video' }, () => {
...
}) |
@qayou Thanks! Thats seems to be working! |
on https://developers.google.com/youtube/v3/docs/search/list
type video is valid. But it doesn't work, it still returns channels instead of only videos.
youTube.addParam('type', 'video')
Any idea what it could be?
The text was updated successfully, but these errors were encountered: