Git Product home page Git Product logo

livedumper's Introduction

Livedumper

Save your favorite video/streams for later

Introduction

This program allows you to dump (a.k.a. 'download' or 'save for later') various streams/video sites like Dailymotion, YouTube, Twitch, Crunchyroll, and many more. It uses the livestreamer API so I don't need to implement every new site by hand, and since the livestreamer API is very nice this makes the code lightweight and simple.

To run this program, you just need to call it like this:

$ livedumper http://www.crunchyroll.com/fatekaleid-liner-prisma-illya/episode-1-illya-grow-up-657285 best

This will download a video called Crunchyroll___Watch_Fate_kaleid_liner_Prism_Illya_2wei__Episódio_1___Illya_Grow_.ts with the highest quality found by livestreamer in your current folder (you can change this passing the -d /path/to/folder option). You can download multiple files (unless you want different quality settings for each video) just calling the program with multiple URLs.

You can change livestreamer related options, see misc/settings.ini file for details. To login to some service, you can just use livestreamer command like:

$ livestreamer --crunchyroll-username=xxxx --crunchyroll-password=xxx http://www.crunchyroll.com/fatekaleid-liner-prisma-illya/episode-1-illya-grow-up-657285 best

Yep, you will need to pass a valid video file (this is a limitation of livestreamer: it doesn't authenticate without a valid video URL), but should work.

How to install

You need to have both livestreamer and rtmpdump installed and added somewhere on your PATH. Probably the best way is to use your distribution packages to install this program. Since rtmpdump is a dependency of livestreamer your package manager should install both. Some distribution commands to install both:

$ sudo apt-get install livestreamer # Debian/Ubuntu and derivates
$ sudo pacman -S livestreamer # Arch Linux

After that you need to install livedumper per se. The easiest way to do it is using pip. This downloads and installs this project from PyPi, completely automagically (excluding for system dependencies). If you didn't install livestreamer on the last step it will install for you (but probably without rtmpdump). Just run the following command:

$ sudo pip install livedumper

If you do want to install manually, you will first need to install the Python requirements. They're listed on requirements.txt file, that is compatible with Python's pip package manager. Just run the following commands:

$ sudo pip install -r requirements.txt
$ git clone https://github.com/m45t3r/livedumper.git

Optional but recommended: instead of running the pip commands as root (using sudo) it's better to create a isolated virtual environment so you don't mess with your system Python. To do so, do the following:

$ sudo pip install virtualenv
$ virtualenv livedumper
$ cd livedumper
$ source bin/activate # You should run this command after every new terminal you open
$ pip install livedumper

About Python versions

This program should be compatible both with Python 2.7.x and Python 3.3+, but is only tested in Python 3.4.x. Should something not work, if it's in Python 2.7.x I may drop support depending if it's too hard to fix (but please report, I will at least take a look on the issue). If it's Python 3.3+ I will treat it as a bug so you can report and I will try to fix it.

Credits

This project is based on livestreamer. Thanks for all developers from livestreamer for the amazing API, it was a joy to work!

livedumper's People

Contributors

ispedals avatar pharada avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

livedumper's Issues

Script exits with failure status even if download was successful

When the download completes successfully, the script exits with status 1, which generally indicates failure. A successful download should result in 0 exit status.

$ livedumper http://www.crunchyroll.com/parasyte-the-maxim-/episode-1-metamorphosis-662583 low
Downloaded 97280.0 KB of file 'Crunchyroll___Watch_Parasyte__the_maxim__Episode_1___Metamorphosis.ts'
Complete download of file 'Crunchyroll___Watch_Parasyte__the_maxim__Episode_1___Metamorphosis.ts'

$ echo $?
1

Why doesn't it work for every series on Crunchyroll?

For example,

"livedumper http://www.crunchyroll.com/mushi-uta/episode-1-the-beginning-of-the-dream-567486 best"

doesn't work. It exits with error

Plugin error: Media lookup error: You don't have permission to do this.

although I am able to watch it online without logging in.

Any idea why this is happening? I haven't encountered this problem on any other series on Crunchyroll thus far.

PS: Thanks for this simple and damn useful program, btw. :)

need help

hello

i love your works ^^

juste one problem impossible to get french subs ? and get the 1080 to crunchyroll video pleez explained me how to use ?

tx in advance

Allow custom configuration

Livestreamer API allows the developer to set some custom configuration for each Plugin (like http-proxy, necessary to bypass regional restrictions on Crunchyroll). I will need to implement this sometime, since for now the user can't control media options.

Better file name generation, part 2

Each video should have a significant title instead of random URL garbage. For example, for this url the name should be [Hatsune Miku] After Rain Sweet*Drops [English Sub].mp4 instead of watch_v=ZEtEH-GIAJE.mp4.

One way to do it would be to download the HTML page, get everything between <title></ title> and to use it. But in some cases (like this one) the returned filename would be really awkward: Crunchyroll - Watch Fate/kaleid liner PRISMA ILLYA 2wei! Episode 1 - Illya Grow Up?!.mp4

The filename is too big, has illegal characters (like /?!) and has unecessary things like "Crunchyroll - Watch". We need to filter this somewhat, but I still don't know what is the best way to do it.

P.S.: just for reference, the filename of the Crunchyroll case should be something like Fate-kaleid liner PRISMA ILLYA 2wei Episode 1 - Illya Grow Up.mp4

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.