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

[youtube] "youtube.com/name" can be a user or a channel #190

Closed
wants to merge 1 commit into from

Conversation

pukkandan
Copy link
Contributor

@pukkandan pukkandan commented Nov 13, 2020

Please follow the guide below

  • You will be asked some questions, please read them carefully and answer honestly
  • Put an x into all the boxes [ ] relevant to your pull request (like that [x])
  • Use Preview tab to see how your pull request will actually look like

Before submitting a pull request make sure you have:

In order to be accepted and merged into youtube-dl each piece of code must be in public domain or released under Unlicense. Check one of the following options:

  • I am the original author of this code and I am willing to release it under Unlicense
  • I am not the original author of this code but it is in public domain or released under Unlicense (provide reliable evidence)

What is the purpose of your pull request?

  • Bug fix
  • Improvement
  • New extractor
  • New feature

Description of your pull request and other information

Direct youtube URLs (youtube.com/name) now doesn't have to be a username but can be channel name. Closes #186

@pukkandan pukkandan marked this pull request as ready for review November 13, 2020 16:26
@someziggyman
Copy link

someziggyman commented Nov 15, 2020

have no time to review it. maybe monday. maybe someone else can.

Seems to be a legit fix and works fine for the cases described. Links like this: https://www.youtube.com/zsecurity are going to work fine with this improvement. However, I'm not sure how it was generated. Clicking on various YouTube channels within YouTube all came up why a /c/someChannelName or /channel/somechannelid - https://www.youtube.com/c/PeterSantenello or https://www.youtube.com/channel/UCVPjtOVcnKaSRI8IO3KSetA

Doubt there's any risk approving and adding it to the next release. It works with all link formats, so it's definitely a good thing. Maybe, someone else can take a look and confirm with more expertise.
@pukkandan has done a great job

@pukkandan
Copy link
Contributor Author

pukkandan commented Nov 15, 2020

However, I'm not sure how it was generated. Clicking on various YouTube channels within YouTube all came up why a /c/someChannelName or /channel/somechannelid

@someziggyman Youtube allows to shorten /c/channelName to just /channelName. But they also allow /u/userName to /userName. So given a url such as /name, it not possible to tell whether it is a usename or a channel name. However, since all the code for downloading user and channel is the same, I just made it use the shortened URL itself for extraction. That way there is no need to know if it is a user page or channel page.

@pukkandan
Copy link
Contributor Author

Made obsolete by #245

@pukkandan pukkandan deleted the direct-youtube-link branch January 22, 2021 00:47
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

Successfully merging this pull request may close these issues.

404 Not Found for channel URL without /c/ or /channel/
2 participants