move yt-dl to scraping

This commit is contained in:
2022-06-18 14:26:06 +02:00
parent 8a08626e5b
commit b6b0bdba19

View File

@@ -0,0 +1,22 @@
---
title: "youtube-dl"
tags: [ "Documentation", "Scraping" ]
---
> youtube-dl --write-auto-sub <URL>
It will default to English, but you can specify another language with the flag --sub-lang:
> youtube-dl --sub-lang sv --write-auto-sub <URL>
You can list all available subtitles with:
> youtube-dl --list-subs <URL>
Its also possible to skip the video and only download the subtitle if you add the flag --skip-download:
> youtube-dl --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 youtube-dl.