Open christoph-heinrich opened 3 years ago
Yes i'm interested by this feature, peertube is more and more used everywhere by a lot of accounts censored on youtube, like projectcamelot a very old youtube channel deleted from youtube and now with its own peertube video website, downloading single video work but downloading new video webpages don't work: https://media.projectcamelotportal.com/videos/recently-added?a-state=42 (Unsupported URL: https://media.projectcamelotportal.com/videos/recently-added?a-state=42)
Checklist
Description
I would like to be able to download all videos from a channel/account. The reason why I'm requesting both of them in the same issue is, that when looking at the network traffic, they seem to be pretty much identical and therefore use the same code. Downloading individual videos already works, so it's just a matter of getting the urls to all the videos in the correct order.
Both use a simple get request to get the videos. In this example the url for the channel is
https://gegenstimme.tv/api/v1/video-channels/shlomo_finkelstein/videos?start=0&count=25&sort=-publishedAt
while for the account it'shttps://gegenstimme.tv/api/v1/accounts/shlomo/videos?start=0&count=25&sort=-publishedAt
. The response to both is a json that is structured exactly the same. The response even contains the total video count.While I'm not familiar with the code, it seems to me like one could just take the provided url (e.g.
https://gegenstimme.tv/video-channels/shlomo_finkelstein/videos
), insertapi/v1/
and?start=0&count=25&sort=-publishedAt
at the correct places, and then update thestart
until thetotal
(at the very beginning in the json response) is reached. Both channel and account urls need to be altered in the exact same way.The json objects for each video don't contain the video url directy, but it's uuid. The uuid can be simply appended to
{hostname}/videos/watch/
(e.g.https://gegenstimme.tv/videos/watch/77b5b0ea-eca1-465e-a6bd-c96dfa11ded7
) to get the same video url as in the browser.I've also checked a few other peertube instances and it seems to be the same for all of them.