From 91dc6ca8e1ea05792b81a058efd02fccab7b2346 Mon Sep 17 00:00:00 2001 From: "duncan.parkes" Date: Tue, 3 Apr 2007 21:39:29 +0000 Subject: [PATCH] adding waveney --- CGI/Doncaster.cgi | 31 +++++++++++++++++++++++++++ CGI/PublicAccess.py | 9 ++++++++ CGI/Waveney.cgi | 31 +++++++++++++++++++++++++++ python_scrapers/PublicAccess.py | 9 ++++++++ python_scrapers/PublicAccessSites.csv | 4 ++-- python_scrapers/createCGI.sh | 4 ++-- 6 files changed, 84 insertions(+), 4 deletions(-) create mode 100755 CGI/Doncaster.cgi create mode 100755 CGI/Waveney.cgi diff --git a/CGI/Doncaster.cgi b/CGI/Doncaster.cgi new file mode 100755 index 0000000..21cf229 --- /dev/null +++ b/CGI/Doncaster.cgi @@ -0,0 +1,31 @@ +#!/usr/bin/python + +# This is the parser for Doncaster Metropolitan Borough Council. +# it is generated from the file CGITemplate + +import cgi +import cgitb +#cgitb.enable(display=0, logdir="/tmp") + + +form = cgi.FieldStorage() +day = form.getfirst('day') +month = form.getfirst('month') +year = form.getfirst('year') + + +authority_name = "Doncaster Metropolitan Borough Council" +authority_short_name = "Doncaster" +base_url = "http://maps.doncaster.gov.uk/publicaccess/tdc/" + +import PublicAccess + +parser = PublicAccess.PublicAccessParser(authority_name, + authority_short_name, + base_url) + +xml = parser.getResults(day, month, year) + +print "Content-Type: text/xml" # XML is following +print +print xml # print the xml diff --git a/CGI/PublicAccess.py b/CGI/PublicAccess.py index b7873ac..bf1aea0 100644 --- a/CGI/PublicAccess.py +++ b/CGI/PublicAccess.py @@ -350,6 +350,15 @@ class PublicAccessPropertyPageParser(HTMLParser.HTMLParser): #http://planning.hambleton.gov.uk/publicaccess/tdc/DcApplication/application_searchform.aspx #"Hambleton District Council", "Hambleton", "http://planning.hambleton.gov.uk/publicaccess/tdc/" +# Bromley +# http://83.244.199.114/publicaccess/ +# looks like it might be a PublicAccess site, but limits users to IE. +# Not fooled by setting the browser identifer in konqueror... + +# West Berkshire +#http://ww2.westberks.gov.uk/publicaccess/tdc/tdc_home.aspx +# Displays an error message. + # These use https: # Chiltern diff --git a/CGI/Waveney.cgi b/CGI/Waveney.cgi new file mode 100755 index 0000000..f5b7b18 --- /dev/null +++ b/CGI/Waveney.cgi @@ -0,0 +1,31 @@ +#!/usr/bin/python + +# This is the parser for Waveney District Council. +# it is generated from the file CGITemplate + +import cgi +import cgitb +#cgitb.enable(display=0, logdir="/tmp") + + +form = cgi.FieldStorage() +day = form.getfirst('day') +month = form.getfirst('month') +year = form.getfirst('year') + + +authority_name = "Waveney District Council" +authority_short_name = "Waveney" +base_url = "http://publicaccess.waveney.gov.uk/PublicAccess/tdc/" + +import PublicAccess + +parser = PublicAccess.PublicAccessParser(authority_name, + authority_short_name, + base_url) + +xml = parser.getResults(day, month, year) + +print "Content-Type: text/xml" # XML is following +print +print xml # print the xml diff --git a/python_scrapers/PublicAccess.py b/python_scrapers/PublicAccess.py index b7873ac..bf1aea0 100644 --- a/python_scrapers/PublicAccess.py +++ b/python_scrapers/PublicAccess.py @@ -350,6 +350,15 @@ class PublicAccessPropertyPageParser(HTMLParser.HTMLParser): #http://planning.hambleton.gov.uk/publicaccess/tdc/DcApplication/application_searchform.aspx #"Hambleton District Council", "Hambleton", "http://planning.hambleton.gov.uk/publicaccess/tdc/" +# Bromley +# http://83.244.199.114/publicaccess/ +# looks like it might be a PublicAccess site, but limits users to IE. +# Not fooled by setting the browser identifer in konqueror... + +# West Berkshire +#http://ww2.westberks.gov.uk/publicaccess/tdc/tdc_home.aspx +# Displays an error message. + # These use https: # Chiltern diff --git a/python_scrapers/PublicAccessSites.csv b/python_scrapers/PublicAccessSites.csv index 71481f7..966d235 100644 --- a/python_scrapers/PublicAccessSites.csv +++ b/python_scrapers/PublicAccessSites.csv @@ -34,5 +34,5 @@ "Kerrier District Council", "Kerrier", "http://publicaccess.kerrier.gov.uk/publicaccess/tdc/" "Oswestry Borough Council", "Oswestry", "http://193.114.205.78/PublicAccess/tdc/" "Stockton-On-Tees Borough Council", "Stockton-On-Tees", "http://www.developmentcontrol.stockton.gov.uk/publicaccess/tdc/" - - +"Doncaster Metropolitan Borough Council", "Doncaster", "http://maps.doncaster.gov.uk/publicaccess/tdc/" +"Waveney District Council", "Waveney", "http://publicaccess.waveney.gov.uk/PublicAccess/tdc/" diff --git a/python_scrapers/createCGI.sh b/python_scrapers/createCGI.sh index 28c9a95..4bf7f4c 100755 --- a/python_scrapers/createCGI.sh +++ b/python_scrapers/createCGI.sh @@ -8,7 +8,7 @@ python generateCGIScripts.py svn add ../CGI/* -echo Committing changes to svn -(cd ../CGI ; svn commit -m "Removing and regenerating CGI directory") +#echo Committing changes to svn +#(cd ../CGI ; svn commit -m "Removing and regenerating CGI directory") echo Done