Skip to content

Instantly share code, notes, and snippets.

@maximal
Created November 28, 2016 12:58
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 maximal/61cea54c7a33cbed2723b975bcef1079 to your computer and use it in GitHub Desktop.
Save maximal/61cea54c7a33cbed2723b975bcef1079 to your computer and use it in GitHub Desktop.
oboobs.ru picture dumper
#!/bin/sh
##
# Скрипт сбора всех картинок с сайта oboobs.ru.
#
# @date 2013-11-07
# @author MaximAL
# @copyright © MaximAL, Sijeko 2013
##
lastId=`wget -q -O - oboobs.ru | grep -P -e '<div id="boobs\d+" class="imagebox">' -m 1 | grep -o -P -e '\d+'`
echo Last picture id is $lastId. "\n"
mkdir -p picdump
cd picdump
for id in `seq 1 $lastId`; do
filename=`printf %05d $id`.jpg
echo $filename
if [ ! -f $filename ]; then
wget "http://media.oboobs.ru/boobs/$filename"
if [ $? = 0 ]; then
sleep 2
else
sleep 1
fi
else
echo 'file exists'
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment