alaouy / YouTube

🔥 Laravel PHP Facade/Wrapper for the Youtube Data API
MIT License
780 stars 205 forks source link

getChannelFromURL doesn't work with custom channel URLS #177

Closed alasdairgallacher closed 1 year ago

alasdairgallacher commented 2 years ago

Hi

The getChannelFromURL function doesn't support the use of custom channel URLS. Links like https://www.youtube.com/c/customname for example.

Do you know if there is any easy way around this, or does YouTube API not support queries via custom channel names?

Thanks

Slaver commented 1 year ago

There are five variants of custom channel URLs now:

  1. https://www.youtube.com/channel/UCK8sQmJBp8GCxrOtXWBpyEA
  2. https://www.youtube.com/@Google
  3. https://www.youtube.com/c/Google
  4. https://www.youtube.com/user/Google and even
  5. https://www.youtube.com/Google

I've created a pull request with ability to use all of them.

alaouy commented 1 year ago

Thanks to @Slaver this issue is now resolved.