-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
306 additions
and
306 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,16 @@ | ||
FROM python:3.7-stretch | ||
|
||
RUN apt-get update -y && apt-get install -y libav-tools | ||
|
||
ENV APP_DIR=/app | ||
ENV DATA_DIR=/data | ||
|
||
RUN mkdir -p ${APP_DIR} ${DATA_DIR} | ||
|
||
VOLUME ${DATA_DIR} | ||
|
||
COPY ../jwdownload ${APP_DIR} | ||
|
||
WORKDIR ${APP_DIR} | ||
|
||
FROM python:3.7-stretch | ||
|
||
RUN apt-get update -y && apt-get install -y libav-tools | ||
|
||
ENV APP_DIR=/app | ||
ENV DATA_DIR=/data | ||
|
||
RUN mkdir -p ${APP_DIR} ${DATA_DIR} | ||
|
||
VOLUME ${DATA_DIR} | ||
|
||
COPY jwdownload.py ${APP_DIR} | ||
|
||
WORKDIR ${APP_DIR} | ||
|
||
ENTRYPOINT ["python", "-u", "jwdownload.py"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,66 +1,66 @@ | ||
jwdownloader | ||
============== | ||
|
||
A simple tool for downloading videos in jwplayer format | ||
|
||
# Quick start | ||
|
||
```bash | ||
$ docker pull xdrew/jw | ||
$ docker run --rm --name=jw -v `pwd`:/data xdrew/jw https://video.com/c/xxx.mp4/xxxxxxx/segment73.ts | ||
``` | ||
|
||
# Parameters | ||
|
||
``` | ||
usage: docker run --rm --name=jw -v `pwd`:/data xdrew/jw [-h] [--name NAME] [--first-segment FIRST_SEGMENT] | ||
[--last-segment LAST_SEGMENT] [--segments TOTAL_SEGMENTS] | ||
[--no-cleanup] [--skip-downloaded] | ||
url | ||
Download video in jwplayer format | ||
positional arguments: | ||
url Url to parse link from | ||
(https://video.com/c/xxx.mp4/xxxxxxx/segment73.ts) | ||
optional arguments: | ||
-h, --help show this help message and exit | ||
--name NAME Output filename without extension ("Super video from www") | ||
--first-segment FIRST_SEGMENT | ||
First segment index (5) | ||
--last-segment LAST_SEGMENT | ||
Last segment index (73) | ||
--segments TOTAL_SEGMENTS | ||
Total segment amount to fetch. (73) | ||
--no-cleanup Do not delete segments | ||
--skip-downloaded Do not process videos with existing output name | ||
``` | ||
|
||
# Hints | ||
|
||
It's convenient to have an alias for this command | ||
|
||
```bash | ||
$ echo 'alias jw="docker run --rm --name=jw -v `pwd`:/data xdrew/jw"' >> ~/.bashrc && source ~/.bashrc | ||
``` | ||
|
||
Sometimes it's handy to put multiple videos into queues | ||
```bash | ||
$ cat queue.sh | ||
jw https://video.com/c/xxxx.mp4/asdf/segment1.ts --name="Video 1" | ||
jw https://video.com/c/yyyy.mp4/adsf/segment1.ts --name="Video 2" | ||
``` | ||
|
||
To make alias work inside this queue file you can do the following | ||
```bash | ||
echo "function jw() { | ||
docker run --rm --name=jw -v \`pwd\`:/data xdrew/jw \"\$@\" | ||
} | ||
export -f jw" >> ~/.bashrc && source ~/.bashrc | ||
``` | ||
|
||
And just run the queue | ||
```bash | ||
./queue.sh | ||
jwdownloader | ||
============== | ||
|
||
A simple tool for downloading videos in jwplayer format | ||
|
||
# Quick start | ||
|
||
```bash | ||
$ docker pull xdrew/jw | ||
$ docker run --rm --name=jw -v `pwd`:/data xdrew/jw https://video.com/c/xxx.mp4/xxxxxxx/segment73.ts | ||
``` | ||
|
||
# Parameters | ||
|
||
``` | ||
usage: docker run --rm --name=jw -v `pwd`:/data xdrew/jw [-h] [--name NAME] [--first-segment FIRST_SEGMENT] | ||
[--last-segment LAST_SEGMENT] [--segments TOTAL_SEGMENTS] | ||
[--no-cleanup] [--skip-downloaded] | ||
url | ||
Download video in jwplayer format | ||
positional arguments: | ||
url Url to parse link from | ||
(https://video.com/c/xxx.mp4/xxxxxxx/segment73.ts) | ||
optional arguments: | ||
-h, --help show this help message and exit | ||
--name NAME Output filename without extension ("Super video from www") | ||
--first-segment FIRST_SEGMENT | ||
First segment index (5) | ||
--last-segment LAST_SEGMENT | ||
Last segment index (73) | ||
--segments TOTAL_SEGMENTS | ||
Total segment amount to fetch. (73) | ||
--no-cleanup Do not delete segments | ||
--skip-downloaded Do not process videos with existing output name | ||
``` | ||
|
||
# Hints | ||
|
||
It's convenient to have an alias for this command | ||
|
||
```bash | ||
$ echo 'alias jw="docker run --rm --name=jw -v `pwd`:/data xdrew/jw"' >> ~/.bashrc && source ~/.bashrc | ||
``` | ||
|
||
Sometimes it's handy to put multiple videos into queues | ||
```bash | ||
$ cat queue.sh | ||
jw https://video.com/c/xxxx.mp4/asdf/segment1.ts --name="Video 1" | ||
jw https://video.com/c/yyyy.mp4/adsf/segment1.ts --name="Video 2" | ||
``` | ||
|
||
To make alias work inside this queue file you can do the following | ||
```bash | ||
echo "function jw() { | ||
docker run --rm --name=jw -v \`pwd\`:/data xdrew/jw \"\$@\" | ||
} | ||
export -f jw" >> ~/.bashrc && source ~/.bashrc | ||
``` | ||
|
||
And just run the queue | ||
```bash | ||
./queue.sh | ||
``` |
Oops, something went wrong.