Skip to main content

Context-aware video downloader

Project description

dlvh

dlvh (download video here) is a wrapper for yt-dlp that allows you to quickly download videos in a folder according to predefined nested local rules.

Install

	pip install dlvh

How to use

Use dlvh *URL* to download to current folder, dlvh -p *preset* *URL* to download to a preset, and dlvh -n *preset* (in the target directory) to define new preset.

You can have dlvh configuration files on each level of the directory tree. These files use a simple yaml structure:

options:
  download-archive: .ytdlarchive # Relative to the folder where the download happens
  cookies: ^/yt_cookies.txt # Relative to THIS configuration file, even in subfolders
  output: '"%(id)s.%(title)s.%(ext)s"' # Careful with quoting strings!
  merge-output-format: mkv
flags:
- restrict-filenames
- prefer-free-formats

Let's say you have the following folder structure:

├── audio  
│   ├── dlvh.yml # `extract-audio`  
│   ├── unsettling_screaming  
│   └── calm_nature_sounds  
└── video  
    ├── dlvh.yml # `embed-thumbnail`, `download-archive: .ytdlarchive`  
    ├── asmr  
    └── dance_covers  
        ├── dlvh.yml # `download-archive: ^/ytdlarchive`  
        ├── twice  
        └── redvelvet  

When you download something to audio/calm_nature_sounds, the flag extract-audio from its parent folder will be respected.
When you download something to video/asmr, the flag embed-thumbnail and the option download-archive: .ytdlarchive will be respected, meaning a local file video/asmr/.ytdlarchive will be used as archive.
When you download something to videos/dance_covers/twice however, its parent folder's option download-archive: ^/ytdlarchive overwrites this, meaning a common archive file dance_covers/.ytdlarchive will be used for all subfolders.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dlvh-1.0.2.tar.gz (15.2 kB view hashes)

Uploaded Source

Built Distribution

dlvh-1.0.2-py3-none-any.whl (16.0 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page