~cadence/tube#29: 
Support alternative channel URLs

Cloudtube only supports channel URLs such as https://www.youtube.com/channel/UCu7_D0o48KbfhpEohoP7YSQ but here is another link to the same channel https://www.youtube.com/c/AndreasSpiess

With another format, https://www.youtube.com/channel/UCws9q7DZHIqG1gpuaptb29A is also https://www.youtube.com/user/fkflby

And https://www.youtube.com/channel/UCE_gw5ybJdGAcyZFy6TfScw is also https://www.youtube.com/hoolopee

All these alternative links with readable names return 404 pages on Cloudtube currently, they should return the same as their currently supported /channel/UC<channel_slug> equivalent.

Status
RESOLVED IMPLEMENTED
Submitter
~lomanic
Assigned to
No-one
Submitted
4 years ago
Updated
1 year, 7 months ago
Labels
No labels applied.

~cadence 3 years ago

So if I've got this right, I need to add routes on CloudTube for:

  • /c/{name}
  • /user/{name}
  • /{name}

Are there any others?

Are the names of these shared in any way? For example, if someone has /c/stage, does this also automatically give them /user/stage and /stage? What about in the other directions?

Is it acceptable to redirect from that name to the standard /channel/{identifier}, or must I render the response directly on those routes?

~lomanic 3 years ago*

Are there any others?

https://github.com/yt-dlp/yt-dlp/blob/0fa9a1e23625f0ba4516e5107ce447ac693e7ec1/yt_dlp/extractor/youtube.py#L2467

I think there's no more routes.

if someone has /c/stage, does this also automatically give them /user/stage and /stage?

https://www.youtube.com/c/AndreasSpiess redirects (this is new: "short links" redirect to the "slug" one now, this is done client-side and it looks like it's only a call to history.replaceState()) to https://www.youtube.com/channel/UCu7_D0o48KbfhpEohoP7YSQ, while https://www.youtube.com/user/AndreasSpiess is some another Avocado empty user, redirected to https://www.youtube.com/channel/UCVRacX7DnkMLNrQPQWvgNZA

https://www.youtube.com/AndreasSpiess redirects properly to https://www.youtube.com/channel/UCu7_D0o48KbfhpEohoP7YSQ

https://tube.cadence.moe/channel/AndreasSpiess (https://redirect.invidious.io/channel/AndreasSpiess also) gives this Avocado user. https://www.youtube.com/channel/AndreasSpiess is a 404.

Is it acceptable to redirect from that name to the standard /channel/{identifier}, or must I render the response directly on those routes?

YouTube now rewrites the URL to the slug one (amusingly, if you click on any tab like Videos, the original visited old short link shows up), we can follow that if it makes it simpler on CloudTube part.

~cadence REPORTED IMPLEMENTED 2 years ago

Thanks very much for your 9 month old patch that added this!

~lomanic 1 year, 7 months ago

This shouldn't have been closed as Implemented, as the MR or commit said, this is only partially fixed as /{name} channels are still not properly displayed (Cloudtube may redirect to /watch?={name} if {name} matches YouTube video ID format).

In the meantime, a new /@{name} format appeared, such as https://www.youtube.com/@YouTube (name is case-independent for this format also).

I have implemented support for the /@{name} format in https://git.sr.ht/~lomanic/cloudtube/commit/1b13680c5a6f0d5ca9d2218c799e5ce55ab9bf53 and https://git.sr.ht/~lomanic/NewLeaf/commit/e601f21dd696f91c4adbf2f450c470c318ac3e06, in the alternative-channel-names-at and proxy-videos branches respectively. If you are interested in pulling these changes.

Register here or Log in to comment, or comment via email.