Skip to content
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

How to get the list of channel videos without youtube shorts #191

Open
yasir-naseer opened this issue Feb 10, 2024 · 3 comments
Open

How to get the list of channel videos without youtube shorts #191

yasir-naseer opened this issue Feb 10, 2024 · 3 comments

Comments

@yasir-naseer
Copy link

Im using Youtube::listChannelVideos() to get the list of channel videos, but it also returns the youtube short, is there a way to filter so we can only get videos?

@alaouy
Copy link
Owner

alaouy commented Feb 14, 2024

@yasir-naseer Did you manage to find a solution ?

@yasir-naseer
Copy link
Author

not yet

@franckitho
Copy link

Hi, The only way I've found is to filter directly via the description key, if it's empty then it'll be a short. Unfortunately, this isn't 100% reliable.

$videoList = Youtube::listChannelVideos('xxxxxxxxxxxxxx', 40, 'date');

$videosWithoutShort = collect($videoList)->filter(function ($item) {
    return !empty($item->snippet->description);
})

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants