From 0d65feaf9db3142304ab419b86a2fb2e76737ee1 Mon Sep 17 00:00:00 2001 From: "duncan.parkes" Date: Wed, 4 Apr 2007 01:36:03 +0000 Subject: [PATCH] add torbay and peterborough --- trunk/CGI/Peterborough.cgi | 31 ++++++++++ trunk/CGI/PublicAccess.py | 64 --------------------- trunk/CGI/South Ribble.cgi | 31 ++++++++++ trunk/CGI/Torbay.cgi | 31 ++++++++++ trunk/python_scrapers/PublicAccess.py | 64 --------------------- trunk/python_scrapers/PublicAccessSites.csv | 3 + 6 files changed, 96 insertions(+), 128 deletions(-) create mode 100755 trunk/CGI/Peterborough.cgi create mode 100755 trunk/CGI/South Ribble.cgi create mode 100755 trunk/CGI/Torbay.cgi diff --git a/trunk/CGI/Peterborough.cgi b/trunk/CGI/Peterborough.cgi new file mode 100755 index 0000000..62634af --- /dev/null +++ b/trunk/CGI/Peterborough.cgi @@ -0,0 +1,31 @@ +#!/usr/bin/python + +# This is the parser for Peterborough City 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 = "Peterborough City Council" +authority_short_name = "Peterborough" +base_url = "http://194.72.246.15/publicaccess/dc/" + +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/trunk/CGI/PublicAccess.py b/trunk/CGI/PublicAccess.py index eaa8083..460ad10 100644 --- a/trunk/CGI/PublicAccess.py +++ b/trunk/CGI/PublicAccess.py @@ -340,67 +340,3 @@ class PublicAccessPropertyPageParser(HTMLParser.HTMLParser): self.postcode = value -# These still don't work: - -# Perthshire -#http://193.63.61.22/publicaccess/tdc/DcApplication/application_searchform.aspx -#"Perth and Kinross Council", "Perthshire", "http://193.63.61.22/publicaccess/tdc/" - -# These ones give sensible results in a browser, -# but are always empty for my script... -#http://planning.hambleton.gov.uk/publicaccess/tdc/DcApplication/application_searchform.aspx -#"Hambleton District Council", "Hambleton", "http://planning.hambleton.gov.uk/publicaccess/tdc/" -#"Newcastle City Council", "Newcastle", "http://gispublic.newcastle.gov.uk/publicaccess/dc/" -#"City of Durham Council", "Durham", "http://publicaccess.durhamcity.gov.uk/publicaccess/dc/" -#"Selby District Council", "Selby", "http://publicaccess.selby.gov.uk/publicaccess/dc/" - - -# 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. - -# Newham -# doesn't seem to work currently -# http://pacaps.newham.gov.uk/publicaccess/ - -# Stratford -# http://217.33.198.119/publicaccess/default.aspx -# Doesn't seem to work currently - -# Watford -#http://ww3.watford.gov.uk/publicaccess/system_error.aspx?aspxerrorpath=/publicaccess/tdc/tdc_home.aspx -# Doesn't seem to work currently - -# Teignbridge -#http://213.152.63.161/publicaccess/tdc/tdc_home.aspx -# Doesn't seem to work currently - -# Gravesham seems to be broken -#"Gravesham Borough Council", "Gravesham", "http://195.102.67.4/PublicAccess/tdc/" - -# Manchester -# Missing the main menu on the left. -#http://www.publicaccess.manchester.gov.uk/publicaccess/tdc/tdc_home.aspx - -#Bracknell Forest - has an error -#https://my.bracknell-forest.gov.uk/publicaccess/tdc/tdc_home.aspx - -# Redditch -# Gives an error -# http://access.redditchbc.gov.uk/publicaccess/tdc/tdc_home.aspx - -# Stirling -# Gives an error -#http://planpub.stirling.gov.uk/publicaccess/tdc/tdc_home.aspx - -# These use https: - -# Chiltern -#https://isa.chiltern.gov.uk/publicaccess/tdc/tdc_home.aspx -# Hinckley-Bosworth -#https://cx.hinckley-bosworth.gov.uk/PublicAccess/dc/DcApplication/application_searchform.aspx diff --git a/trunk/CGI/South Ribble.cgi b/trunk/CGI/South Ribble.cgi new file mode 100755 index 0000000..7eb76d0 --- /dev/null +++ b/trunk/CGI/South Ribble.cgi @@ -0,0 +1,31 @@ +#!/usr/bin/python + +# This is the parser for South Ribble 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 = "South Ribble Borough Council" +authority_short_name = "South Ribble" +base_url = "http://publicaccess.southribble.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/trunk/CGI/Torbay.cgi b/trunk/CGI/Torbay.cgi new file mode 100755 index 0000000..83c14af --- /dev/null +++ b/trunk/CGI/Torbay.cgi @@ -0,0 +1,31 @@ +#!/usr/bin/python + +# This is the parser for Torbay 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 = "Torbay Council" +authority_short_name = "Torbay" +base_url = "http://www.torbay.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/trunk/python_scrapers/PublicAccess.py b/trunk/python_scrapers/PublicAccess.py index eaa8083..460ad10 100644 --- a/trunk/python_scrapers/PublicAccess.py +++ b/trunk/python_scrapers/PublicAccess.py @@ -340,67 +340,3 @@ class PublicAccessPropertyPageParser(HTMLParser.HTMLParser): self.postcode = value -# These still don't work: - -# Perthshire -#http://193.63.61.22/publicaccess/tdc/DcApplication/application_searchform.aspx -#"Perth and Kinross Council", "Perthshire", "http://193.63.61.22/publicaccess/tdc/" - -# These ones give sensible results in a browser, -# but are always empty for my script... -#http://planning.hambleton.gov.uk/publicaccess/tdc/DcApplication/application_searchform.aspx -#"Hambleton District Council", "Hambleton", "http://planning.hambleton.gov.uk/publicaccess/tdc/" -#"Newcastle City Council", "Newcastle", "http://gispublic.newcastle.gov.uk/publicaccess/dc/" -#"City of Durham Council", "Durham", "http://publicaccess.durhamcity.gov.uk/publicaccess/dc/" -#"Selby District Council", "Selby", "http://publicaccess.selby.gov.uk/publicaccess/dc/" - - -# 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. - -# Newham -# doesn't seem to work currently -# http://pacaps.newham.gov.uk/publicaccess/ - -# Stratford -# http://217.33.198.119/publicaccess/default.aspx -# Doesn't seem to work currently - -# Watford -#http://ww3.watford.gov.uk/publicaccess/system_error.aspx?aspxerrorpath=/publicaccess/tdc/tdc_home.aspx -# Doesn't seem to work currently - -# Teignbridge -#http://213.152.63.161/publicaccess/tdc/tdc_home.aspx -# Doesn't seem to work currently - -# Gravesham seems to be broken -#"Gravesham Borough Council", "Gravesham", "http://195.102.67.4/PublicAccess/tdc/" - -# Manchester -# Missing the main menu on the left. -#http://www.publicaccess.manchester.gov.uk/publicaccess/tdc/tdc_home.aspx - -#Bracknell Forest - has an error -#https://my.bracknell-forest.gov.uk/publicaccess/tdc/tdc_home.aspx - -# Redditch -# Gives an error -# http://access.redditchbc.gov.uk/publicaccess/tdc/tdc_home.aspx - -# Stirling -# Gives an error -#http://planpub.stirling.gov.uk/publicaccess/tdc/tdc_home.aspx - -# These use https: - -# Chiltern -#https://isa.chiltern.gov.uk/publicaccess/tdc/tdc_home.aspx -# Hinckley-Bosworth -#https://cx.hinckley-bosworth.gov.uk/PublicAccess/dc/DcApplication/application_searchform.aspx diff --git a/trunk/python_scrapers/PublicAccessSites.csv b/trunk/python_scrapers/PublicAccessSites.csv index 3e3daf4..c028fa0 100644 --- a/trunk/python_scrapers/PublicAccessSites.csv +++ b/trunk/python_scrapers/PublicAccessSites.csv @@ -48,3 +48,6 @@ "South Bucks District Council", "South Bucks", "http://sbdc-paweb.southbucks.gov.uk/publicaccess/tdc/" "Malvern Hills District Council", "Malvern Hills", "http://public.malvernhills.gov.uk/publicaccess/tdc/" "West Lancashire District Council", "West Lancashire", "http://publicaccess.westlancsdc.gov.uk/PublicAccess/tdc/" +"Torbay Council", "Torbay", "http://www.torbay.gov.uk/publicaccess/tdc/" +"South Ribble Borough Council", "South Ribble", "http://publicaccess.southribble.gov.uk/publicaccess/tdc/" +"Peterborough City Council", "Peterborough", "http://194.72.246.15/publicaccess/dc/"