Files
lk/networking/scraping/youtube-dl.md
2026-04-27 12:59:27 +02:00

35 lines
638 B
Markdown

---
title: Download videos
tags:
- scraping
- video
---
Install `yt-dlp`.
```sh
yt-dlp --write-auto-sub ${url}
```
It will default to English, but you can specify another language with the flag --sub-lang:
```sh
youtube-dl --sub-lang sv --write-auto-sub ${url}
```
You can list all available subtitles with:
```sh
yt-dlp --list-subs ${url}
```
It's also possible to skip the video and only download the subtitle if you add the flag --skip-download:
```sh
yt-dlp --sub-lang sv --write-auto-sub --skip-download ${url}
```
## Alternative
Try `yt-dlp` for some additional features and workarounds.
It uses the same flags as yt-dlp.