Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save xdegtyarev/4b2808c6fb768969618a3c7560866264 to your computer and use it in GitHub Desktop.
Save xdegtyarev/4b2808c6fb768969618a3c7560866264 to your computer and use it in GitHub Desktop.
vk docs grabber script
#!/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