Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- # coded by shutdown57
- echo -n "Twitter : "
- read med
- echo "Loading ...."
- wget https://twitter.com/$med/media -O shutdown57.twitter.temp > /dev/null 2>&1
- echo "getting page media ... "
- sleep 1
- if [[ -f "shutdown57.twitter.temp" ]]; then
- lo=`cat shutdown57.twitter.temp | grep -Po "https:\/\/pbs.twimg.com\/media\/(.*)\.jpg"`
- n=1
- echo "Creating directory result ..."
- mkdir $med
- for tw in $lo
- do
- IFS="/" read -r -a img <<< "$tw"
- nama=${img[4]}
- if [[ -f $med/$nama ]]; then
- echo ""
- else
- echo "shutdown57 : "$tw" Downloading ... "
- wget $tw -O $med/$nama > /dev/null 2>&1
- if [[ -f $med/$nama ]]; then
- echo "shutdown57 : "$med"/"$nama" Saved !"
- fi
- fi
- done
- rm shutdown57.twitter.temp
- fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement