Skip to content

Instantly share code, notes, and snippets.

@alexeyev
Created May 3, 2020 18:57
Show Gist options
  • Save alexeyev/79823b8e8f02b3200dc9cc0f16d77e33 to your computer and use it in GitHub Desktop.
Save alexeyev/79823b8e8f02b3200dc9cc0f16d77e33 to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
i=1
END=100000
mkdir export
while [ $i -le $END ]; do
echo "Dealing with company #"$i
mkdir export/$i
wget "http://ruexport.org/rus_export_catalog/?action=showuser&id=$i" \
-O export/$i/rus.html \
--user-agent="Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0"
sleep $[ ( $RANDOM % 3 ) + 1 ]s
wget "http://ruexport.org/eng/rus_export_catalog/?action=showuser&id=$i" \
-O export/$i/eng.html \
--user-agent="Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0"
sleep $[ ( $RANDOM % 3 ) + 1 ]s
# wget "http://ruexport.org/de/rus_export_catalog/?action=showuser&id=$i" \
# -O export/$i/deu.html \
# --user-agent="Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0"
# sleep $[ ( $RANDOM % 3 ) + 1 ]s
#
#
# wget "http://ruexport.org/frn/rus_export_catalog/?action=showuser&id=$i" \
# -O export/$i/fra.html \
# --user-agent="Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0"
# sleep $[ ( $RANDOM % 3 ) + 1 ]s
#
#
# wget "http://ruexport.org/es/rus_export_catalog/?action=showuser&id=$i" \
# -O export/$i/esp.html \
# --user-agent="Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0"
# sleep $[ ( $RANDOM % 3 ) + 1 ]s
#
# wget "http://ruexport.org/it/rus_export_catalog/?action=showuser&id=$i" \
# -O export/$i/ita.html \
# --user-agent="Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0"
# sleep $[ ( $RANDOM % 3 ) + 1 ]s
#
# wget "http://ruexport.org/pt/rus_export_catalog/?action=showuser&id=$i" \
# -O export/$i/por.html \
# --user-agent="Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0"
# sleep $[ ( $RANDOM % 3 ) + 1 ]s
#
# wget "http://ruexport.org/chn/rus_export_catalog/?action=showuser&id=$i" \
# -O export/$i/zh.html \
# --user-agent="Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0"
# sleep $[ ( $RANDOM % 3 ) + 1 ]s
i=$(($i+1))
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment