lk/networking/scraping/youtube-dl.md

23 lines
610 B
Markdown
Raw Normal View History

2022-01-16 18:20:39 +00:00
---
title: "youtube-dl"
2022-06-18 12:26:06 +00:00
tags: [ "Documentation", "Scraping" ]
2022-01-16 18:20:39 +00:00
---
2020-01-02 00:04:35 +00:00
> 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>
2022-06-18 12:26:06 +00:00
## Alternative
Try `yt-dlp` for some additional features and workarounds.
It uses the same flags as youtube-dl.