mirror of
https://github.com/CoolnsX/repos_scripts.git
synced 2025-12-20 07:15:20 +05:30
Refactored configuration.
This commit is contained in:
2
download
2
download
@@ -89,7 +89,7 @@ case "$link" in
|
||||
\"racyCheckOk\": true
|
||||
}"
|
||||
# main source
|
||||
video_url=$(curl -X POST -A "$agent" -s "https://www.youtube.com/youtubei/v1/player?key=AIzaSyAO_FJ2SlqU8Q4STEHLGCilw_Y9_11qcW8&prettyPrint=false" -H "content-type:application/json" -d "$json" -e "$link" | tr '{}' '\n' | tee data | sed -nE 's|.*,"title":"([^"]*)".*|\tout=\1\.mp4|p;s|.*itag":18,"url":"([^"]*)".*|\1|p;s|.*itag":22,"url":"([^"]*)".*|\1|p' | tail -2)
|
||||
video_url=$(curl -X POST -A "$agent" -s "https://www.youtube.com/youtubei/v1/player?key=AIzaSyAO_FJ2SlqU8Q4STEHLGCilw_Y9_11qcW8&prettyPrint=false" -H "content-type:application/json" -d "$json" -e "$link" | tr '{}' '\n' | sed -nE 's|.*,"title":"([^"]*)".*|\tout=\1\.mp4|p;s|.*itag":18,"url":"([^"]*)".*|\1|p;s|.*itag":22,"url":"([^"]*)".*|\1|p' | tail -2)
|
||||
# fallback source
|
||||
printf "%s" "$video_url" | grep -q "googlevideo\.com" || fallback=1
|
||||
;;
|
||||
|
||||
Reference in New Issue
Block a user