diff --git a/get.sh b/get.sh old mode 100644 new mode 100755 index 940909d..21be6b1 --- a/get.sh +++ b/get.sh @@ -8,18 +8,19 @@ # Adrian Short 26 Feb 2016 COOKIEJAR=cookiejar.txt +BASEURL=https://fastweb.sutton.gov.uk/fastweb mkdir -p $1 cd $1 -curl -s -c $COOKIEJAR 'http://gis.sutton.gov.uk/FASTWEB/welcome.asp' > /dev/null # Get the session cookies +curl -s -c $COOKIEJAR "$BASEURL/welcome.asp" > /dev/null # Get the session cookies curl -s -c $COOKIEJAR \ --data "cbxCopyrightStatement=on" \ --data "ApplicationNumber=$1" \ - 'http://gis.sutton.gov.uk/FASTWEB/images.asp' \ + "$BASEURL/images.asp" \ | grep -E -o 'http.+?\.(pdf|PDF)' \ - | wget --no-clobber -i - + | wget --no-check-certificate --no-clobber -i - rm $COOKIEJAR ls -lht