* more ytdlp
This commit is contained in:
parent
8efd5e6434
commit
11dfe8685a
|
@ -44,14 +44,14 @@ if [[ "${get_data[v]}" ]]; then
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
cd temp
|
cd temp
|
||||||
video=$(haruhi-dl --all-subs --ie-key Youtube --write-pages --cookies "${cfg[_cookies]}" -J "http://youtube.com/watch?v=${get_data[v]}")
|
video=$(yt-dlp --all-subs --write-pages --cookies "${cfg[_cookies]}" -J "http://youtube.com/watch?v=${get_data[v]}")
|
||||||
if [[ $video == '' ]]; then # okay who did this
|
if [[ $video == '' ]]; then # okay who did this
|
||||||
random_hash=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 24 | head -n 1)
|
random_hash=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 24 | head -n 1)
|
||||||
video=$(yt-dlp --all-subs --write-pages --cookies ${cfg[_cookies]} -J "http://youtube.com/watch?v=${get_data[v]}" 2> output$random_hash.log)
|
video=$(yt-dlp --all-subs --write-pages --cookies ${cfg[_cookies]} -J "http://youtube.com/watch?v=${get_data[v]}" 2> output$random_hash.log)
|
||||||
if [[ $video == '' ]]; then # seriously WHO DID THIS
|
if [[ $video == '' ]]; then # seriously WHO DID THIS
|
||||||
if [[ "${cfg[regionlock_proxy]}" == true ]]; then
|
if [[ "${cfg[regionlock_proxy]}" == true ]]; then
|
||||||
# retrying w/ proxy!
|
# retrying w/ proxy!
|
||||||
video=$(haruhi-dl --all-subs --ie-key Youtube --write-pages --cookies ${cfg[_cookies]} --proxy "${cfg[regionlock_proxy_url]}" -J "http://youtube.com/watch?v=${get_data[v]}" 2> output$random_hash.log)
|
video=$(yt-dlp --all-subs --write-pages --cookies ${cfg[_cookies]} --proxy "${cfg[regionlock_proxy_url]}" -J "http://youtube.com/watch?v=${get_data[v]}" 2> output$random_hash.log)
|
||||||
fi
|
fi
|
||||||
output=$(cat output$random_hash.log)
|
output=$(cat output$random_hash.log)
|
||||||
rm output$random_hash.log
|
rm output$random_hash.log
|
||||||
|
|
Loading…
Reference in a new issue