change ``bash headers to
``sh
This commit is contained in:
@@ -3,7 +3,7 @@ title: "Download Website"
|
||||
tags: [ "networking", "scraping" ]
|
||||
---
|
||||
|
||||
```bash
|
||||
```sh
|
||||
domain=splint.rs
|
||||
mkdir $domain
|
||||
cd $domain
|
||||
|
@@ -4,25 +4,25 @@ tags: [ "scraping" ]
|
||||
---
|
||||
Install `yt-dlp`.
|
||||
|
||||
```bash
|
||||
```sh
|
||||
yt-dlp --write-auto-sub *<URL>*
|
||||
```
|
||||
|
||||
It will default to English, but you can specify another language with the flag --sub-lang:
|
||||
|
||||
```bash
|
||||
```sh
|
||||
youtube-dl --sub-lang sv --write-auto-sub *<URL>*
|
||||
```
|
||||
|
||||
You can list all available subtitles with:
|
||||
|
||||
```bash
|
||||
```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:
|
||||
|
||||
```bash
|
||||
```sh
|
||||
yt-dlp --sub-lang sv --write-auto-sub --skip-download *<URL>*
|
||||
```
|
||||
|
||||
|
Reference in New Issue
Block a user