Add support for YouTube channels, fixes #13#141
Add support for YouTube channels, fixes #13#141acagastya wants to merge 2 commits intoMichaelDeBoey:mainfrom
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #141 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 16 16
Lines 220 224 +4
Branches 28 29 +1
=========================================
+ Hits 220 224 +4 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
@MichaelDeBoey Can you please have a look? That build error does not seem to be coming from my changes. |
|
@acagastya Looking at the Travis log, it looks like you didn't update all snapshots |
|
@MichaelDeBoey Isn't the error from Codepen? Surprisingly, when I do |
|
Okay -- found one mistake -- placement of the parenthesis was wrong. |
|
@acagastya Can you tell me how you got the username of all those channels? I'd love to do some research. |
|
@acagastya That way I get https://youtube.com/channel/UCz-BYvuntVRt_VpfR6FKXJw for Kent's channel And there's no way to support these type of URLs? |
|
When I search for Kent C Dodds and click on the first link, it shows |
|
@acagastya If you watch https://www.youtube.com/watch?v=A4MTOf8hPcE for instance and then click on Kent's username, you'll get redirected to https://youtube.com/channel/UCz-BYvuntVRt_VpfR6FKXJw. |
|
Interestingly, if you click on the profile photo not the name, you will get |
|
I tried to search for more channels -- did not find any channel for whom there wasn't '/user/' URL. |
|
Adam Wathan: https://youtube.com/channel/UCy1H38XrN7hi7wHSClfXPqQ I can go on for some time like this. It's not the fact that a |
|
In that case one needs to find the embed URL pattern -- could you please put out a tweet to any of these channels to provide an embed link for their channel -- so that one can understand how it works? Because those docs only listed how to do for those which have |
|
I've tweeted about it: https://twitter.com/MichaelDeBoey93/status/1313488051654537220 |
|
Thanks, for that, @MichaelDeBoey! |


What: Added support for YouTube channels of the type
https://youtube.com/user/kentdoddsfamily.Why: Closes #13
How: Per YouTube Docs
Checklist:
Caveat
I went through some of the channels:
All but "Official Rick Astley" had their channels of the type "youtube.com/user/" -- I don't know why that one channel has a different format -- it can not be subscribers count because T-Series and Pewdiepie has the maximum count. The docs (linked above) mentions
https://www.youtube.com/embed?listType=user_uploads&list=**USERNAME**for this solution.This is one caveat one needs to be aware of.