Created
May 10, 2018 22:50
-
-
Save xdegtyarev/4b2808c6fb768969618a3c7560866264 to your computer and use it in GitHub Desktop.
vk docs grabber script
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/sh | |
id=? | |
start=100000000 | |
end=999999999 | |
for (( n=$start; n<$end; n++ )); do | |
if (curl -s https://vk.com/doc"$id"_"$n" | grep -q "msg_back_button"); | |
then | |
echo "$n" | tee grabber.out | |
else | |
echo "https://vk.com/doc"$id"_"$n" doesn't contain error, saving to doc"$id"_"$n".html" | |
curl -s https://vk.com/doc"$id"_"$n" -o doc"$id"_"$n".html | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment