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

Get Channel ID by Custom URL #116

Closed
4 tasks done
OskarEichler opened this issue Jul 25, 2022 · 6 comments · Fixed by #268
Closed
4 tasks done

Get Channel ID by Custom URL #116

OskarEichler opened this issue Jul 25, 2022 · 6 comments · Fixed by #268
Labels
enhancement New feature or request good first issue Good for newcomers priority: medium

Comments

@OskarEichler
Copy link

OskarEichler commented Jul 25, 2022

Describe your suggestion

Hey @LuanRT ,

As far as I'm aware it is currently not possible to grab channel information via the API using the custom URL of a channel.

The new custom URLs in the /c/xxxxx format are not supported. This is really frustrating, as often we rely on users to paste in their channel URL but we can't parse it correctly if they use the custom URL, and they have a hard time finding their Channel ID as the browser always redirects to the custom url.

Here is an example:
https://www.youtube.com/c/WINKEDRecords

Is there some endpoint that can resolve the custom URL and return the channel ID so that we can fetch data correctly?

All the best,
Oskar

Other details

No response

Checklist

  • I am running the latest version.
  • I checked the documentation and found no answer.
  • I have searched the existing issues and made sure this is not a duplicate.
  • I have provided sufficient information.
@OskarEichler OskarEichler added the enhancement New feature or request label Jul 25, 2022
@LuanRT
Copy link
Owner

LuanRT commented Jul 25, 2022

Yup, some time ago I found the endpoint /navigation/resolve_url in the Android client. And it does exactly what you said.

Ex;

curl --request POST \
  --url 'https://youtubei.googleapis.com/youtubei/v1/navigation/resolve_url?key=AIzaSyDCU8hByM-4DrUqRUYnGn-3llEO78bcxq8' \
  --header 'Content-Type: application/json' \
  --data '{
    "context": {
        "client": {
            "clientName": "ANDROID",
            "clientVersion": "17.29.33",
            "hl": "en"
        }
    }, 
    "url": "https://youtube.com/c/macmiller"
  }'

@OskarEichler
Copy link
Author

LEGEND!! Thanks so much <3

@BobVarioa
Copy link
Collaborator

I think this issue isn't quite completed, it would be nice to have inbuilt library support for this.

@github-actions
Copy link
Contributor

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the Stale label Aug 25, 2022
@LuanRT LuanRT added good first issue Good for newcomers and removed Stale labels Aug 25, 2022
@github-actions
Copy link
Contributor

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@ChunkyProgrammer
Copy link
Contributor

@LuanRT this issue should probably be reopened

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers priority: medium
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants