Skip to content

Conversation

@acagastya
Copy link
Contributor

@acagastya acagastya commented Oct 2, 2020

What: Added support for YouTube channels of the type https://youtube.com/user/kentdoddsfamily.

Why: Closes #13

How: Per YouTube Docs

Checklist:

  • Documentation
  • Tests
  • Ready to be merged

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.

@codecov
Copy link

codecov bot commented Oct 2, 2020

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (ba7e462) to head (fb55627).
Report is 59 commits behind head on main.

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@acagastya
Copy link
Contributor Author

acagastya commented Oct 2, 2020

@MichaelDeBoey Can you please have a look? That build error does not seem to be coming from my changes.

@MichaelDeBoey MichaelDeBoey added the ⚙️ YouTube Issue or pull request regarding YouTube label Oct 3, 2020
@MichaelDeBoey
Copy link
Owner

@acagastya Looking at the Travis log, it looks like you didn't update all snapshots

@MichaelDeBoey MichaelDeBoey self-assigned this Oct 3, 2020
@acagastya
Copy link
Contributor Author

@MichaelDeBoey Isn't the error from Codepen? Surprisingly, when I do yarn test, I don't see any error -- what am I missing?

@acagastya
Copy link
Contributor Author

Okay -- found one mistake -- placement of the parenthesis was wrong.

@MichaelDeBoey
Copy link
Owner

@acagastya Can you tell me how you got the username of all those channels?

I'd love to do some research.

@acagastya
Copy link
Contributor Author

For any YouTube video, click on the name of the uploader.
4B3B6D70-00D1-4796-87C1-4878364EDC97
That that screenshot for example: I would click on Programming with Mosh to get the channel.

@MichaelDeBoey
Copy link
Owner

@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?

@acagastya
Copy link
Contributor Author

When I search for Kent C Dodds and click on the first link, it shows https://www.youtube.com/user/kentdoddsfamily-- the same is added in the README for example.
Screenshot 2020-10-03 at 21 42 48
I have don't know how the /channel/ links are generated or show up -- because I searched for dozens of channel of different types, but they all have /user/ -- I did not even find it in the documentation for /channel/ -- it talks about user only.

@MichaelDeBoey
Copy link
Owner

@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.
It would be awesome to get them to work too 🙂

@acagastya
Copy link
Contributor Author

Interestingly, if you click on the profile photo not the name, you will get https://www.youtube.com/user/kentdoddsfamily. Two different URLs but the same page. If you search for "Kent C Dodds" it still shows /user/. The YouTube docs don't even give a mechanism for /channel/ only the user. Can you find those channels which don't have a user link -- if there are hardly such channels then this approach is working perfectly fine. Else we need to wait till Google adds that in the docs.

@acagastya
Copy link
Contributor Author

I tried to search for more channels -- did not find any channel for whom there wasn't '/user/' URL.

@MichaelDeBoey
Copy link
Owner

MichaelDeBoey commented Oct 4, 2020

Adam Wathan: https://youtube.com/channel/UCy1H38XrN7hi7wHSClfXPqQ
Apollo GraphQL: https://youtube.com/channel/UC0pEW_GOrMJ23l8QcrGdKSw
Camo & Krooked: https://youtube.com/channel/UCxaLJvYDW8XMgrNbdnZ-uMQ
React Rally: https://youtube.com/channel/UCXBhQ05nu3L1abBUGeQ0ahw
Tailwind Labs: https://youtube.com/channel/UCOe-8z68tgw9ioqVvYM4ddQ

I can go on for some time like this.

It's not the fact that a /user/ is available, it's the fact that when being subscribed to a channel and clicking on the channel in the navbar to the left of just clicking the name instead of the profile pic that you'll get a /channel/ link and I want to support both kinds

@acagastya
Copy link
Contributor Author

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 /user/.

@MichaelDeBoey
Copy link
Owner

I've tweeted about it: https://twitter.com/MichaelDeBoey93/status/1313488051654537220
Let's hope it can help us out 🙂

@acagastya
Copy link
Contributor Author

Thanks, for that, @MichaelDeBoey!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

⚙️ YouTube Issue or pull request regarding YouTube

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support YouTube channels

2 participants