Last active
December 20, 2015 02:09
-
-
Save mebius01/6054482 to your computer and use it in GitHub Desktop.
Граббер для сайтика http://www.cuded.com
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#22.07.13 | |
echo "Введите адрес ссылки:" | |
read URL && | |
wget $URL && | |
MKDIR=`cat index.html | sed -n '/<title>/p' | cut -d'>' -f 2 | cut -d '|' -f1` | |
mkdir "$MKDIR" && | |
ECHO=`echo "$MKDIR"` && | |
CAT=`cat index.html | sed -n '/class="sdj_pinterest_wrap"><img src=/p' | sed 's/<div class="sdj_pinterest_wrap"><img src="//g' | sed 's/" alt=""/\n/g' | sed G | sed '/>/d' | sed '/^$/d'` | |
(cd "$ECHO" && for i in "$CAT" | |
do | |
wget $i | |
done) | |
rm index.html | |
echo "Все ok" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment