invidious
invidious copied to clipboard
Channel home page from API?
so when using the api, i tried to get shorts from UCFQMnBA3CS502aghlcr0_aw (Coffeezilla), when i did, i got this
videos | 0 | type | "category" title | "Videos" contents | […] 1 | type | "category" title | "Traders Domain" contents | […] 2 | type | "category" title | "Investigating CryptoZoo" contents | […] ...
i used the following url https://iv.ggtyler.dev/api/v1/channels/UCFQMnBA3CS502aghlcr0_aw/shorts
im not sure if i can use this on other channels which have shorts, but id like to know.
The channel doesn't have a shorts tab, so the correct response in this case should be an error saying that the tab doesn't exist. YouTube redirects to the homepage when you request a non-existent tab, looks like Invidious is missing a check to detect that and return an error message about the tab not existing. The endpoint works correctly for channels that do have a shorts tab.
To check if a channel has a tab before you try requesting it, you should request the channel API endpoint first /api/v1/channels/<channel_id>
and check the tabs
field.
i kinda guessed that, but was wondering if it was possible to get a result like that on any channel.
The big question is why? It only shows content that is already available on other tabs.
Also there is no consistency across channels as it's customisable by the channel owner, so which sections appear, in what order and what titles they have is different on every channel, additionally the sections don't have any identifiers other than the inconsistent section titles. So working with them is an absolute nightmare.
that's a fair point. i just thought id be nice for the users? im not sure, i just saw it was possible and was wondering if it could be added.
also kinda unrelated, but the /channels endpoint for the channels doesn't seem to work.
YouTube removed the channels
tab.
then it would likely be a good idea to update the docs for that section saying it no longer works
then it would likely be a good idea to update the docs for that section saying it no longer works
Feel free to submit a pull request! Repository is here: https://github.com/iv-org/documentation