not really known
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

28 行
871 B

  1. #!/usr/bin/env sh
  2. # Download PDF files for a planning application from Sutton Council planning website
  3. # If you run this more than once it'll only download the new files uploaded for that application.
  4. # Usage: $ get.sh <application number>, e.g. $ get.sh B2015/71962
  5. # Install curl and wget before use. Mac users can install them with Homebrew.
  6. # Windows users: Try running this in Cygwin or install Linux in a virtual machine.
  7. # Adrian Short 26 Feb 2016
  8. COOKIEJAR=cookiejar.txt
  9. BASEURL=https://fastweb.sutton.gov.uk/fastweb
  10. mkdir -p $1
  11. cd $1
  12. curl -s -c $COOKIEJAR "$BASEURL/welcome.asp" > /dev/null # Get the session cookies
  13. curl -s -c $COOKIEJAR \
  14. --data "cbxCopyrightStatement=on" \
  15. --data "ApplicationNumber=$1" \
  16. "$BASEURL/images.asp" \
  17. | grep -E -o 'http.+?\.(pdf|PDF)' \
  18. | wget --no-check-certificate --no-clobber -i -
  19. rm $COOKIEJAR
  20. ls -lht
  21. cd -