Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- !/bin/bash
- echo Downloading all maps from pctmap.net...
- echo This may take a few minutes depending on your internet connection...
- # Declare variables
- # Create directories
- mkdir $1
- mkdir $2
- # Change to first directory
- cd $1/
- # Prepare download
- wget https://www.pctmap.net/maps/
- grep -Po '(?<=href="https://www.pctmap.net/wp-content/uploads)[^"]*' index.html > $1.txt
- # Download maps
- input="$1.txt"
- while IFS= read -r line
- do
- wget https://www.pctmap.net/wp-content/uploads$line
- done < "$input"
- #Unzip maps (remove a duplicate before)
- rm *.1
- unzip "*.zip"
- # Cleanup
- rm index.html $1.txt *.zip
- # Change to second directory
- cd ../$2
- # Prepare download
- wget https://www.pctmap.net/maps-url-loading/
- grep -Po '(?<=href="https://www.pctmap.net/wp-content/uploads)[^"]*' index.html > $2.txt
- # Download
- input="$2.txt"
- while IFS= read -r line
- do
- wget https://www.pctmap.net/wp-content/uploads$line
- done < "$input"
- # Cleanup
- rm index.html $2.txt *.1
- echo Done! Enjoy your maps
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement