forked from andonome/lk
clarifications
This commit is contained in:
@@ -1,22 +1,24 @@
|
||||
---
|
||||
title: "youtube-dl"
|
||||
title: "Download videos"
|
||||
tags: [ "Documentation", "Scraping" ]
|
||||
---
|
||||
> youtube-dl --write-auto-sub <URL>
|
||||
Install `yt-dlp`.
|
||||
|
||||
> yt-dlp --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>
|
||||
> youtube-dl --sub-lang sv --write-auto-sub *<URL>*
|
||||
|
||||
You can list all available subtitles with:
|
||||
|
||||
> youtube-dl --list-subs <URL>
|
||||
> 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:
|
||||
It's 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>
|
||||
> 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 youtube-dl.
|
||||
It uses the same flags as yt-dlp.
|
||||
|
@@ -5,7 +5,53 @@ tags: [ "Documentation", "Networking" ]
|
||||
|
||||
wpa_supplicant configurations are stored in /etc/wpa_supplicant/wpa_supplicant-wlan0 (or equivalent).
|
||||
|
||||
# Generating Keys Manually
|
||||
## WiFi Connection
|
||||
|
||||
> wpa_cli
|
||||
|
||||
Once in, scan the network, add an empty place to store credentials, then input them.
|
||||
|
||||
> scan
|
||||
|
||||
> scan_results
|
||||
|
||||
> add_network
|
||||
|
||||
This outputs a network number, e.g. '3'. This is the new network you'll work with.
|
||||
|
||||
> set_network *3* ssid *"Kosachok Cafe"*
|
||||
|
||||
> set_network 3 psk *"Kosachok2019"*
|
||||
|
||||
OR (for no password)
|
||||
|
||||
> set_network *3* key_mgmt NONE
|
||||
|
||||
> enable_network 3
|
||||
|
||||
> save_config
|
||||
|
||||
This takes a while to connect, so to speed things up, restart the service:
|
||||
|
||||
> sudo sv restart wpa_supplicant
|
||||
|
||||
# Scripts
|
||||
|
||||
You can script like this:
|
||||
|
||||
> wpa_cli add_network
|
||||
|
||||
That returns an ID, so you can say:
|
||||
|
||||
> newNetwork="$(wpa_cli add_network)"
|
||||
|
||||
Then `$newNetwork` would equal that number, and you can add/ remove networks with scripts.
|
||||
|
||||
But remember to escape the quotes, so adding a network would be:
|
||||
|
||||
> wpa_cli set_network *3* psk *\""passphrase"\"*
|
||||
|
||||
## Generating Keys Manually
|
||||
|
||||
> wpa_passphrase [ssid] [password]
|
||||
|
||||
@@ -22,50 +68,3 @@ Next up, start wpa_supplicant:
|
||||
> wpa_supplicant -B -iwlan0 -c /etc/wpa_supplicant/wpa_supplicant-wlan0
|
||||
|
||||
The -B flag runs this as a background process. Remove this to see real-time output in order to solve problems. The -i flag denotes the physical device used for the wifi. The -c flag points to the configuration file for use.
|
||||
|
||||
## Automatic WiFi Connection
|
||||
|
||||
> wpa_cli
|
||||
|
||||
This has a number of commands to input. In order:
|
||||
|
||||
> scan
|
||||
|
||||
> scan_results
|
||||
|
||||
> add_network
|
||||
|
||||
This outputs a network number, e.g. '3'. This is the new network you'll work with.
|
||||
|
||||
> set_network 3 ssid "Kosachok Cafe"
|
||||
|
||||
> set_network 3 psk "Kosachok2019"
|
||||
|
||||
OR (for no password)
|
||||
|
||||
> set_network 3 key_mgmt NONE
|
||||
|
||||
> enable_network 3
|
||||
|
||||
> save_config
|
||||
|
||||
...and for the impatient:
|
||||
|
||||
> sudo sv restart wpa_supplicant
|
||||
|
||||
## Scripts
|
||||
|
||||
You can script like this:
|
||||
|
||||
> wpa_cli add_network
|
||||
|
||||
That returns an ID, so you can say:
|
||||
|
||||
> newNetwork="$(wpa_cli add_network)"
|
||||
|
||||
Then `$newNetwork` would equal that number, and you can add/ remove networks with scripts.
|
||||
|
||||
But remember to escape the quotes, so adding a network would be:
|
||||
|
||||
> wpa_cli set_network 3 psk \""passphrase"\"
|
||||
|
||||
|
Reference in New Issue
Block a user