OdyseeTeam / odysee-api

API server for Odysee
https://odysee.com
MIT License
228 stars 49 forks source link

Fetch all video links from a LBRY channel #290

Closed maferv closed 3 years ago

maferv commented 3 years ago

Hello great people,

I need to download an entire channel from LBRY. I'd like to fetch all the links to all its videos from the command line (bash) and then I'll download the videos using this script [1]

Let's take for example this channel: https://lbry.tv/@ODDTV How can I fetch all the video links from this channel using curl, wget, or other programs?

Thank you for helping share the truth!

[1] example

#!/bin/bash
youtube-dl $(curl $1 | grep embed | sed 's/.*embed\(.*\)">.*/\1/' | cut -d '"' -f1 | awk -v prefix="https://cdn.lbryplayer.xyz/api/v2/streams/free" '{print prefix $0}')
tzarebczan commented 3 years ago

What you'll want to do is run the LBRY Desktop app at lbry.com/get and hover over each video to click the download button.

If you want to do it via the SDK API there, you'd run a lbrynet claim search --channel=<@channelname#xxx> --page_size=50 (max is 50 at a time, then you can pass --page=2

and then for each result, run a lbrynet get <permanant URL>

More info on the API here: lbry.tech/api/sdk