Created
May 3, 2020 18:57
-
-
Save alexeyev/79823b8e8f02b3200dc9cc0f16d77e33 to your computer and use it in GitHub Desktop.
This file contains 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
#!/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