diff --git a/CGI/Angus.cgi b/CGI/Angus.cgi index 0e9d3c0..0b56562 100755 --- a/CGI/Angus.cgi +++ b/CGI/Angus.cgi @@ -16,7 +16,7 @@ year = form.getfirst('year') authority_name = "Angus Council" authority_short_name = "Angus" -base_url = "http://planning.angus.gov.uk/PublicAccess/" +base_url = "http://planning.angus.gov.uk/PublicAccess/tdc/" import PublicAccess diff --git a/CGI/Basildon.cgi b/CGI/Basildon.cgi index 0443765..0220a1c 100755 --- a/CGI/Basildon.cgi +++ b/CGI/Basildon.cgi @@ -16,7 +16,7 @@ year = form.getfirst('year') authority_name = "Basildon District Council" authority_short_name = "Basildon" -base_url = "http://planning.basildon.gov.uk/publicaccess/" +base_url = "http://planning.basildon.gov.uk/publicaccess/tdc/" import PublicAccess diff --git a/CGI/Bath.cgi b/CGI/Bath.cgi index ab482af..cf48dc8 100755 --- a/CGI/Bath.cgi +++ b/CGI/Bath.cgi @@ -16,7 +16,7 @@ year = form.getfirst('year') authority_name = "Bath and North East Somerset" authority_short_name = "Bath" -base_url = "http://planning.bathnes.gov.uk/publicaccess/" +base_url = "http://planning.bathnes.gov.uk/publicaccess/tdc/" import PublicAccess diff --git a/CGI/Bexley.cgi b/CGI/Bexley.cgi index 6524777..04065a6 100755 --- a/CGI/Bexley.cgi +++ b/CGI/Bexley.cgi @@ -16,7 +16,7 @@ year = form.getfirst('year') authority_name = "Bexley Council" authority_short_name = "Bexley" -base_url = "http://publicaccess.bexley.gov.uk/publicaccess/" +base_url = "http://publicaccess.bexley.gov.uk/publicaccess/tdc/" import PublicAccess diff --git a/CGI/Blaby.cgi b/CGI/Blaby.cgi index 8c3aba4..ceb955e 100755 --- a/CGI/Blaby.cgi +++ b/CGI/Blaby.cgi @@ -16,7 +16,7 @@ year = form.getfirst('year') authority_name = "Blaby District Council" authority_short_name = "Blaby" -base_url = "http://www.blaby.gov.uk/PublicAccess/" +base_url = "http://www.blaby.gov.uk/PublicAccess/tdc/" import PublicAccess diff --git a/CGI/Bristol.cgi b/CGI/Bristol.cgi index fae3e76..cc89aa3 100755 --- a/CGI/Bristol.cgi +++ b/CGI/Bristol.cgi @@ -16,7 +16,7 @@ year = form.getfirst('year') authority_name = "Bristol City Council" authority_short_name = "Bristol" -base_url = "http://e2eweb.bristol-city.gov.uk/publicaccess/" +base_url = "http://e2eweb.bristol-city.gov.uk/publicaccess/tdc/" import PublicAccess diff --git a/CGI/Buckinghamshire.cgi b/CGI/Buckinghamshire.cgi index 9c431c0..6033489 100755 --- a/CGI/Buckinghamshire.cgi +++ b/CGI/Buckinghamshire.cgi @@ -16,7 +16,7 @@ year = form.getfirst('year') authority_name = "Buckinghamshire County Council" authority_short_name = "Buckinghamshire" -base_url = "http://www.bucksplanning.gov.uk/PublicAccess/" +base_url = "http://www.bucksplanning.gov.uk/PublicAccess/tdc/" import PublicAccess diff --git a/CGI/Cherwell.cgi b/CGI/Cherwell.cgi index 116d63d..9673334 100755 --- a/CGI/Cherwell.cgi +++ b/CGI/Cherwell.cgi @@ -16,7 +16,7 @@ year = form.getfirst('year') authority_name = "Cherwell District Council" authority_short_name = "Cherwell" -base_url = "http://cherweb.cherwell-dc.gov.uk/publicaccess/" +base_url = "http://cherweb.cherwell-dc.gov.uk/publicaccess/tdc/" import PublicAccess diff --git a/CGI/East Devon.cgi b/CGI/East Devon.cgi index 581d1e8..0b2d4d9 100755 --- a/CGI/East Devon.cgi +++ b/CGI/East Devon.cgi @@ -16,7 +16,7 @@ year = form.getfirst('year') authority_name = "East Devon District Council" authority_short_name = "East Devon" -base_url = "http://planning.eastdevon.gov.uk/PublicAccess/" +base_url = "http://planning.eastdevon.gov.uk/PublicAccess/tdc/" import PublicAccess diff --git a/CGI/Edinburgh.cgi b/CGI/Edinburgh.cgi new file mode 100755 index 0000000..72b2c79 --- /dev/null +++ b/CGI/Edinburgh.cgi @@ -0,0 +1,31 @@ +#!/usr/bin/python + +# This is the parser for The City of Edinburgh 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 = "The City of Edinburgh Council" +authority_short_name = "Edinburgh" +base_url = "http://citydev-portal.edinburgh.gov.uk/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/CGI/Fenland.cgi b/CGI/Fenland.cgi new file mode 100755 index 0000000..478db95 --- /dev/null +++ b/CGI/Fenland.cgi @@ -0,0 +1,31 @@ +#!/usr/bin/python + +# This is the parser for Fenland 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 = "Fenland District Council" +authority_short_name = "Fenland" +base_url = "http://www.fenland.gov.uk/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/CGI/Hart.cgi b/CGI/Hart.cgi index 0c744eb..abd286f 100755 --- a/CGI/Hart.cgi +++ b/CGI/Hart.cgi @@ -16,7 +16,7 @@ year = form.getfirst('year') authority_name = "Hart District Council" authority_short_name = "Hart" -base_url = "http://publicaccess.hart.gov.uk/publicaccess/" +base_url = "http://publicaccess.hart.gov.uk/publicaccess/tdc/" import PublicAccess diff --git a/CGI/Huntingdonshire.cgi b/CGI/Huntingdonshire.cgi index 40035a8..93d6acf 100755 --- a/CGI/Huntingdonshire.cgi +++ b/CGI/Huntingdonshire.cgi @@ -16,7 +16,7 @@ year = form.getfirst('year') authority_name = "Huntingdonshire District Council" authority_short_name = "Huntingdonshire" -base_url = "http://planning.huntsdc.gov.uk/publicaccess/" +base_url = "http://planning.huntsdc.gov.uk/publicaccess/tdc/" import PublicAccess diff --git a/CGI/Lancaster.cgi b/CGI/Lancaster.cgi index 95e3357..a9a1a2e 100755 --- a/CGI/Lancaster.cgi +++ b/CGI/Lancaster.cgi @@ -16,7 +16,7 @@ year = form.getfirst('year') authority_name = "Lancaster City Council" authority_short_name = "Lancaster" -base_url = "http://planapps.lancaster.gov.uk/PublicAccess/" +base_url = "http://planapps.lancaster.gov.uk/PublicAccess/tdc/" import PublicAccess diff --git a/CGI/Luton.cgi b/CGI/Luton.cgi index 894e99e..251d2c6 100755 --- a/CGI/Luton.cgi +++ b/CGI/Luton.cgi @@ -16,7 +16,7 @@ year = form.getfirst('year') authority_name = "Luton Borough Council" authority_short_name = "Luton" -base_url = "http://www.eplan.luton.gov.uk/PublicAccess/" +base_url = "http://www.eplan.luton.gov.uk/PublicAccess/tdc/" import PublicAccess diff --git a/CGI/Mid Devon.cgi b/CGI/Mid Devon.cgi index a49bbb4..0f7580e 100755 --- a/CGI/Mid Devon.cgi +++ b/CGI/Mid Devon.cgi @@ -16,7 +16,7 @@ year = form.getfirst('year') authority_name = "Mid Devon District Council" authority_short_name = "Mid Devon" -base_url = "http://planning.middevon.gov.uk/publicaccess/" +base_url = "http://planning.middevon.gov.uk/publicaccess/tdc/" import PublicAccess diff --git a/CGI/Oadby and Wigston.cgi b/CGI/Oadby and Wigston.cgi index 196c047..fd7e55d 100755 --- a/CGI/Oadby and Wigston.cgi +++ b/CGI/Oadby and Wigston.cgi @@ -16,7 +16,7 @@ year = form.getfirst('year') authority_name = "The Borough of Oadby and Wigston" authority_short_name = "Oadby and Wigston" -base_url = "http://web.owbc.net/PublicAccess/" +base_url = "http://web.owbc.net/PublicAccess/tdc/" import PublicAccess diff --git a/CGI/Portsmouth.cgi b/CGI/Portsmouth.cgi index 1fe91cc..114b3c7 100755 --- a/CGI/Portsmouth.cgi +++ b/CGI/Portsmouth.cgi @@ -16,7 +16,7 @@ year = form.getfirst('year') authority_name = "Portsmouth City Council" authority_short_name = "Portsmouth" -base_url = "http://planning.portsmouth.gov.uk/PublicAccess/" +base_url = "http://planning.portsmouth.gov.uk/PublicAccess/tdc/" import PublicAccess diff --git a/CGI/PublicAccess.py b/CGI/PublicAccess.py index db635be..b7873ac 100644 --- a/CGI/PublicAccess.py +++ b/CGI/PublicAccess.py @@ -13,9 +13,9 @@ cookie_jar = cookielib.CookieJar() from PlanningUtils import fixNewlines, PlanningAuthorityResults, PlanningApplication -search_form_url_end = "tdc/DcApplication/application_searchform.aspx" -search_results_url_end = "tdc/DcApplication/application_searchresults.aspx" -comments_url_end = "tdc/DcApplication/application_comments_entryform.aspx" +search_form_url_end = "DcApplication/application_searchform.aspx" +search_results_url_end = "DcApplication/application_searchresults.aspx" +comments_url_end = "DcApplication/application_comments_entryform.aspx" class PublicAccessParser(HTMLParser.HTMLParser): """This is the class which parses the PublicAccess search results page. @@ -339,3 +339,20 @@ class PublicAccessPropertyPageParser(HTMLParser.HTMLParser): if attr == "value": 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/" + +# Hambleton +#http://planning.hambleton.gov.uk/publicaccess/tdc/DcApplication/application_searchform.aspx +#"Hambleton District Council", "Hambleton", "http://planning.hambleton.gov.uk/publicaccess/tdc/" + +# 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/CGI/Rushmoor.cgi b/CGI/Rushmoor.cgi index f834ff0..cb03dc0 100755 --- a/CGI/Rushmoor.cgi +++ b/CGI/Rushmoor.cgi @@ -16,7 +16,7 @@ year = form.getfirst('year') authority_name = "Rushmoor Borough Council" authority_short_name = "Rushmoor" -base_url = "http://pa-dc.rushmoor.gov.uk/publicaccess/" +base_url = "http://pa-dc.rushmoor.gov.uk/publicaccess/tdc/" import PublicAccess diff --git a/CGI/Scarborough.cgi b/CGI/Scarborough.cgi new file mode 100755 index 0000000..0d99432 --- /dev/null +++ b/CGI/Scarborough.cgi @@ -0,0 +1,31 @@ +#!/usr/bin/python + +# This is the parser for Scarborough 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 = "Scarborough Borough Council" +authority_short_name = "Scarborough" +base_url = "http://planning.scarborough.gov.uk/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/CGI/Sevenoaks.cgi b/CGI/Sevenoaks.cgi index f44f9d1..7cb6da7 100755 --- a/CGI/Sevenoaks.cgi +++ b/CGI/Sevenoaks.cgi @@ -16,7 +16,7 @@ year = form.getfirst('year') authority_name = "Sevenoaks District Council" authority_short_name = "Sevenoaks" -base_url = "http://publicaccess.sevenoaks.gov.uk/publicaccess/" +base_url = "http://publicaccess.sevenoaks.gov.uk/publicaccess/tdc/" import PublicAccess diff --git a/CGI/South Staffs.cgi b/CGI/South Staffs.cgi index a5b6aa8..0fcbd39 100755 --- a/CGI/South Staffs.cgi +++ b/CGI/South Staffs.cgi @@ -16,7 +16,7 @@ year = form.getfirst('year') authority_name = "South Staffordshire Council" authority_short_name = "South Staffs" -base_url = "https://services.sstaffs.gov.uk/PublicAccess/" +base_url = "https://services.sstaffs.gov.uk/PublicAccess/tdc/" import PublicAccess diff --git a/CGI/Southampton.cgi b/CGI/Southampton.cgi index 01188c3..9432657 100755 --- a/CGI/Southampton.cgi +++ b/CGI/Southampton.cgi @@ -16,7 +16,7 @@ year = form.getfirst('year') authority_name = "Southampton City Council" authority_short_name = "Southampton" -base_url = "http://publicaccess.southampton.gov.uk/publicaccess/" +base_url = "http://publicaccess.southampton.gov.uk/publicaccess/tdc/" import PublicAccess diff --git a/CGI/Spelthorne.cgi b/CGI/Spelthorne.cgi index f507ad7..121c8d8 100755 --- a/CGI/Spelthorne.cgi +++ b/CGI/Spelthorne.cgi @@ -16,7 +16,7 @@ year = form.getfirst('year') authority_name = "Spelthorne Borough Council" authority_short_name = "Spelthorne" -base_url = "http://phoenix.spelthorne.gov.uk/PublicAccess/" +base_url = "http://phoenix.spelthorne.gov.uk/PublicAccess/tdc/" import PublicAccess diff --git a/CGI/Stevenage.cgi b/CGI/Stevenage.cgi index 25bf3ca..07012c0 100755 --- a/CGI/Stevenage.cgi +++ b/CGI/Stevenage.cgi @@ -16,7 +16,7 @@ year = form.getfirst('year') authority_name = "Stevenage Borough Council" authority_short_name = "Stevenage" -base_url = "http://publicaccess.stevenage.gov.uk/publicaccess/" +base_url = "http://publicaccess.stevenage.gov.uk/publicaccess/tdc/" import PublicAccess diff --git a/CGI/Sunderland.cgi b/CGI/Sunderland.cgi index bf8bc15..77ac6d2 100755 --- a/CGI/Sunderland.cgi +++ b/CGI/Sunderland.cgi @@ -16,7 +16,7 @@ year = form.getfirst('year') authority_name = "Sunderland City Council" authority_short_name = "Sunderland" -base_url = "http://www.sunderland.gov.uk/publicaccess/" +base_url = "http://www.sunderland.gov.uk/publicaccess/tdc/" import PublicAccess diff --git a/CGI/Test Valley.cgi b/CGI/Test Valley.cgi index f782eaf..41fc330 100755 --- a/CGI/Test Valley.cgi +++ b/CGI/Test Valley.cgi @@ -16,7 +16,7 @@ year = form.getfirst('year') authority_name = "Test Valley Borough Council" authority_short_name = "Test Valley" -base_url = "http://publicaccess.testvalley.gov.uk/publicaccess/" +base_url = "http://publicaccess.testvalley.gov.uk/publicaccess/tdc/" import PublicAccess diff --git a/CGI/Tonbridge.cgi b/CGI/Tonbridge.cgi index a9256f9..e1e04b4 100755 --- a/CGI/Tonbridge.cgi +++ b/CGI/Tonbridge.cgi @@ -16,7 +16,7 @@ year = form.getfirst('year') authority_name = "Tonbridge and Malling Borough Council" authority_short_name = "Tonbridge" -base_url = "http://publicaccess.tmbc.gov.uk/publicaccess/" +base_url = "http://publicaccess.tmbc.gov.uk/publicaccess/tdc/" import PublicAccess diff --git a/CGI/West Norfolk.cgi b/CGI/West Norfolk.cgi index 47e3dce..b441794 100755 --- a/CGI/West Norfolk.cgi +++ b/CGI/West Norfolk.cgi @@ -16,7 +16,7 @@ year = form.getfirst('year') authority_name = "Kings Lynn and West Norfolk Borough Council" authority_short_name = "West Norfolk" -base_url = "http://online.west-norfolk.gov.uk/publicaccess/" +base_url = "http://online.west-norfolk.gov.uk/publicaccess/tdc/" import PublicAccess diff --git a/CGI/Woking.cgi b/CGI/Woking.cgi index 6c8f51f..76e8523 100755 --- a/CGI/Woking.cgi +++ b/CGI/Woking.cgi @@ -16,7 +16,7 @@ year = form.getfirst('year') authority_name = "Woking Borough Council" authority_short_name = "Woking" -base_url = "http://caps.woking.gov.uk/publicaccess/" +base_url = "http://caps.woking.gov.uk/publicaccess/tdc/" import PublicAccess diff --git a/CGI/York.cgi b/CGI/York.cgi index ed59990..3d312e9 100755 --- a/CGI/York.cgi +++ b/CGI/York.cgi @@ -16,7 +16,7 @@ year = form.getfirst('year') authority_name = "City of York Council" authority_short_name = "York" -base_url = "http://planning.york.gov.uk/PublicAccess/" +base_url = "http://planning.york.gov.uk/PublicAccess/tdc/" import PublicAccess