https://github.com/niklasheld/zdf-download
📺 Automatically download new episodes of shows from the ZDF Mediathek
https://github.com/niklasheld/zdf-download
downloader python youtube-dl zdf
Last synced: 8 days ago
JSON representation
📺 Automatically download new episodes of shows from the ZDF Mediathek
- Host: GitHub
- URL: https://github.com/niklasheld/zdf-download
- Owner: niklasheld
- Created: 2021-09-01T21:23:24.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2023-05-23T02:13:13.000Z (about 3 years ago)
- Last Synced: 2023-10-21T17:39:19.757Z (over 2 years ago)
- Topics: downloader, python, youtube-dl, zdf
- Language: Python
- Homepage:
- Size: 24.4 KB
- Stars: 5
- Watchers: 1
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: readme.md
- Changelog: history.py
Awesome Lists containing this project
README
ZDF-Download
[](https://github.com/niklasheld/zdf-download/actions/workflows/build-container.yaml)
[](https://github.com/niklasheld/zdf-download/actions/workflows/quality.yaml)
[](https://github.com/semantic-release/semantic-release)
[](https://sonarcloud.io/summary/new_code?id=zdf-download)
[](https://sonarcloud.io/summary/new_code?id=zdf-download)
[](https://snyk.io/test/github/niklasheld/zdf-download)
Script to automatically download new episodes of TV shows from the ZDF Mediathek. The script is meant to quickly download *new* episodes, not all available episodes.
## How to add new shows
Add RSS-feeds for the show you want to download to the configuration script. You can find a direct URL to the field in the source-code of the mediathek-page. An example for *ZDF Magazin Royale* is [https://www.zdf.de/rss/zdf/comedy/zdf-magazin-royale](https://www.zdf.de/rss/zdf/comedy/zdf-magazin-royale)
As an option, you can also define regex-filters on fields from the rss-feed to filter out episodes you don't want, i.e. specials or short online-clips. `configuration-example.yaml` has an example for a filter to only download full ZDF Magazin Royale episodes.
## Application logic
- Script assumes that all files in the target folder are named ` SxxExx` naming-scheme and no files violate this scheme. It also asumes that you are using a flat filestructure for all seasons.
- When a new episode is found, a sequential filename is generated for the new download. If you want the file to be downloaded in a new season, you have to rename it manually. The next file will then be sequentially added to this season.
- After a file is downloaded, it's URL is added to a history-file and it will not be downloaded again.
## How to start
Before starting the script, add a custom `configuration.yaml`-file to your directory. You can find an example configuration in the configuration-folder
### Full Configuration
See `configuration-example.yaml` for an example configuration. The configuration file has to be placed at `/app/configuration/configuration.yaml`.
| Paramter | Description | Example |
| --- | --- | --- |
| interval | Minutes between each scan for new episodes | `60` |
| shows[].feed-url | URL to the RSS-feed for the show you want to download | `"https://www.zdf.de/rss/zdf/comedy/zdf-magazin-royale"` |
| shows[].filter.regex | Regular expression to match only specific episodes of a show | `"zdf-magazin-royale-vom-\\d"` |
| shows[].filter.regexField | Field in the RSS-feed that is filtered for the regular expression | `"link"` |
| shows[].filter.minDate | Minimum date of episode to download | `"2021-09-01 00:00+00:00"` |
| shows[].download.folder | Path to the folder where the downloaded files are located for this show | `"/serien/ZDF Magazin Royale"` |
| shows[].download.filename | Base filename that is used to consecutively name episodes. | `"ZDF Magazin Royale"` |
### Docker
The recommended way to use this program is to start a lightweight Docker-container and mount your media-folders and configuration.
#### Build yourself
You can start a docker-build using the following command:
``docker build -t zdf-download .``
Afterwards, you can deploy the built container using this command:
``docker run -d --name=zdf-download -v : -v :/app/configuration zdf-download:latest``
#### Use the latest pre-built image
You can also use the pre-build container and deploy directly from the GitHub container-registry:
``docker run -d --name=zdf-download -v : -v :/app/configuration ghcr.io/niklasheld/zdf-download:latest``
### Without docker
Install the packages from `requirements.txt`, preferably in a python virtual environment. Make sure that `youtube-dl` and `ffmpeg` are installed and available. Start the application using `python app.py`.