mirror of
https://github.com/CoolnsX/repos_scripts.git
synced 2025-12-20 07:15:20 +05:30
Never gonna run around and desert you
This commit is contained in:
2
download
2
download
@@ -54,7 +54,7 @@ case "$link" in
|
||||
# main source
|
||||
video_url=$(curl -s "https://i.instagram.com/api/v1/web/get_ruling_for_content/?content_type=MEDIA&target_id=$res" -H "x-ig-app-id:936619743392459" -H "x-ig-www-claim:0" -A "$agent" -c - -o /dev/null | curl -A "$agent" -s -G "https://www.instagram.com/graphql/query/" -H "content-type:application/json" --data-urlencode 'query_hash=9f8827793ef34641b2fb195d4d41151c' --data-urlencode 'variables={"shortcode":"'"$id"'","include_reel":false,"include_logged_out":false}' -e "$link" -b - | tr '{}' '\n' | sed -nE 's|.*video_url":"([^"]*)".*|\1|p' | sed 's/\u0026/\&/g;s/\\//g')
|
||||
# alternate source
|
||||
! printf "%s" "$video_url" | grep -qE 'instagram.*mp4' && info "Using Alternate Site" "Instagram" "$2" && video_url=$(curl -s 'https://snapinsta.net/download.php' --compressed -X POST -H 'User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:131.0) Gecko/20100101 Firefox/131.0' -H 'Referer: https://snapinsta.net/' -H 'Content-Type: application/x-www-form-urlencoded' -H 'Accept-Encoding: gzip, deflate, br, zstd' --data-urlencode "url=$1" | sed 's/\\//g;s/\&/\&/g' | sed -nE 's|.*><a href="([^"]*)" .*|\1|p')
|
||||
! printf "%s" "$video_url" | grep -qE 'instagram.*mp4' && info "Using Alternate Site" "Instagram" "$id" && video_url=$(curl -s 'https://snapinsta.net/download.php' --compressed -X POST -H 'User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:131.0) Gecko/20100101 Firefox/131.0' -H 'Referer: https://snapinsta.net/' -H 'Content-Type: application/x-www-form-urlencoded' -H 'Accept-Encoding: gzip, deflate, br, zstd' --data-urlencode "url=$1" | sed 's/\\//g;s/\&/\&/g' | sed -nE 's|.*><a href="([^"]*)" .*|\1|p')
|
||||
#fallback source that is yt-dlp
|
||||
[ -z "$video_url" ] && fallback=1
|
||||
;;
|
||||
|
||||
Reference in New Issue
Block a user