Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- clear
- ########################################################################################
- useragent="Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:61.0) Gecko/20100101 Firefox/61.0"
- ########################################################################################
- ############ HOST #############
- URL="https://www.instagram.com"
- ###############################
- banner(){
- printf "INSTAGRAM IMAGE DOWNLOADER\n"
- }
- main(){
- read -p "Input Username : " user;
- get_vid
- }
- get_vid(){
- valid=$(curl -s -L -A "${useragent}" "${URL}/${user}/")
- if [[ $valid =~ "The link you followed may be broken" ]]; then
- printf "Username Not Found \n"
- elif [[ $valid =~ "Get the app." ]] || [[ $valid =~ "Don't have an account? Sign up" ]] || [[ $valid =~ "Get the app." ]]; then
- printf "Usename Not Found \n"
- elif [[ $valid =~ '"is_private":true' ]]; then
- printf "This user is private \n"
- else
- printf "Username Found: ${user} \n"
- printf "Downloading Image . . . \n"
- mkdir image-$user
- sleep 2
- curl -s -L -A "${useragent}" "${URL}/${user}/" | grep -Po '(?<="display_url":")[^",]*' >> img.lst
- for dl in $(cat img.lst)
- do
- wget $dl -P image-$user &> /dev/null
- done
- printf "Images Of ${user} Have Been Downloaded . . .\n"
- fi
- }
- banner
- main
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement