X-Git-Url: https://code.delx.au/webdl/blobdiff_plain/68bec1e9931fcfcb04a34395faa8e14d45f72f91..c79961c5fd06ddf7cc7ab5d7ee1e8fc8a464a8f1:/README.md diff --git a/README.md b/README.md index 0f573ad..8ee457c 100644 --- a/README.md +++ b/README.md @@ -2,34 +2,56 @@ WebDL is a set of Python scripts to grab video from online Free To Air Australian channels. -## Requirements -* [Livestreamer](http://docs.livestreamer.io/install.html) -* python 2.7 or 3.2+ -* pycrypto -- Livestreamer needs this for some videos -* python-lxml -* ffmpeg / libav-tools +## News -## Installation +### 2017-02-24 +* Now requires Python3, use the `python2` branch if you need the old version. +* Recommended installation is now with `virtualenv` and `pip` to install dependencies. +* Removed some custom logic in favour of the `requests` and `requests_cache` libraries. +* `autograbber.py` can write to multiple directories, previous command line args are still supported. -### Arch Linux - pacman -S livestreamer python-crypto python-lxml ffmpeg -### Ubuntu - apt-get install livestreamer python-crypto python-lxml libav-tools +## Installation using pip -### Mac OS X +Install the following packages using your package manager: -Warning, this is untested! +* Python 3.2+ (including dev package) +* ffmpeg or libav-tools - brew install python3 ffmpeg - pip3 install livestreamer pycrypto lxml +Clone the WebDL repository: +``` +git clone https://bitbucket.org/delx/webdl +cd webdl +``` + +Set up a Python virtualenv and use pip to install the other dependencies: +``` +virtualenv --python python3 .virtualenv +. .virtualenv/bin/activate +pip install -r requirements.txt +``` + +Whenever you want to run WebDL you must source the `.virtualenv/bin/activate` script from your shell. -### Then get WebDL itself - hg clone https://bitbucket.org/delx/webdl - cd webdl - python3 ./grabber.py +## Installation on Debian/Ubuntu + +Install Python 3 and needed libraries: +``` +apt-get install python3 python3-lxml python3-requests python3-requests-cache +``` + +You must also install Streamlink, or if it unavailable, the older Livestreamer. Depending on the age of your distro you'll need either: + +- `apt-get install streamlink` +- `apt-get install livestreamer python-crypto` + + +Install ffmpeg: +``` +apt-get install ffmpeg +``` ## Interactive usage (grabber.py) @@ -70,21 +92,21 @@ The bolded parts are what you type. Note that you can go back on any screen by t ## Cron scripted usage (autograbber.py) -I have a shell script which looks something like this, I run it daily from crontab. +You can schedule a regular download of your favourite shows. This example uses `chronic` from `moreutils`. ``` # m h dom mon dow command - 0 1 * * * ./autograbber.py /path/to/video-dir/ /path/to/patterns.txt + 0 1 * * * timeout 6h chronic $HOME/webdl/autograbber-cron.sh /videos/ABC4Kids /videos/Insight ``` -The patterns.txt file should contain shell-style globs, something like: +Each of these directories should contain a `.patterns.txt` with shell-style globs: ``` -ABC iView/*/QI*/* -SBS/Programs/Documentary/*/* +ABC iView/By Channel/ABC4Kids/*/* +SBS/Channel/SBS1/Insight* ``` -The above will download all episodes of QI from ABC as well as every SBS documentary. Whenever an episode is downloaded it is recorded into downloaded_auto.txt. Even if you move the files somewhere else they will not be redownloaded. +Whenever an episode is downloaded it is recorded into `.downloaded_auto.txt`. Even if you move the files somewhere else they will not be redownloaded. ## Bug reports