Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
Add support for lbry.tv #23695
Add support for lbry.tv #23695
Comments
|
This should be fairly straightforward for someone familiar with the youtube-dl code, there is a download button with the URL: |
|
Do you think it will be possible to add account support in the future as well? You get awarded LBC for watching a video a day on the site, and rewards for watching your first 10, 50, 100 and so on videos. I prefer to watch videos with mpv+youtube-dl, but I would hate to miss out on the rewards of the site. |
Possibly, for now I just did it the simplest way possible.
Yeah, that would be nice.
Give my pull request a shot and let me know if it works for you. |
|
If you are on linux try:
Where $1 is the URL of the lbry.tv video you want to download. For example:
You can use it along with mpv and ydtl for streaming or put that in a bash script if you want, lets say lbry.sh. So you just do:
Hope this may help, and please excuse my poor english, bye! |
|
A small bash function based on what @FEFB-tech proposed, but using lbryoutube-dl() {
local -a a
mapfile -t a < <(xmllint --html --xpath '
concat(
concat("https://cdn.lbryplayer.xyz/api/v2/streams/free/",
substring-after(//meta[@property="og:video"]/@content, "/embed/"))
, "'$'\n''"
, string(//meta[@property="og:title"]/@content)
, "'$'\n''"
, substring-after(//meta[@property="og:video:type"]/@content, "video/")
)
' <(curl -sS "$1"))
youtube-dl -o "$HOME/${a[1]}-%(id)s.${a[2]}" "${a[0]}"
}You can adapt the path where |
Checklist
Example URLs
Description
lbry.tv is a new open-source video publishing site. The site is still a bit funky, sometimes videos load on the first try sometimes not, and sometimes they fail halfway through watching them.