Browse Source

add scrapers for 13 more councils

which use ApplicationSearchServlet
master
duncan.parkes 17 years ago
parent
commit
8bed7d7ac0
78 changed files with 1582 additions and 236 deletions
  1. +29
    -0
      cgi-bin/Allerdale.cgi
  2. +29
    -0
      cgi-bin/Alnwick.cgi
  3. +1
    -3
      cgi-bin/Angus.cgi
  4. +518
    -0
      cgi-bin/ApplicationSearchServletParser.py
  5. +1
    -3
      cgi-bin/Aylesbury Vale.cgi
  6. +29
    -0
      cgi-bin/Barrow.cgi
  7. +1
    -3
      cgi-bin/Basildon.cgi
  8. +1
    -3
      cgi-bin/Bath.cgi
  9. +1
    -3
      cgi-bin/Bexley.cgi
  10. +2
    -4
      cgi-bin/Blaby.cgi
  11. +1
    -3
      cgi-bin/Bristol.cgi
  12. +1
    -3
      cgi-bin/Buckinghamshire.cgi
  13. +1
    -3
      cgi-bin/Chelmsford.cgi
  14. +1
    -3
      cgi-bin/Cherwell.cgi
  15. +1
    -3
      cgi-bin/City of London.cgi
  16. +1
    -3
      cgi-bin/Cornwall.cgi
  17. +29
    -0
      cgi-bin/Coventry.cgi
  18. +29
    -0
      cgi-bin/Denbighshire.cgi
  19. +1
    -3
      cgi-bin/Doncaster.cgi
  20. +1
    -3
      cgi-bin/Dundee.cgi
  21. +29
    -0
      cgi-bin/Ealing.cgi
  22. +29
    -0
      cgi-bin/Easington.cgi
  23. +1
    -3
      cgi-bin/East Devon.cgi
  24. +1
    -3
      cgi-bin/Edinburgh.cgi
  25. +1
    -3
      cgi-bin/Epsom and Ewell.cgi
  26. +1
    -3
      cgi-bin/Fenland.cgi
  27. +1
    -3
      cgi-bin/Gedling.cgi
  28. +1
    -3
      cgi-bin/Hammersmith and Fulham.cgi
  29. +29
    -0
      cgi-bin/Haringey.cgi
  30. +1
    -3
      cgi-bin/Harrogate.cgi
  31. +1
    -3
      cgi-bin/Hart.cgi
  32. +29
    -0
      cgi-bin/Hartlepool.cgi
  33. +29
    -0
      cgi-bin/High Peak.cgi
  34. +1
    -3
      cgi-bin/Huntingdonshire.cgi
  35. +1
    -3
      cgi-bin/Kerrier.cgi
  36. +1
    -3
      cgi-bin/Knowsley.cgi
  37. +1
    -3
      cgi-bin/Lancaster.cgi
  38. +1
    -3
      cgi-bin/Luton.cgi
  39. +1
    -3
      cgi-bin/Malvern Hills.cgi
  40. +1
    -3
      cgi-bin/Mid Devon.cgi
  41. +1
    -3
      cgi-bin/Milton Keynes.cgi
  42. +1
    -3
      cgi-bin/North Tyneside.cgi
  43. +29
    -0
      cgi-bin/North Warwickshire.cgi
  44. +1
    -3
      cgi-bin/Northumberland.cgi
  45. +1
    -3
      cgi-bin/Oadby and Wigston.cgi
  46. +1
    -3
      cgi-bin/Oswestry.cgi
  47. +1
    -3
      cgi-bin/Peterborough.cgi
  48. +2
    -2
      cgi-bin/PlanningUtils.py
  49. +1
    -3
      cgi-bin/Portsmouth.cgi
  50. +1
    -3
      cgi-bin/Rushmoor.cgi
  51. +1
    -3
      cgi-bin/Scarborough.cgi
  52. +1
    -3
      cgi-bin/Sevenoaks.cgi
  53. +1
    -3
      cgi-bin/South Bucks.cgi
  54. +1
    -3
      cgi-bin/South Ribble.cgi
  55. +1
    -3
      cgi-bin/South Staffordshire.cgi
  56. +1
    -3
      cgi-bin/Southampton.cgi
  57. +1
    -3
      cgi-bin/Spelthorne.cgi
  58. +29
    -0
      cgi-bin/St Helens.cgi
  59. +1
    -3
      cgi-bin/Stevenage.cgi
  60. +1
    -3
      cgi-bin/Stockton-On-Tees.cgi
  61. +1
    -3
      cgi-bin/Sunderland.cgi
  62. +1
    -3
      cgi-bin/Test Valley.cgi
  63. +1
    -3
      cgi-bin/Tonbridge.cgi
  64. +1
    -3
      cgi-bin/Torbay.cgi
  65. +1
    -3
      cgi-bin/Waveney.cgi
  66. +29
    -0
      cgi-bin/Wear Valley.cgi
  67. +29
    -0
      cgi-bin/Wellingborough.cgi
  68. +1
    -3
      cgi-bin/West Lancashire.cgi
  69. +1
    -3
      cgi-bin/West Norfolk.cgi
  70. +1
    -3
      cgi-bin/Woking.cgi
  71. +1
    -3
      cgi-bin/York.cgi
  72. +518
    -0
      python_scrapers/ApplicationSearchServletParser.py
  73. +2
    -4
      python_scrapers/CGITemplate
  74. +2
    -0
      python_scrapers/OtherFilesToCopy.csv
  75. +2
    -2
      python_scrapers/PlanningUtils.py
  76. +70
    -56
      python_scrapers/PublicAccessSites.csv
  77. +4
    -4
      python_scrapers/createCGI.sh
  78. +2
    -2
      python_scrapers/generateCGIScripts.py

+ 29
- 0
cgi-bin/Allerdale.cgi View File

@@ -0,0 +1,29 @@
#!/usr/local/bin/python

# This is the parser for Allerdale 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 = "Allerdale Borough Council"
authority_short_name = "Allerdale"
base_url = "http://planning.allerdale.gov.uk/"

import ApplicationSearchServletParser

parser = ApplicationSearchServletParser.AllerdaleSearchParser(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

+ 29
- 0
cgi-bin/Alnwick.cgi View File

@@ -0,0 +1,29 @@
#!/usr/local/bin/python

# This is the parser for Alnwick 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 = "Alnwick District Council"
authority_short_name = "Alnwick"
base_url = "http://services.castlemorpeth.gov.uk:7777/"

import ApplicationSearchServletParser

parser = ApplicationSearchServletParser.AlnwickSearchParser(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

+ 1
- 3
cgi-bin/Angus.cgi View File

@@ -20,9 +20,7 @@ base_url = "http://planning.angus.gov.uk/PublicAccess/tdc/"

import PublicAccess

parser = PublicAccess.PublicAccessParser(authority_name,
authority_short_name,
base_url)
parser = PublicAccess.PublicAccessParser(authority_name, authority_short_name, base_url)

xml = parser.getResults(day, month, year)



+ 518
- 0
cgi-bin/ApplicationSearchServletParser.py View File

@@ -0,0 +1,518 @@

import urllib, urllib2

import HTMLParser
import urlparse
import datetime, time


from PlanningUtils import PlanningAuthorityResults, \
getPostcodeFromText, \
PlanningApplication


# The search results list will give us reference, location, description,
# and info url of each app.

# The info page gives us the received date,
# and comment_url

class ApplicationSearchServletParser(HTMLParser.HTMLParser):
"""Parser for ApplicationSearchServlet sites.
"""


# These indicate the column of the main table containing this
# piece of information.
# They should be overridden in subclasses

#self._rows_to_ignore_at_start = None

_reference_col_no = None
_location_col_no = None
_description_col_no = None
def __init__(self,
authority_name,
authority_short_name,
base_url,
debug=False):
HTMLParser.HTMLParser.__init__(self)

self.authority_name = authority_name
self.authority_short_name = authority_short_name
self.base_url = base_url
self.debug = debug

self.search_url = urlparse.urljoin(self.base_url, "portal/servlets/ApplicationSearchServlet")

self._comment_url = urlparse.urljoin(self.base_url, "portal/servlets/PlanningComments?REFNO=%(council_reference)s")

self._requested_date = None

# 0 - no
# 1 - maybe
# 2 - yes
# 3 - finished
self._in_results_table = 0
self._tr_count = 0
self._td_count = 0
self._data_list = []

# this will hold the application we are currently working on.
self._current_application = None
# The object which stores our set of planning application results
self._results = PlanningAuthorityResults(self.authority_name, self.authority_short_name)

def _checkAttrsForResultsTable(self, attrs):
raise SystemError

def handle_starttag(self, tag, attrs):
if self.debug:
print tag, attrs
if tag == "table" and self._in_results_table == 0:
self._in_results_table = 1
self._checkAttrsForResultsTable(attrs)
elif tag == "tr" and self._in_results_table == 2:
self._tr_count += 1
self._td_count = 0
self._data_list = []
self._current_application = PlanningApplication()
elif tag == "td" and self._in_results_table == 2:
self._td_count += 1

elif tag == "a" and self._in_results_table == 2 and self._td_count == self._reference_col_no:
# The href attribute contains the link to the info page
for (key, value) in attrs:
if key == "href":
self._current_application.info_url = urlparse.urljoin(self.search_url, value)
def handle_endtag(self, tag):
if self.debug:
print "ending: " , tag
if tag == "table" and self._in_results_table == 2:
self._in_results_table = 3
elif tag == "tr" and self._in_results_table == 2:
if self._current_application.council_reference is not None:
# get the received date
#info_response = urllib2.urlopen(self._current_application.info_url)
#info_page_parser = InfoPageParser()
#info_page_parser.feed(info_response.read())
self._current_application.date_received = self._requested_date#info_page_parser.date_received
self._results.addApplication(self._current_application)
elif tag == "td" and self._in_results_table == 2:
if self._td_count == self._location_col_no:
data = ' '.join(self._data_list).strip()
self._current_application.address = data
postcode = getPostcodeFromText(data)
if postcode is not None:
self._current_application.postcode = postcode
self._data_list = []
elif self._td_count == self._description_col_no:
data = ' '.join(self._data_list).strip()
self._current_application.description = data
self._data_list = []
elif tag == 'a' and self._in_results_table == 2 and self._td_count == self._reference_col_no:
data = ''.join(self._data_list).strip()
self._current_application.council_reference = data
self._current_application.comment_url = self._comment_url %{"council_reference": data}
self._data_list = []

def handle_data(self, data):
if self.debug:
print data
if self._in_results_table == 2:
if self._td_count == self._reference_col_no or \
self._td_count == self._location_col_no or \
self._td_count == self._description_col_no:
self._data_list.append(data.strip())


def getResultsByDayMonthYear(self, day, month, year):
"""This will return an ApplicationResults object containg the
applications for the date passed in."""

# Were going to need a datetime object for the requested date
self._requested_date = datetime.date(year, month, day)

required_format = "%d-%m-%Y"

search_data = urllib.urlencode({"ReceivedDateFrom":self._requested_date.strftime(required_format),
"ReceivedDateTo":self._requested_date.strftime(required_format)})
search_request = urllib2.Request(self.search_url, search_data)
search_response = urllib2.urlopen(search_request)
search_contents = search_response.read()

self.feed(search_contents)

return self._results
def getResults(self, day, month, year):
return self.getResultsByDayMonthYear(int(day), int(month), int(year)).displayXML()


class CoventrySearchParser(ApplicationSearchServletParser):
# results table spotter
# width="100%" border="0"

_reference_col_no = 1
_location_col_no = 5
_description_col_no = 8
def _checkAttrsForResultsTable(self, attrs):
got_width = False
got_border = False
for key, value in attrs:
if key == 'width' and value == '100%':
got_width = True
elif key == 'border' and value == '0':
got_border = True

if got_width and got_border:
self._in_results_table = 2
else:
self._in_results_table = 0



class AllerdaleSearchParser(ApplicationSearchServletParser):
# results table spotter
#class="nis_table" summary="Table of planning applications that matched your query, showing reference number, received date, and address"

_reference_col_no = 1
_location_col_no = 3
_description_col_no = 6
def _checkAttrsForResultsTable(self, attrs):
got_class = False
got_summary = False
for key, value in attrs:
if key == 'class' and value == 'nis_table':
got_class = True
elif key == 'summary' and value == 'Table of planning applications that matched your query, showing reference number, received date, and address':
got_summary = True

if got_class and got_summary:
self._in_results_table = 2
else:
self._in_results_table = 0



class AlnwickSearchParser(ApplicationSearchServletParser):
# results table spotter
# width="100%" class="niscontent"
_reference_col_no = 1
_location_col_no = 2
_description_col_no = 7
def _checkAttrsForResultsTable(self, attrs):
got_class = False
for key, value in attrs:
if key == 'class' and value == 'niscontent':
got_class = True

if got_class:
self._in_results_table = 2
else:
self._in_results_table = 0


class BarrowSearchParser(ApplicationSearchServletParser):
# results table spotter
# width="100%" border="0"
_reference_col_no = 1
_location_col_no = 3
_description_col_no = 6
def _checkAttrsForResultsTable(self, attrs):
got_width = False
got_border = False
for key, value in attrs:
if key == 'width' and value == '100%':
got_width = True
elif key == 'border' and value == '0':
got_border = True

if got_width and got_border:
self._in_results_table = 2
else:
self._in_results_table = 0


class HartlepoolSearchParser(ApplicationSearchServletParser):
# results table spotter
# summary="Table of planning applications that matched your query, showing reference number, received date, and address"
_reference_col_no = 1
_location_col_no = 2
_description_col_no = 3
def _checkAttrsForResultsTable(self, attrs):
got_summary = False
for key, value in attrs:
if key == 'summary' and value == "Table of planning applications that matched your query, showing reference number, received date, and address":
got_summary = True

if got_summary:
self._in_results_table = 2
else:
self._in_results_table = 0


class NorthWarksSearchParser(ApplicationSearchServletParser):
# results table spotter
# table width="100%" border="0" cellspacing="0" cellpadding="0"
_reference_col_no = 1
_location_col_no = 3
_description_col_no = 4
def _checkAttrsForResultsTable(self, attrs):
got_width = False
got_border = False
got_cellspacing = False
got_cellpadding = False
for key, value in attrs:
if key == 'width' and value == "100%":
got_width = True
elif key == 'border' and value == '0':
got_border = True
elif key == 'cellspacing' and value == '0':
got_cellspacing = True
elif key == 'cellpadding' and value == '0':
got_cellpadding = True

if got_width and got_border and got_cellspacing and got_cellpadding:
self._in_results_table = 2
else:
self._in_results_table = 0

class StHelensSearchParser(ApplicationSearchServletParser):
# results table spotter
# summary="Search Results List"
_reference_col_no = 1
_location_col_no = 2
_description_col_no = 5
def _checkAttrsForResultsTable(self, attrs):
got_summary = False
for key, value in attrs:
if key == 'summary' and value == "Search Results List":
got_summary = True

if got_summary:
self._in_results_table = 2
else:
self._in_results_table = 0

class EasingtonSearchParser(ApplicationSearchServletParser):
# results table spotter
#table width="100%" border="0" cellspacing="0" cellpadding="0"
_reference_col_no = 1
_location_col_no = 3
_description_col_no = 6
def _checkAttrsForResultsTable(self, attrs):
got_width = False
got_border = False
got_cellspacing = False
got_cellpadding = False
for key, value in attrs:
if key == 'width' and value == "100%":
got_width = True
elif key == 'border' and value == '0':
got_border = True
elif key == 'cellspacing' and value == '0':
got_cellspacing = True
elif key == 'cellpadding' and value == '0':
got_cellpadding = True

if got_width and got_border and got_cellspacing and got_cellpadding:
self._in_results_table = 2
else:
self._in_results_table = 0


class HighPeakSearchParser(ApplicationSearchServletParser):
# results table spotter
# table class="data" width="95%"
_reference_col_no = 1
_location_col_no = 2
_description_col_no = 5
def _checkAttrsForResultsTable(self, attrs):
got_class = False
got_width = False
for key, value in attrs:
if key == 'class' and value == "data":
got_class = True
if key == 'width' and value == "95%":
got_width = True

if got_class and got_width:
self._in_results_table = 2
else:
self._in_results_table = 0


class WearValleySearchParser(ApplicationSearchServletParser):
# results table spotter
# table summary="Table of planning applications that matched your query, showing reference number, received date, and address"
_reference_col_no = 1
_location_col_no = 3
_description_col_no = 4
def _checkAttrsForResultsTable(self, attrs):
got_summary= False
for key, value in attrs:
if key == 'summary' and value == "Table of planning applications that matched your query, showing reference number, received date, and address":
got_summary = True

if got_summary:
self._in_results_table = 2
else:
self._in_results_table = 0


class WellingboroughSearchParser(ApplicationSearchServletParser):
# results table spotter
#table width="100%" border="0"
_reference_col_no = 1
_location_col_no = 3
_description_col_no = 6
def _checkAttrsForResultsTable(self, attrs):
got_width = False
got_border = False
for key, value in attrs:
if key == 'width' and value == "100%":
got_width = True
elif key == 'border' and value == "0":
got_border = True

if got_width and got_border:
self._in_results_table = 2
else:
self._in_results_table = 0

class EalingSearchParser(ApplicationSearchServletParser):
# results table spotter
# table width="100%" cellspacing="0px" border="1px" cellpadding="2px" bordercolor="#FFFFFF"
_reference_col_no = 1
_location_col_no = 3
_description_col_no = 4
def _checkAttrsForResultsTable(self, attrs):
got_width = False
got_cellspacing = False
got_border = False
got_cellpadding = False
got_bordercolor = False
for key, value in attrs:
if key == 'width' and value == "100%":
got_width = True
elif key == 'cellspacing' and value == "0px":
got_cellspacing = True
elif key == 'border' and value == "1px":
got_border = True
elif key == 'cellpadding' and value == "2px":
got_cellpadding = True
elif key == 'bordercolor' and value == "#FFFFFF":
got_bordercolor = True

if got_width and got_cellspacing and got_border and got_cellpadding and got_bordercolor:
self._in_results_table = 2
else:
self._in_results_table = 0


class HaringeySearchParser(ApplicationSearchServletParser):
# results table spotter
# summary="Application Results"
_reference_col_no = 1
_location_col_no = 2
_description_col_no = 5
def _checkAttrsForResultsTable(self, attrs):
got_summary= False
for key, value in attrs:
if key == 'summary' and value == "Application Results":
got_summary = True

if got_summary:
self._in_results_table = 2
else:
self._in_results_table = 0


class DenbighshireSearchParser(ApplicationSearchServletParser):
# results table spotter
#table width="100%" border="0"
_reference_col_no = 1
_location_col_no = 3
_description_col_no = 5
def _checkAttrsForResultsTable(self, attrs):
got_width = False
got_border = False
for key, value in attrs:
if key == 'width' and value == "100%":
got_width = True
elif key == 'border' and value == "0":
got_border = True

if got_width and got_border:
self._in_results_table = 2
else:
self._in_results_table = 0


if __name__ == "__main__":
#parser = CoventrySearchParser("Coventry", "Coventry", "http://planning.coventry.gov.uk")
#print parser.getResults(28,3,2007)
#parser = AllerdaleSearchParser("Allerdale", "Allerdale", "http://planning.allerdale.gov.uk")
#print parser.getResults(28,3,2007)
#parser = AlnwickSearchParser("Alnwick", "Alnwick", "http://services.castlemorpeth.gov.uk:7777")
#print parser.getResults(28,3,2007)
#parser = BarrowSearchParser("Barrow", "Barrow", "http://localportal.barrowbc.gov.uk")
#print parser.getResults(28,3,2007)
#parser = HartlepoolSearchParser("Hartlepool", "Hartlepool", "http://eforms.hartlepool.gov.uk:7777")
#print parser.getResults(28,3,2007)
#parser = NorthWarksSearchParser("North Warwickshire", "North Warks", "http://planning.northwarks.gov.uk")
#print parser.getResults(28,3,2007)
#parser = StHelensSearchParser("St Helens", "St Helens", "http://212.248.225.150:8080")
#print parser.getResults(28,3,2007)
#parser = EasingtonSearchParser("Easington", "Easington", "http://planning.easington.gov.uk")
#print parser.getResults(28,3,2007)
#parser = HighPeakSearchParser("High Peak", "High Peak", "http://planning.highpeak.gov.uk")
#print parser.getResults(20,3,2007)
#parser = WearValleySearchParser("Wear Valley", "Wear Valley", "http://planning.wearvalley.gov.uk")
#print parser.getResults(20,3,2007)
#parser = WellingboroughSearchParser("Wellingborough", "Wellingborough", "http://planning.wellingborough.gov.uk")
#print parser.getResults(20,3,2007)
#parser = EalingSearchParser("Ealing", "Ealing", "http://www.pam.ealing.gov.uk")
#print parser.getResults(20,3,2007)
#parser = HaringeySearchParser("Haringey", "Haringey", "http://www.planningservices.haringey.gov.uk")
#print parser.getResults(20,3,2007)
#parser = DenbighshireSearchParser("Denbighshire", "Denbighshire", "http://planning.denbighshire.gov.uk")
#print parser.getResults(20,3,2007)
pass

+ 1
- 3
cgi-bin/Aylesbury Vale.cgi View File

@@ -20,9 +20,7 @@ base_url = "http://eplanning.aylesburyvaledc.gov.uk/tdc/"

import PublicAccess

parser = PublicAccess.PublicAccessParser(authority_name,
authority_short_name,
base_url)
parser = PublicAccess.PublicAccessParser(authority_name, authority_short_name, base_url)

xml = parser.getResults(day, month, year)



+ 29
- 0
cgi-bin/Barrow.cgi View File

@@ -0,0 +1,29 @@
#!/usr/local/bin/python

# This is the parser for Barrow 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 = "Barrow Borough Council"
authority_short_name = "Barrow"
base_url = "http://localportal.barrowbc.gov.uk/"

import ApplicationSearchServletParser

parser = ApplicationSearchServletParser.BarrowSearchParser(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

+ 1
- 3
cgi-bin/Basildon.cgi View File

@@ -20,9 +20,7 @@ base_url = "http://planning.basildon.gov.uk/publicaccess/tdc/"

import PublicAccess

parser = PublicAccess.PublicAccessParser(authority_name,
authority_short_name,
base_url)
parser = PublicAccess.PublicAccessParser(authority_name, authority_short_name, base_url)

xml = parser.getResults(day, month, year)



+ 1
- 3
cgi-bin/Bath.cgi View File

@@ -20,9 +20,7 @@ base_url = "http://planning.bathnes.gov.uk/publicaccess/tdc/"

import PublicAccess

parser = PublicAccess.PublicAccessParser(authority_name,
authority_short_name,
base_url)
parser = PublicAccess.PublicAccessParser(authority_name, authority_short_name, base_url)

xml = parser.getResults(day, month, year)



+ 1
- 3
cgi-bin/Bexley.cgi View File

@@ -20,9 +20,7 @@ base_url = "http://publicaccess.bexley.gov.uk/publicaccess/tdc/"

import PublicAccess

parser = PublicAccess.PublicAccessParser(authority_name,
authority_short_name,
base_url)
parser = PublicAccess.PublicAccessParser(authority_name, authority_short_name, base_url)

xml = parser.getResults(day, month, year)



+ 2
- 4
cgi-bin/Blaby.cgi View File

@@ -1,4 +1,4 @@
#!/opt/local/bin/python
#!/usr/local/bin/python

# This is the parser for Blaby District Council.
# it is generated from the file CGITemplate
@@ -20,9 +20,7 @@ base_url = "http://www.blaby.gov.uk/PublicAccess/tdc/"

import PublicAccess

parser = PublicAccess.PublicAccessParser(authority_name,
authority_short_name,
base_url)
parser = PublicAccess.PublicAccessParser(authority_name, authority_short_name, base_url)

xml = parser.getResults(day, month, year)



+ 1
- 3
cgi-bin/Bristol.cgi View File

@@ -20,9 +20,7 @@ base_url = "http://e2eweb.bristol-city.gov.uk/publicaccess/tdc/"

import PublicAccess

parser = PublicAccess.PublicAccessParser(authority_name,
authority_short_name,
base_url)
parser = PublicAccess.PublicAccessParser(authority_name, authority_short_name, base_url)

xml = parser.getResults(day, month, year)



+ 1
- 3
cgi-bin/Buckinghamshire.cgi View File

@@ -20,9 +20,7 @@ base_url = "http://www.bucksplanning.gov.uk/PublicAccess/tdc/"

import PublicAccess

parser = PublicAccess.PublicAccessParser(authority_name,
authority_short_name,
base_url)
parser = PublicAccess.PublicAccessParser(authority_name, authority_short_name, base_url)

xml = parser.getResults(day, month, year)



+ 1
- 3
cgi-bin/Chelmsford.cgi View File

@@ -20,9 +20,7 @@ base_url = "http://web1.chelmsfordbc.gov.uk/publicaccess/tdc/"

import PublicAccess

parser = PublicAccess.PublicAccessParser(authority_name,
authority_short_name,
base_url)
parser = PublicAccess.PublicAccessParser(authority_name, authority_short_name, base_url)

xml = parser.getResults(day, month, year)



+ 1
- 3
cgi-bin/Cherwell.cgi View File

@@ -20,9 +20,7 @@ base_url = "http://cherweb.cherwell-dc.gov.uk/publicaccess/tdc/"

import PublicAccess

parser = PublicAccess.PublicAccessParser(authority_name,
authority_short_name,
base_url)
parser = PublicAccess.PublicAccessParser(authority_name, authority_short_name, base_url)

xml = parser.getResults(day, month, year)



+ 1
- 3
cgi-bin/City of London.cgi View File

@@ -20,9 +20,7 @@ base_url = "http://www.planning.cityoflondon.gov.uk/tdc/"

import PublicAccess

parser = PublicAccess.PublicAccessParser(authority_name,
authority_short_name,
base_url)
parser = PublicAccess.PublicAccessParser(authority_name, authority_short_name, base_url)

xml = parser.getResults(day, month, year)



+ 1
- 3
cgi-bin/Cornwall.cgi View File

@@ -20,9 +20,7 @@ base_url = "http://planapps.cornwall.gov.uk/publicaccess/tdc/"

import PublicAccess

parser = PublicAccess.PublicAccessParser(authority_name,
authority_short_name,
base_url)
parser = PublicAccess.PublicAccessParser(authority_name, authority_short_name, base_url)

xml = parser.getResults(day, month, year)



+ 29
- 0
cgi-bin/Coventry.cgi View File

@@ -0,0 +1,29 @@
#!/usr/local/bin/python

# This is the parser for Coventry 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 = "Coventry City Council"
authority_short_name = "Coventry"
base_url = "http://planning.coventry.gov.uk/"

import ApplicationSearchServletParser

parser = ApplicationSearchServletParser.CoventrySearchParser(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

+ 29
- 0
cgi-bin/Denbighshire.cgi View File

@@ -0,0 +1,29 @@
#!/usr/local/bin/python

# This is the parser for Denbighshire County 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 = "Denbighshire County Council"
authority_short_name = "Denbighshire"
base_url = "http://planning.denbighshire.gov.uk/"

import ApplicationSearchServletParser

parser = ApplicationSearchServletParser.DenbighshireSearchParser(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

+ 1
- 3
cgi-bin/Doncaster.cgi View File

@@ -20,9 +20,7 @@ base_url = "http://maps.doncaster.gov.uk/publicaccess/tdc/"

import PublicAccess

parser = PublicAccess.PublicAccessParser(authority_name,
authority_short_name,
base_url)
parser = PublicAccess.PublicAccessParser(authority_name, authority_short_name, base_url)

xml = parser.getResults(day, month, year)



+ 1
- 3
cgi-bin/Dundee.cgi View File

@@ -20,9 +20,7 @@ base_url = "http://bwarrant.dundeecity.gov.uk/publicaccess/tdc/"

import PublicAccess

parser = PublicAccess.PublicAccessParser(authority_name,
authority_short_name,
base_url)
parser = PublicAccess.PublicAccessParser(authority_name, authority_short_name, base_url)

xml = parser.getResults(day, month, year)



+ 29
- 0
cgi-bin/Ealing.cgi View File

@@ -0,0 +1,29 @@
#!/usr/local/bin/python

# This is the parser for Ealing 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 = "Ealing Council"
authority_short_name = "Ealing"
base_url = "http://www.pam.ealing.gov.uk/"

import ApplicationSearchServletParser

parser = ApplicationSearchServletParser.EalingSearchParser(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

+ 29
- 0
cgi-bin/Easington.cgi View File

@@ -0,0 +1,29 @@
#!/usr/local/bin/python

# This is the parser for District of Easington.
# 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 = "District of Easington"
authority_short_name = "Easington"
base_url = "http://planning.easington.gov.uk/"

import ApplicationSearchServletParser

parser = ApplicationSearchServletParser.EasingtonSearchParser(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

+ 1
- 3
cgi-bin/East Devon.cgi View File

@@ -20,9 +20,7 @@ base_url = "http://planning.eastdevon.gov.uk/PublicAccess/tdc/"

import PublicAccess

parser = PublicAccess.PublicAccessParser(authority_name,
authority_short_name,
base_url)
parser = PublicAccess.PublicAccessParser(authority_name, authority_short_name, base_url)

xml = parser.getResults(day, month, year)



+ 1
- 3
cgi-bin/Edinburgh.cgi View File

@@ -20,9 +20,7 @@ base_url = "http://citydev-portal.edinburgh.gov.uk/publicaccess/dc/"

import PublicAccess

parser = PublicAccess.PublicAccessParser(authority_name,
authority_short_name,
base_url)
parser = PublicAccess.PublicAccessParser(authority_name, authority_short_name, base_url)

xml = parser.getResults(day, month, year)



+ 1
- 3
cgi-bin/Epsom and Ewell.cgi View File

@@ -20,9 +20,7 @@ base_url = "http://eplanning.epsom-ewell.gov.uk/publicaccess/tdc/"

import PublicAccess

parser = PublicAccess.PublicAccessParser(authority_name,
authority_short_name,
base_url)
parser = PublicAccess.PublicAccessParser(authority_name, authority_short_name, base_url)

xml = parser.getResults(day, month, year)



+ 1
- 3
cgi-bin/Fenland.cgi View File

@@ -20,9 +20,7 @@ base_url = "http://www.fenland.gov.uk/publicaccess/dc/"

import PublicAccess

parser = PublicAccess.PublicAccessParser(authority_name,
authority_short_name,
base_url)
parser = PublicAccess.PublicAccessParser(authority_name, authority_short_name, base_url)

xml = parser.getResults(day, month, year)



+ 1
- 3
cgi-bin/Gedling.cgi View File

@@ -20,9 +20,7 @@ base_url = "http://publicaccess.gedling.gov.uk/publicaccess/tdc/"

import PublicAccess

parser = PublicAccess.PublicAccessParser(authority_name,
authority_short_name,
base_url)
parser = PublicAccess.PublicAccessParser(authority_name, authority_short_name, base_url)

xml = parser.getResults(day, month, year)



+ 1
- 3
cgi-bin/Hammersmith and Fulham.cgi View File

@@ -20,9 +20,7 @@ base_url = "http://www.apps.lbhf.gov.uk/PublicAccess/tdc/"

import PublicAccess

parser = PublicAccess.PublicAccessParser(authority_name,
authority_short_name,
base_url)
parser = PublicAccess.PublicAccessParser(authority_name, authority_short_name, base_url)

xml = parser.getResults(day, month, year)



+ 29
- 0
cgi-bin/Haringey.cgi View File

@@ -0,0 +1,29 @@
#!/usr/local/bin/python

# This is the parser for Haringey 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 = "Haringey Council"
authority_short_name = "Haringey"
base_url = "http://www.planningservices.haringey.gov.uk/"

import ApplicationSearchServletParser

parser = ApplicationSearchServletParser.HaringeySearchParser(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

+ 1
- 3
cgi-bin/Harrogate.cgi View File

@@ -20,9 +20,7 @@ base_url = "http://publicaccess.harrogate.gov.uk/publicaccess/tdc/"

import PublicAccess

parser = PublicAccess.PublicAccessParser(authority_name,
authority_short_name,
base_url)
parser = PublicAccess.PublicAccessParser(authority_name, authority_short_name, base_url)

xml = parser.getResults(day, month, year)



+ 1
- 3
cgi-bin/Hart.cgi View File

@@ -20,9 +20,7 @@ base_url = "http://publicaccess.hart.gov.uk/publicaccess/tdc/"

import PublicAccess

parser = PublicAccess.PublicAccessParser(authority_name,
authority_short_name,
base_url)
parser = PublicAccess.PublicAccessParser(authority_name, authority_short_name, base_url)

xml = parser.getResults(day, month, year)



+ 29
- 0
cgi-bin/Hartlepool.cgi View File

@@ -0,0 +1,29 @@
#!/usr/local/bin/python

# This is the parser for Hartlepool 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 = "Hartlepool Borough Council"
authority_short_name = "Hartlepool"
base_url = "http://eforms.hartlepool.gov.uk:7777/"

import ApplicationSearchServletParser

parser = ApplicationSearchServletParser.HartlepoolSearchParser(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

+ 29
- 0
cgi-bin/High Peak.cgi View File

@@ -0,0 +1,29 @@
#!/usr/local/bin/python

# This is the parser for High Peak 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 = "High Peak Borough Council"
authority_short_name = "High Peak"
base_url = "http://planning.highpeak.gov.uk/"

import ApplicationSearchServletParser

parser = ApplicationSearchServletParser.HighPeakSearchParser(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

+ 1
- 3
cgi-bin/Huntingdonshire.cgi View File

@@ -20,9 +20,7 @@ base_url = "http://planning.huntsdc.gov.uk/publicaccess/tdc/"

import PublicAccess

parser = PublicAccess.PublicAccessParser(authority_name,
authority_short_name,
base_url)
parser = PublicAccess.PublicAccessParser(authority_name, authority_short_name, base_url)

xml = parser.getResults(day, month, year)



+ 1
- 3
cgi-bin/Kerrier.cgi View File

@@ -20,9 +20,7 @@ base_url = "http://publicaccess.kerrier.gov.uk/publicaccess/tdc/"

import PublicAccess

parser = PublicAccess.PublicAccessParser(authority_name,
authority_short_name,
base_url)
parser = PublicAccess.PublicAccessParser(authority_name, authority_short_name, base_url)

xml = parser.getResults(day, month, year)



+ 1
- 3
cgi-bin/Knowsley.cgi View File

@@ -20,9 +20,7 @@ base_url = "http://publicaccess.knowsley.gov.uk/PublicAccess/tdc/"

import PublicAccess

parser = PublicAccess.PublicAccessParser(authority_name,
authority_short_name,
base_url)
parser = PublicAccess.PublicAccessParser(authority_name, authority_short_name, base_url)

xml = parser.getResults(day, month, year)



+ 1
- 3
cgi-bin/Lancaster.cgi View File

@@ -20,9 +20,7 @@ base_url = "http://planapps.lancaster.gov.uk/PublicAccess/tdc/"

import PublicAccess

parser = PublicAccess.PublicAccessParser(authority_name,
authority_short_name,
base_url)
parser = PublicAccess.PublicAccessParser(authority_name, authority_short_name, base_url)

xml = parser.getResults(day, month, year)



+ 1
- 3
cgi-bin/Luton.cgi View File

@@ -20,9 +20,7 @@ base_url = "http://www.eplan.luton.gov.uk/PublicAccess/tdc/"

import PublicAccess

parser = PublicAccess.PublicAccessParser(authority_name,
authority_short_name,
base_url)
parser = PublicAccess.PublicAccessParser(authority_name, authority_short_name, base_url)

xml = parser.getResults(day, month, year)



+ 1
- 3
cgi-bin/Malvern Hills.cgi View File

@@ -20,9 +20,7 @@ base_url = "http://public.malvernhills.gov.uk/publicaccess/tdc/"

import PublicAccess

parser = PublicAccess.PublicAccessParser(authority_name,
authority_short_name,
base_url)
parser = PublicAccess.PublicAccessParser(authority_name, authority_short_name, base_url)

xml = parser.getResults(day, month, year)



+ 1
- 3
cgi-bin/Mid Devon.cgi View File

@@ -20,9 +20,7 @@ base_url = "http://planning.middevon.gov.uk/publicaccess/tdc/"

import PublicAccess

parser = PublicAccess.PublicAccessParser(authority_name,
authority_short_name,
base_url)
parser = PublicAccess.PublicAccessParser(authority_name, authority_short_name, base_url)

xml = parser.getResults(day, month, year)



+ 1
- 3
cgi-bin/Milton Keynes.cgi View File

@@ -20,9 +20,7 @@ base_url = "http://publicaccess.milton-keynes.gov.uk/tdc/"

import PublicAccess

parser = PublicAccess.PublicAccessParser(authority_name,
authority_short_name,
base_url)
parser = PublicAccess.PublicAccessParser(authority_name, authority_short_name, base_url)

xml = parser.getResults(day, month, year)



+ 1
- 3
cgi-bin/North Tyneside.cgi View File

@@ -20,9 +20,7 @@ base_url = "http://publicaccess.northtyneside.gov.uk/PublicAccess/tdc/"

import PublicAccess

parser = PublicAccess.PublicAccessParser(authority_name,
authority_short_name,
base_url)
parser = PublicAccess.PublicAccessParser(authority_name, authority_short_name, base_url)

xml = parser.getResults(day, month, year)



+ 29
- 0
cgi-bin/North Warwickshire.cgi View File

@@ -0,0 +1,29 @@
#!/usr/local/bin/python

# This is the parser for North Warwickshire 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 = "North Warwickshire Borough Council"
authority_short_name = "North Warwickshire"
base_url = "http://planning.northwarks.gov.uk/"

import ApplicationSearchServletParser

parser = ApplicationSearchServletParser.NorthWarksSearchParser(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

+ 1
- 3
cgi-bin/Northumberland.cgi View File

@@ -20,9 +20,7 @@ base_url = "http://planning.northumberland.gov.uk/publicaccess/tdc/"

import PublicAccess

parser = PublicAccess.PublicAccessParser(authority_name,
authority_short_name,
base_url)
parser = PublicAccess.PublicAccessParser(authority_name, authority_short_name, base_url)

xml = parser.getResults(day, month, year)



+ 1
- 3
cgi-bin/Oadby and Wigston.cgi View File

@@ -20,9 +20,7 @@ base_url = "http://web.owbc.net/PublicAccess/tdc/"

import PublicAccess

parser = PublicAccess.PublicAccessParser(authority_name,
authority_short_name,
base_url)
parser = PublicAccess.PublicAccessParser(authority_name, authority_short_name, base_url)

xml = parser.getResults(day, month, year)



+ 1
- 3
cgi-bin/Oswestry.cgi View File

@@ -20,9 +20,7 @@ base_url = "http://193.114.205.78/PublicAccess/tdc/"

import PublicAccess

parser = PublicAccess.PublicAccessParser(authority_name,
authority_short_name,
base_url)
parser = PublicAccess.PublicAccessParser(authority_name, authority_short_name, base_url)

xml = parser.getResults(day, month, year)



+ 1
- 3
cgi-bin/Peterborough.cgi View File

@@ -20,9 +20,7 @@ base_url = "http://194.72.246.15/publicaccess/dc/"

import PublicAccess

parser = PublicAccess.PublicAccessParser(authority_name,
authority_short_name,
base_url)
parser = PublicAccess.PublicAccessParser(authority_name, authority_short_name, base_url)

xml = parser.getResults(day, month, year)



+ 2
- 2
cgi-bin/PlanningUtils.py View File

@@ -56,7 +56,7 @@ class PlanningAuthorityResults:

def __repr__(self):
return self.displayXML()
def displayXML(self):
"""This should display the contents of this object in the planningalerts format.
i.e. in the same format as this one:
@@ -88,7 +88,7 @@ class PlanningApplication:

def __repr__(self):
return self.displayXML()
def displayXML(self):
return "<application>\n" +\
"<council_reference>%s</council_reference>\n" %xmlQuote(self.council_reference) +\


+ 1
- 3
cgi-bin/Portsmouth.cgi View File

@@ -20,9 +20,7 @@ base_url = "http://planning.portsmouth.gov.uk/PublicAccess/tdc/"

import PublicAccess

parser = PublicAccess.PublicAccessParser(authority_name,
authority_short_name,
base_url)
parser = PublicAccess.PublicAccessParser(authority_name, authority_short_name, base_url)

xml = parser.getResults(day, month, year)



+ 1
- 3
cgi-bin/Rushmoor.cgi View File

@@ -20,9 +20,7 @@ base_url = "http://pa-dc.rushmoor.gov.uk/publicaccess/tdc/"

import PublicAccess

parser = PublicAccess.PublicAccessParser(authority_name,
authority_short_name,
base_url)
parser = PublicAccess.PublicAccessParser(authority_name, authority_short_name, base_url)

xml = parser.getResults(day, month, year)



+ 1
- 3
cgi-bin/Scarborough.cgi View File

@@ -20,9 +20,7 @@ base_url = "http://planning.scarborough.gov.uk/publicaccess/dc/"

import PublicAccess

parser = PublicAccess.PublicAccessParser(authority_name,
authority_short_name,
base_url)
parser = PublicAccess.PublicAccessParser(authority_name, authority_short_name, base_url)

xml = parser.getResults(day, month, year)



+ 1
- 3
cgi-bin/Sevenoaks.cgi View File

@@ -20,9 +20,7 @@ base_url = "http://publicaccess.sevenoaks.gov.uk/publicaccess/tdc/"

import PublicAccess

parser = PublicAccess.PublicAccessParser(authority_name,
authority_short_name,
base_url)
parser = PublicAccess.PublicAccessParser(authority_name, authority_short_name, base_url)

xml = parser.getResults(day, month, year)



+ 1
- 3
cgi-bin/South Bucks.cgi View File

@@ -20,9 +20,7 @@ base_url = "http://sbdc-paweb.southbucks.gov.uk/publicaccess/tdc/"

import PublicAccess

parser = PublicAccess.PublicAccessParser(authority_name,
authority_short_name,
base_url)
parser = PublicAccess.PublicAccessParser(authority_name, authority_short_name, base_url)

xml = parser.getResults(day, month, year)



+ 1
- 3
cgi-bin/South Ribble.cgi View File

@@ -20,9 +20,7 @@ base_url = "http://publicaccess.southribble.gov.uk/publicaccess/tdc/"

import PublicAccess

parser = PublicAccess.PublicAccessParser(authority_name,
authority_short_name,
base_url)
parser = PublicAccess.PublicAccessParser(authority_name, authority_short_name, base_url)

xml = parser.getResults(day, month, year)



+ 1
- 3
cgi-bin/South Staffordshire.cgi View File

@@ -20,9 +20,7 @@ base_url = "https://services.sstaffs.gov.uk/PublicAccess/tdc/"

import PublicAccess

parser = PublicAccess.PublicAccessParser(authority_name,
authority_short_name,
base_url)
parser = PublicAccess.PublicAccessParser(authority_name, authority_short_name, base_url)

xml = parser.getResults(day, month, year)



+ 1
- 3
cgi-bin/Southampton.cgi View File

@@ -20,9 +20,7 @@ base_url = "http://publicaccess.southampton.gov.uk/publicaccess/tdc/"

import PublicAccess

parser = PublicAccess.PublicAccessParser(authority_name,
authority_short_name,
base_url)
parser = PublicAccess.PublicAccessParser(authority_name, authority_short_name, base_url)

xml = parser.getResults(day, month, year)



+ 1
- 3
cgi-bin/Spelthorne.cgi View File

@@ -20,9 +20,7 @@ base_url = "http://phoenix.spelthorne.gov.uk/PublicAccess/tdc/"

import PublicAccess

parser = PublicAccess.PublicAccessParser(authority_name,
authority_short_name,
base_url)
parser = PublicAccess.PublicAccessParser(authority_name, authority_short_name, base_url)

xml = parser.getResults(day, month, year)



+ 29
- 0
cgi-bin/St Helens.cgi View File

@@ -0,0 +1,29 @@
#!/usr/local/bin/python

# This is the parser for St Helens 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 = "St Helens Council"
authority_short_name = "St Helens"
base_url = "http://212.248.225.150:8080/"

import ApplicationSearchServletParser

parser = ApplicationSearchServletParser.StHelensSearchParser(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

+ 1
- 3
cgi-bin/Stevenage.cgi View File

@@ -20,9 +20,7 @@ base_url = "http://publicaccess.stevenage.gov.uk/publicaccess/tdc/"

import PublicAccess

parser = PublicAccess.PublicAccessParser(authority_name,
authority_short_name,
base_url)
parser = PublicAccess.PublicAccessParser(authority_name, authority_short_name, base_url)

xml = parser.getResults(day, month, year)



+ 1
- 3
cgi-bin/Stockton-On-Tees.cgi View File

@@ -20,9 +20,7 @@ base_url = "http://www.developmentcontrol.stockton.gov.uk/publicaccess/tdc/"

import PublicAccess

parser = PublicAccess.PublicAccessParser(authority_name,
authority_short_name,
base_url)
parser = PublicAccess.PublicAccessParser(authority_name, authority_short_name, base_url)

xml = parser.getResults(day, month, year)



+ 1
- 3
cgi-bin/Sunderland.cgi View File

@@ -20,9 +20,7 @@ base_url = "http://www.sunderland.gov.uk/publicaccess/tdc/"

import PublicAccess

parser = PublicAccess.PublicAccessParser(authority_name,
authority_short_name,
base_url)
parser = PublicAccess.PublicAccessParser(authority_name, authority_short_name, base_url)

xml = parser.getResults(day, month, year)



+ 1
- 3
cgi-bin/Test Valley.cgi View File

@@ -20,9 +20,7 @@ base_url = "http://publicaccess.testvalley.gov.uk/publicaccess/tdc/"

import PublicAccess

parser = PublicAccess.PublicAccessParser(authority_name,
authority_short_name,
base_url)
parser = PublicAccess.PublicAccessParser(authority_name, authority_short_name, base_url)

xml = parser.getResults(day, month, year)



+ 1
- 3
cgi-bin/Tonbridge.cgi View File

@@ -20,9 +20,7 @@ base_url = "http://publicaccess.tmbc.gov.uk/publicaccess/tdc/"

import PublicAccess

parser = PublicAccess.PublicAccessParser(authority_name,
authority_short_name,
base_url)
parser = PublicAccess.PublicAccessParser(authority_name, authority_short_name, base_url)

xml = parser.getResults(day, month, year)



+ 1
- 3
cgi-bin/Torbay.cgi View File

@@ -20,9 +20,7 @@ base_url = "http://www.torbay.gov.uk/publicaccess/tdc/"

import PublicAccess

parser = PublicAccess.PublicAccessParser(authority_name,
authority_short_name,
base_url)
parser = PublicAccess.PublicAccessParser(authority_name, authority_short_name, base_url)

xml = parser.getResults(day, month, year)



+ 1
- 3
cgi-bin/Waveney.cgi View File

@@ -20,9 +20,7 @@ base_url = "http://publicaccess.waveney.gov.uk/PublicAccess/tdc/"

import PublicAccess

parser = PublicAccess.PublicAccessParser(authority_name,
authority_short_name,
base_url)
parser = PublicAccess.PublicAccessParser(authority_name, authority_short_name, base_url)

xml = parser.getResults(day, month, year)



+ 29
- 0
cgi-bin/Wear Valley.cgi View File

@@ -0,0 +1,29 @@
#!/usr/local/bin/python

# This is the parser for Wear Valley 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 = "Wear Valley District Council"
authority_short_name = "Wear Valley"
base_url = "http://planning.wearvalley.gov.uk/"

import ApplicationSearchServletParser

parser = ApplicationSearchServletParser.WearValleySearchParser(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

+ 29
- 0
cgi-bin/Wellingborough.cgi View File

@@ -0,0 +1,29 @@
#!/usr/local/bin/python

# This is the parser for Wellingborough 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 = "Wellingborough Borough Council"
authority_short_name = "Wellingborough"
base_url = "http://planning.wellingborough.gov.uk/"

import ApplicationSearchServletParser

parser = ApplicationSearchServletParser.WellingboroughSearchParser(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

+ 1
- 3
cgi-bin/West Lancashire.cgi View File

@@ -20,9 +20,7 @@ base_url = "http://publicaccess.westlancsdc.gov.uk/PublicAccess/tdc/"

import PublicAccess

parser = PublicAccess.PublicAccessParser(authority_name,
authority_short_name,
base_url)
parser = PublicAccess.PublicAccessParser(authority_name, authority_short_name, base_url)

xml = parser.getResults(day, month, year)



+ 1
- 3
cgi-bin/West Norfolk.cgi View File

@@ -20,9 +20,7 @@ base_url = "http://online.west-norfolk.gov.uk/publicaccess/tdc/"

import PublicAccess

parser = PublicAccess.PublicAccessParser(authority_name,
authority_short_name,
base_url)
parser = PublicAccess.PublicAccessParser(authority_name, authority_short_name, base_url)

xml = parser.getResults(day, month, year)



+ 1
- 3
cgi-bin/Woking.cgi View File

@@ -20,9 +20,7 @@ base_url = "http://caps.woking.gov.uk/publicaccess/tdc/"

import PublicAccess

parser = PublicAccess.PublicAccessParser(authority_name,
authority_short_name,
base_url)
parser = PublicAccess.PublicAccessParser(authority_name, authority_short_name, base_url)

xml = parser.getResults(day, month, year)



+ 1
- 3
cgi-bin/York.cgi View File

@@ -20,9 +20,7 @@ base_url = "http://planning.york.gov.uk/PublicAccess/tdc/"

import PublicAccess

parser = PublicAccess.PublicAccessParser(authority_name,
authority_short_name,
base_url)
parser = PublicAccess.PublicAccessParser(authority_name, authority_short_name, base_url)

xml = parser.getResults(day, month, year)



+ 518
- 0
python_scrapers/ApplicationSearchServletParser.py View File

@@ -0,0 +1,518 @@

import urllib, urllib2

import HTMLParser
import urlparse
import datetime, time


from PlanningUtils import PlanningAuthorityResults, \
getPostcodeFromText, \
PlanningApplication


# The search results list will give us reference, location, description,
# and info url of each app.

# The info page gives us the received date,
# and comment_url

class ApplicationSearchServletParser(HTMLParser.HTMLParser):
"""Parser for ApplicationSearchServlet sites.
"""


# These indicate the column of the main table containing this
# piece of information.
# They should be overridden in subclasses

#self._rows_to_ignore_at_start = None

_reference_col_no = None
_location_col_no = None
_description_col_no = None
def __init__(self,
authority_name,
authority_short_name,
base_url,
debug=False):
HTMLParser.HTMLParser.__init__(self)

self.authority_name = authority_name
self.authority_short_name = authority_short_name
self.base_url = base_url
self.debug = debug

self.search_url = urlparse.urljoin(self.base_url, "portal/servlets/ApplicationSearchServlet")

self._comment_url = urlparse.urljoin(self.base_url, "portal/servlets/PlanningComments?REFNO=%(council_reference)s")

self._requested_date = None

# 0 - no
# 1 - maybe
# 2 - yes
# 3 - finished
self._in_results_table = 0
self._tr_count = 0
self._td_count = 0
self._data_list = []

# this will hold the application we are currently working on.
self._current_application = None
# The object which stores our set of planning application results
self._results = PlanningAuthorityResults(self.authority_name, self.authority_short_name)

def _checkAttrsForResultsTable(self, attrs):
raise SystemError

def handle_starttag(self, tag, attrs):
if self.debug:
print tag, attrs
if tag == "table" and self._in_results_table == 0:
self._in_results_table = 1
self._checkAttrsForResultsTable(attrs)
elif tag == "tr" and self._in_results_table == 2:
self._tr_count += 1
self._td_count = 0
self._data_list = []
self._current_application = PlanningApplication()
elif tag == "td" and self._in_results_table == 2:
self._td_count += 1

elif tag == "a" and self._in_results_table == 2 and self._td_count == self._reference_col_no:
# The href attribute contains the link to the info page
for (key, value) in attrs:
if key == "href":
self._current_application.info_url = urlparse.urljoin(self.search_url, value)
def handle_endtag(self, tag):
if self.debug:
print "ending: " , tag
if tag == "table" and self._in_results_table == 2:
self._in_results_table = 3
elif tag == "tr" and self._in_results_table == 2:
if self._current_application.council_reference is not None:
# get the received date
#info_response = urllib2.urlopen(self._current_application.info_url)
#info_page_parser = InfoPageParser()
#info_page_parser.feed(info_response.read())
self._current_application.date_received = self._requested_date#info_page_parser.date_received
self._results.addApplication(self._current_application)
elif tag == "td" and self._in_results_table == 2:
if self._td_count == self._location_col_no:
data = ' '.join(self._data_list).strip()
self._current_application.address = data
postcode = getPostcodeFromText(data)
if postcode is not None:
self._current_application.postcode = postcode
self._data_list = []
elif self._td_count == self._description_col_no:
data = ' '.join(self._data_list).strip()
self._current_application.description = data
self._data_list = []
elif tag == 'a' and self._in_results_table == 2 and self._td_count == self._reference_col_no:
data = ''.join(self._data_list).strip()
self._current_application.council_reference = data
self._current_application.comment_url = self._comment_url %{"council_reference": data}
self._data_list = []

def handle_data(self, data):
if self.debug:
print data
if self._in_results_table == 2:
if self._td_count == self._reference_col_no or \
self._td_count == self._location_col_no or \
self._td_count == self._description_col_no:
self._data_list.append(data.strip())


def getResultsByDayMonthYear(self, day, month, year):
"""This will return an ApplicationResults object containg the
applications for the date passed in."""

# Were going to need a datetime object for the requested date
self._requested_date = datetime.date(year, month, day)

required_format = "%d-%m-%Y"

search_data = urllib.urlencode({"ReceivedDateFrom":self._requested_date.strftime(required_format),
"ReceivedDateTo":self._requested_date.strftime(required_format)})
search_request = urllib2.Request(self.search_url, search_data)
search_response = urllib2.urlopen(search_request)
search_contents = search_response.read()

self.feed(search_contents)

return self._results
def getResults(self, day, month, year):
return self.getResultsByDayMonthYear(int(day), int(month), int(year)).displayXML()


class CoventrySearchParser(ApplicationSearchServletParser):
# results table spotter
# width="100%" border="0"

_reference_col_no = 1
_location_col_no = 5
_description_col_no = 8
def _checkAttrsForResultsTable(self, attrs):
got_width = False
got_border = False
for key, value in attrs:
if key == 'width' and value == '100%':
got_width = True
elif key == 'border' and value == '0':
got_border = True

if got_width and got_border:
self._in_results_table = 2
else:
self._in_results_table = 0



class AllerdaleSearchParser(ApplicationSearchServletParser):
# results table spotter
#class="nis_table" summary="Table of planning applications that matched your query, showing reference number, received date, and address"

_reference_col_no = 1
_location_col_no = 3
_description_col_no = 6
def _checkAttrsForResultsTable(self, attrs):
got_class = False
got_summary = False
for key, value in attrs:
if key == 'class' and value == 'nis_table':
got_class = True
elif key == 'summary' and value == 'Table of planning applications that matched your query, showing reference number, received date, and address':
got_summary = True

if got_class and got_summary:
self._in_results_table = 2
else:
self._in_results_table = 0



class AlnwickSearchParser(ApplicationSearchServletParser):
# results table spotter
# width="100%" class="niscontent"
_reference_col_no = 1
_location_col_no = 2
_description_col_no = 7
def _checkAttrsForResultsTable(self, attrs):
got_class = False
for key, value in attrs:
if key == 'class' and value == 'niscontent':
got_class = True

if got_class:
self._in_results_table = 2
else:
self._in_results_table = 0


class BarrowSearchParser(ApplicationSearchServletParser):
# results table spotter
# width="100%" border="0"
_reference_col_no = 1
_location_col_no = 3
_description_col_no = 6
def _checkAttrsForResultsTable(self, attrs):
got_width = False
got_border = False
for key, value in attrs:
if key == 'width' and value == '100%':
got_width = True
elif key == 'border' and value == '0':
got_border = True

if got_width and got_border:
self._in_results_table = 2
else:
self._in_results_table = 0


class HartlepoolSearchParser(ApplicationSearchServletParser):
# results table spotter
# summary="Table of planning applications that matched your query, showing reference number, received date, and address"
_reference_col_no = 1
_location_col_no = 2
_description_col_no = 3
def _checkAttrsForResultsTable(self, attrs):
got_summary = False
for key, value in attrs:
if key == 'summary' and value == "Table of planning applications that matched your query, showing reference number, received date, and address":
got_summary = True

if got_summary:
self._in_results_table = 2
else:
self._in_results_table = 0


class NorthWarksSearchParser(ApplicationSearchServletParser):
# results table spotter
# table width="100%" border="0" cellspacing="0" cellpadding="0"
_reference_col_no = 1
_location_col_no = 3
_description_col_no = 4
def _checkAttrsForResultsTable(self, attrs):
got_width = False
got_border = False
got_cellspacing = False
got_cellpadding = False
for key, value in attrs:
if key == 'width' and value == "100%":
got_width = True
elif key == 'border' and value == '0':
got_border = True
elif key == 'cellspacing' and value == '0':
got_cellspacing = True
elif key == 'cellpadding' and value == '0':
got_cellpadding = True

if got_width and got_border and got_cellspacing and got_cellpadding:
self._in_results_table = 2
else:
self._in_results_table = 0

class StHelensSearchParser(ApplicationSearchServletParser):
# results table spotter
# summary="Search Results List"
_reference_col_no = 1
_location_col_no = 2
_description_col_no = 5
def _checkAttrsForResultsTable(self, attrs):
got_summary = False
for key, value in attrs:
if key == 'summary' and value == "Search Results List":
got_summary = True

if got_summary:
self._in_results_table = 2
else:
self._in_results_table = 0

class EasingtonSearchParser(ApplicationSearchServletParser):
# results table spotter
#table width="100%" border="0" cellspacing="0" cellpadding="0"
_reference_col_no = 1
_location_col_no = 3
_description_col_no = 6
def _checkAttrsForResultsTable(self, attrs):
got_width = False
got_border = False
got_cellspacing = False
got_cellpadding = False
for key, value in attrs:
if key == 'width' and value == "100%":
got_width = True
elif key == 'border' and value == '0':
got_border = True
elif key == 'cellspacing' and value == '0':
got_cellspacing = True
elif key == 'cellpadding' and value == '0':
got_cellpadding = True

if got_width and got_border and got_cellspacing and got_cellpadding:
self._in_results_table = 2
else:
self._in_results_table = 0


class HighPeakSearchParser(ApplicationSearchServletParser):
# results table spotter
# table class="data" width="95%"
_reference_col_no = 1
_location_col_no = 2
_description_col_no = 5
def _checkAttrsForResultsTable(self, attrs):
got_class = False
got_width = False
for key, value in attrs:
if key == 'class' and value == "data":
got_class = True
if key == 'width' and value == "95%":
got_width = True

if got_class and got_width:
self._in_results_table = 2
else:
self._in_results_table = 0


class WearValleySearchParser(ApplicationSearchServletParser):
# results table spotter
# table summary="Table of planning applications that matched your query, showing reference number, received date, and address"
_reference_col_no = 1
_location_col_no = 3
_description_col_no = 4
def _checkAttrsForResultsTable(self, attrs):
got_summary= False
for key, value in attrs:
if key == 'summary' and value == "Table of planning applications that matched your query, showing reference number, received date, and address":
got_summary = True

if got_summary:
self._in_results_table = 2
else:
self._in_results_table = 0


class WellingboroughSearchParser(ApplicationSearchServletParser):
# results table spotter
#table width="100%" border="0"
_reference_col_no = 1
_location_col_no = 3
_description_col_no = 6
def _checkAttrsForResultsTable(self, attrs):
got_width = False
got_border = False
for key, value in attrs:
if key == 'width' and value == "100%":
got_width = True
elif key == 'border' and value == "0":
got_border = True

if got_width and got_border:
self._in_results_table = 2
else:
self._in_results_table = 0

class EalingSearchParser(ApplicationSearchServletParser):
# results table spotter
# table width="100%" cellspacing="0px" border="1px" cellpadding="2px" bordercolor="#FFFFFF"
_reference_col_no = 1
_location_col_no = 3
_description_col_no = 4
def _checkAttrsForResultsTable(self, attrs):
got_width = False
got_cellspacing = False
got_border = False
got_cellpadding = False
got_bordercolor = False
for key, value in attrs:
if key == 'width' and value == "100%":
got_width = True
elif key == 'cellspacing' and value == "0px":
got_cellspacing = True
elif key == 'border' and value == "1px":
got_border = True
elif key == 'cellpadding' and value == "2px":
got_cellpadding = True
elif key == 'bordercolor' and value == "#FFFFFF":
got_bordercolor = True

if got_width and got_cellspacing and got_border and got_cellpadding and got_bordercolor:
self._in_results_table = 2
else:
self._in_results_table = 0


class HaringeySearchParser(ApplicationSearchServletParser):
# results table spotter
# summary="Application Results"
_reference_col_no = 1
_location_col_no = 2
_description_col_no = 5
def _checkAttrsForResultsTable(self, attrs):
got_summary= False
for key, value in attrs:
if key == 'summary' and value == "Application Results":
got_summary = True

if got_summary:
self._in_results_table = 2
else:
self._in_results_table = 0


class DenbighshireSearchParser(ApplicationSearchServletParser):
# results table spotter
#table width="100%" border="0"
_reference_col_no = 1
_location_col_no = 3
_description_col_no = 5
def _checkAttrsForResultsTable(self, attrs):
got_width = False
got_border = False
for key, value in attrs:
if key == 'width' and value == "100%":
got_width = True
elif key == 'border' and value == "0":
got_border = True

if got_width and got_border:
self._in_results_table = 2
else:
self._in_results_table = 0


if __name__ == "__main__":
#parser = CoventrySearchParser("Coventry", "Coventry", "http://planning.coventry.gov.uk")
#print parser.getResults(28,3,2007)
#parser = AllerdaleSearchParser("Allerdale", "Allerdale", "http://planning.allerdale.gov.uk")
#print parser.getResults(28,3,2007)
#parser = AlnwickSearchParser("Alnwick", "Alnwick", "http://services.castlemorpeth.gov.uk:7777")
#print parser.getResults(28,3,2007)
#parser = BarrowSearchParser("Barrow", "Barrow", "http://localportal.barrowbc.gov.uk")
#print parser.getResults(28,3,2007)
#parser = HartlepoolSearchParser("Hartlepool", "Hartlepool", "http://eforms.hartlepool.gov.uk:7777")
#print parser.getResults(28,3,2007)
#parser = NorthWarksSearchParser("North Warwickshire", "North Warks", "http://planning.northwarks.gov.uk")
#print parser.getResults(28,3,2007)
#parser = StHelensSearchParser("St Helens", "St Helens", "http://212.248.225.150:8080")
#print parser.getResults(28,3,2007)
#parser = EasingtonSearchParser("Easington", "Easington", "http://planning.easington.gov.uk")
#print parser.getResults(28,3,2007)
#parser = HighPeakSearchParser("High Peak", "High Peak", "http://planning.highpeak.gov.uk")
#print parser.getResults(20,3,2007)
#parser = WearValleySearchParser("Wear Valley", "Wear Valley", "http://planning.wearvalley.gov.uk")
#print parser.getResults(20,3,2007)
#parser = WellingboroughSearchParser("Wellingborough", "Wellingborough", "http://planning.wellingborough.gov.uk")
#print parser.getResults(20,3,2007)
#parser = EalingSearchParser("Ealing", "Ealing", "http://www.pam.ealing.gov.uk")
#print parser.getResults(20,3,2007)
#parser = HaringeySearchParser("Haringey", "Haringey", "http://www.planningservices.haringey.gov.uk")
#print parser.getResults(20,3,2007)
#parser = DenbighshireSearchParser("Denbighshire", "Denbighshire", "http://planning.denbighshire.gov.uk")
#print parser.getResults(20,3,2007)
pass

+ 2
- 4
python_scrapers/CGITemplate View File

@@ -16,11 +16,9 @@ authority_name = "%(authority_name)s"
authority_short_name = "%(authority_short_name)s"
base_url = "%(base_url)s"

import PublicAccess
import %(module)s

parser = PublicAccess.PublicAccessParser(authority_name,
authority_short_name,
base_url)
parser = %(module)s.%(parser)s(authority_name, authority_short_name, base_url)

xml = parser.getResults(day, month, year)



+ 2
- 0
python_scrapers/OtherFilesToCopy.csv View File

@@ -3,3 +3,5 @@
"PlanningUtils.py", "420"
"SouthOxfordshireParser.py", "420"
"SouthOxfordshire.cgi", "493"
"ApplicationSearchServletParser.py", "420"


+ 2
- 2
python_scrapers/PlanningUtils.py View File

@@ -56,7 +56,7 @@ class PlanningAuthorityResults:

def __repr__(self):
return self.displayXML()
def displayXML(self):
"""This should display the contents of this object in the planningalerts format.
i.e. in the same format as this one:
@@ -88,7 +88,7 @@ class PlanningApplication:

def __repr__(self):
return self.displayXML()
def displayXML(self):
return "<application>\n" +\
"<council_reference>%s</council_reference>\n" %xmlQuote(self.council_reference) +\


+ 70
- 56
python_scrapers/PublicAccessSites.csv View File

@@ -1,56 +1,70 @@
"authority_name", "authority_short_name", "base_url"
"City of York Council", "York", "http://planning.york.gov.uk/PublicAccess/tdc/"
"Cherwell District Council", "Cherwell", "http://cherweb.cherwell-dc.gov.uk/publicaccess/tdc/"
"Angus Council", "Angus", "http://planning.angus.gov.uk/PublicAccess/tdc/"
"Huntingdonshire District Council", "Huntingdonshire", "http://planning.huntsdc.gov.uk/publicaccess/tdc/"
"South Staffordshire Council", "South Staffordshire", "https://services.sstaffs.gov.uk/PublicAccess/tdc/"
"Bexley Council", "Bexley", "http://publicaccess.bexley.gov.uk/publicaccess/tdc/"
"Lancaster City Council", "Lancaster", "http://planapps.lancaster.gov.uk/PublicAccess/tdc/"
"Bristol City Council", "Bristol", "http://e2eweb.bristol-city.gov.uk/publicaccess/tdc/"
"Portsmouth City Council", "Portsmouth", "http://planning.portsmouth.gov.uk/PublicAccess/tdc/"
"The Borough of Oadby and Wigston", "Oadby and Wigston", "http://web.owbc.net/PublicAccess/tdc/"
"Test Valley Borough Council", "Test Valley", "http://publicaccess.testvalley.gov.uk/publicaccess/tdc/"
"Kings Lynn and West Norfolk Borough Council", "West Norfolk", "http://online.west-norfolk.gov.uk/publicaccess/tdc/"
"Sunderland City Council", "Sunderland", "http://www.sunderland.gov.uk/publicaccess/tdc/"
"Southampton City Council", "Southampton", "http://publicaccess.southampton.gov.uk/publicaccess/tdc/"
"Bath and North East Somerset", "Bath", "http://planning.bathnes.gov.uk/publicaccess/tdc/"
"Buckinghamshire County Council", "Buckinghamshire", "http://www.bucksplanning.gov.uk/PublicAccess/tdc/"
"Spelthorne Borough Council", "Spelthorne", "http://phoenix.spelthorne.gov.uk/PublicAccess/tdc/"
"Stevenage Borough Council", "Stevenage", "http://publicaccess.stevenage.gov.uk/publicaccess/tdc/"
"Tonbridge and Malling Borough Council", "Tonbridge", "http://publicaccess.tmbc.gov.uk/publicaccess/tdc/"
"Hart District Council", "Hart", "http://publicaccess.hart.gov.uk/publicaccess/tdc/"
"Luton Borough Council", "Luton", "http://www.eplan.luton.gov.uk/PublicAccess/tdc/"
"Rushmoor Borough Council", "Rushmoor", "http://pa-dc.rushmoor.gov.uk/publicaccess/tdc/"
"Blaby District Council", "Blaby", "http://www.blaby.gov.uk/PublicAccess/tdc/"
"East Devon District Council", "East Devon", "http://planning.eastdevon.gov.uk/PublicAccess/tdc/"
"Mid Devon District Council", "Mid Devon", "http://planning.middevon.gov.uk/publicaccess/tdc/"
"Sevenoaks District Council", "Sevenoaks", "http://publicaccess.sevenoaks.gov.uk/publicaccess/tdc/"
"Woking Borough Council", "Woking", "http://caps.woking.gov.uk/publicaccess/tdc/"
"Basildon District Council", "Basildon", "http://planning.basildon.gov.uk/publicaccess/tdc/"
"The City of Edinburgh Council", "Edinburgh", "http://citydev-portal.edinburgh.gov.uk/publicaccess/dc/"
"Fenland District Council", "Fenland", "http://www.fenland.gov.uk/publicaccess/dc/"
"Scarborough Borough Council", "Scarborough", "http://planning.scarborough.gov.uk/publicaccess/dc/"
"Harrogate Borough Council", "Harrogate", "http://publicaccess.harrogate.gov.uk/publicaccess/tdc/"
"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/"
"Chelmsford Borough Council", "Chelmsford", "http://web1.chelmsfordbc.gov.uk/publicaccess/tdc/"
"Knowsley Council", "Knowsley", "http://publicaccess.knowsley.gov.uk/PublicAccess/tdc/"
"North Tyneside Council", "North Tyneside", "http://publicaccess.northtyneside.gov.uk/PublicAccess/tdc/"
"City of London", "City of London", "http://www.planning.cityoflondon.gov.uk/tdc/"
"London Borough Of Hammersmith and Fulham", "Hammersmith and Fulham", "http://www.apps.lbhf.gov.uk/PublicAccess/tdc/"
"Aylesbury Vale District Council", "Aylesbury Vale", "http://eplanning.aylesburyvaledc.gov.uk/tdc/"
"Epsom and Ewell Borough Council", "Epsom and Ewell", "http://eplanning.epsom-ewell.gov.uk/publicaccess/tdc/"
"Gedling Borough Council", "Gedling", "http://publicaccess.gedling.gov.uk/publicaccess/tdc/"
"Cornwall County Council", "Cornwall", "http://planapps.cornwall.gov.uk/publicaccess/tdc/"
"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/"
"Dundee City Council", "Dundee", "http://bwarrant.dundeecity.gov.uk/publicaccess/tdc/"
"Northumberland County Council", "Northumberland", "http://planning.northumberland.gov.uk/publicaccess/tdc/"
"Milton Keynes Council", "Milton Keynes", "http://publicaccess.milton-keynes.gov.uk/tdc/"
"authority_name", "authority_short_name", "base_url", "module", "parser"
"City of York Council", "York", "http://planning.york.gov.uk/PublicAccess/tdc/", "PublicAccess", "PublicAccessParser", "PublicAccess", "PublicAccessParser"
"Cherwell District Council", "Cherwell", "http://cherweb.cherwell-dc.gov.uk/publicaccess/tdc/", "PublicAccess", "PublicAccessParser"
"Angus Council", "Angus", "http://planning.angus.gov.uk/PublicAccess/tdc/", "PublicAccess", "PublicAccessParser"
"Huntingdonshire District Council", "Huntingdonshire", "http://planning.huntsdc.gov.uk/publicaccess/tdc/", "PublicAccess", "PublicAccessParser"
"South Staffordshire Council", "South Staffordshire", "https://services.sstaffs.gov.uk/PublicAccess/tdc/", "PublicAccess", "PublicAccessParser"
"Bexley Council", "Bexley", "http://publicaccess.bexley.gov.uk/publicaccess/tdc/", "PublicAccess", "PublicAccessParser"
"Lancaster City Council", "Lancaster", "http://planapps.lancaster.gov.uk/PublicAccess/tdc/", "PublicAccess", "PublicAccessParser"
"Bristol City Council", "Bristol", "http://e2eweb.bristol-city.gov.uk/publicaccess/tdc/", "PublicAccess", "PublicAccessParser"
"Portsmouth City Council", "Portsmouth", "http://planning.portsmouth.gov.uk/PublicAccess/tdc/", "PublicAccess", "PublicAccessParser"
"The Borough of Oadby and Wigston", "Oadby and Wigston", "http://web.owbc.net/PublicAccess/tdc/", "PublicAccess", "PublicAccessParser"
"Test Valley Borough Council", "Test Valley", "http://publicaccess.testvalley.gov.uk/publicaccess/tdc/", "PublicAccess", "PublicAccessParser"
"Kings Lynn and West Norfolk Borough Council", "West Norfolk", "http://online.west-norfolk.gov.uk/publicaccess/tdc/", "PublicAccess", "PublicAccessParser"
"Sunderland City Council", "Sunderland", "http://www.sunderland.gov.uk/publicaccess/tdc/", "PublicAccess", "PublicAccessParser"
"Southampton City Council", "Southampton", "http://publicaccess.southampton.gov.uk/publicaccess/tdc/", "PublicAccess", "PublicAccessParser"
"Bath and North East Somerset", "Bath", "http://planning.bathnes.gov.uk/publicaccess/tdc/", "PublicAccess", "PublicAccessParser"
"Buckinghamshire County Council", "Buckinghamshire", "http://www.bucksplanning.gov.uk/PublicAccess/tdc/", "PublicAccess", "PublicAccessParser"
"Spelthorne Borough Council", "Spelthorne", "http://phoenix.spelthorne.gov.uk/PublicAccess/tdc/", "PublicAccess", "PublicAccessParser"
"Stevenage Borough Council", "Stevenage", "http://publicaccess.stevenage.gov.uk/publicaccess/tdc/", "PublicAccess", "PublicAccessParser"
"Tonbridge and Malling Borough Council", "Tonbridge", "http://publicaccess.tmbc.gov.uk/publicaccess/tdc/", "PublicAccess", "PublicAccessParser"
"Hart District Council", "Hart", "http://publicaccess.hart.gov.uk/publicaccess/tdc/", "PublicAccess", "PublicAccessParser"
"Luton Borough Council", "Luton", "http://www.eplan.luton.gov.uk/PublicAccess/tdc/", "PublicAccess", "PublicAccessParser"
"Rushmoor Borough Council", "Rushmoor", "http://pa-dc.rushmoor.gov.uk/publicaccess/tdc/", "PublicAccess", "PublicAccessParser"
"Blaby District Council", "Blaby", "http://www.blaby.gov.uk/PublicAccess/tdc/", "PublicAccess", "PublicAccessParser"
"East Devon District Council", "East Devon", "http://planning.eastdevon.gov.uk/PublicAccess/tdc/", "PublicAccess", "PublicAccessParser"
"Mid Devon District Council", "Mid Devon", "http://planning.middevon.gov.uk/publicaccess/tdc/", "PublicAccess", "PublicAccessParser"
"Sevenoaks District Council", "Sevenoaks", "http://publicaccess.sevenoaks.gov.uk/publicaccess/tdc/", "PublicAccess", "PublicAccessParser"
"Woking Borough Council", "Woking", "http://caps.woking.gov.uk/publicaccess/tdc/", "PublicAccess", "PublicAccessParser"
"Basildon District Council", "Basildon", "http://planning.basildon.gov.uk/publicaccess/tdc/", "PublicAccess", "PublicAccessParser"
"The City of Edinburgh Council", "Edinburgh", "http://citydev-portal.edinburgh.gov.uk/publicaccess/dc/", "PublicAccess", "PublicAccessParser"
"Fenland District Council", "Fenland", "http://www.fenland.gov.uk/publicaccess/dc/", "PublicAccess", "PublicAccessParser"
"Scarborough Borough Council", "Scarborough", "http://planning.scarborough.gov.uk/publicaccess/dc/", "PublicAccess", "PublicAccessParser"
"Harrogate Borough Council", "Harrogate", "http://publicaccess.harrogate.gov.uk/publicaccess/tdc/", "PublicAccess", "PublicAccessParser"
"Kerrier District Council", "Kerrier", "http://publicaccess.kerrier.gov.uk/publicaccess/tdc/", "PublicAccess", "PublicAccessParser"
"Oswestry Borough Council", "Oswestry", "http://193.114.205.78/PublicAccess/tdc/", "PublicAccess", "PublicAccessParser"
"Stockton-On-Tees Borough Council", "Stockton-On-Tees", "http://www.developmentcontrol.stockton.gov.uk/publicaccess/tdc/", "PublicAccess", "PublicAccessParser"
"Doncaster Metropolitan Borough Council", "Doncaster", "http://maps.doncaster.gov.uk/publicaccess/tdc/", "PublicAccess", "PublicAccessParser"
"Waveney District Council", "Waveney", "http://publicaccess.waveney.gov.uk/PublicAccess/tdc/", "PublicAccess", "PublicAccessParser"
"Chelmsford Borough Council", "Chelmsford", "http://web1.chelmsfordbc.gov.uk/publicaccess/tdc/", "PublicAccess", "PublicAccessParser"
"Knowsley Council", "Knowsley", "http://publicaccess.knowsley.gov.uk/PublicAccess/tdc/", "PublicAccess", "PublicAccessParser"
"North Tyneside Council", "North Tyneside", "http://publicaccess.northtyneside.gov.uk/PublicAccess/tdc/", "PublicAccess", "PublicAccessParser"
"City of London", "City of London", "http://www.planning.cityoflondon.gov.uk/tdc/", "PublicAccess", "PublicAccessParser"
"London Borough Of Hammersmith and Fulham", "Hammersmith and Fulham", "http://www.apps.lbhf.gov.uk/PublicAccess/tdc/", "PublicAccess", "PublicAccessParser"
"Aylesbury Vale District Council", "Aylesbury Vale", "http://eplanning.aylesburyvaledc.gov.uk/tdc/", "PublicAccess", "PublicAccessParser"
"Epsom and Ewell Borough Council", "Epsom and Ewell", "http://eplanning.epsom-ewell.gov.uk/publicaccess/tdc/", "PublicAccess", "PublicAccessParser"
"Gedling Borough Council", "Gedling", "http://publicaccess.gedling.gov.uk/publicaccess/tdc/", "PublicAccess", "PublicAccessParser"
"Cornwall County Council", "Cornwall", "http://planapps.cornwall.gov.uk/publicaccess/tdc/", "PublicAccess", "PublicAccessParser"
"South Bucks District Council", "South Bucks", "http://sbdc-paweb.southbucks.gov.uk/publicaccess/tdc/", "PublicAccess", "PublicAccessParser"
"Malvern Hills District Council", "Malvern Hills", "http://public.malvernhills.gov.uk/publicaccess/tdc/", "PublicAccess", "PublicAccessParser"
"West Lancashire District Council", "West Lancashire", "http://publicaccess.westlancsdc.gov.uk/PublicAccess/tdc/", "PublicAccess", "PublicAccessParser"
"Torbay Council", "Torbay", "http://www.torbay.gov.uk/publicaccess/tdc/", "PublicAccess", "PublicAccessParser"
"South Ribble Borough Council", "South Ribble", "http://publicaccess.southribble.gov.uk/publicaccess/tdc/", "PublicAccess", "PublicAccessParser"
"Peterborough City Council", "Peterborough", "http://194.72.246.15/publicaccess/dc/", "PublicAccess", "PublicAccessParser"
"Dundee City Council", "Dundee", "http://bwarrant.dundeecity.gov.uk/publicaccess/tdc/", "PublicAccess", "PublicAccessParser"
"Northumberland County Council", "Northumberland", "http://planning.northumberland.gov.uk/publicaccess/tdc/", "PublicAccess", "PublicAccessParser"
"Milton Keynes Council", "Milton Keynes", "http://publicaccess.milton-keynes.gov.uk/tdc/", "PublicAccess", "PublicAccessParser"
"Coventry City Council", "Coventry", "http://planning.coventry.gov.uk/", "ApplicationSearchServletParser", "CoventrySearchParser"
"Alnwick District Council", "Alnwick", "http://services.castlemorpeth.gov.uk:7777/", "ApplicationSearchServletParser", "AlnwickSearchParser"
"Haringey Council", "Haringey", "http://www.planningservices.haringey.gov.uk/", "ApplicationSearchServletParser", "HaringeySearchParser"
"Hartlepool Borough Council", "Hartlepool", "http://eforms.hartlepool.gov.uk:7777/", "ApplicationSearchServletParser", "HartlepoolSearchParser"
"North Warwickshire Borough Council", "North Warwickshire", "http://planning.northwarks.gov.uk/", "ApplicationSearchServletParser", "NorthWarksSearchParser"
"St Helens Council", "St Helens", "http://212.248.225.150:8080/", "ApplicationSearchServletParser", "StHelensSearchParser"
"District of Easington", "Easington", "http://planning.easington.gov.uk/", "ApplicationSearchServletParser", "EasingtonSearchParser"
"High Peak Borough Council", "High Peak", "http://planning.highpeak.gov.uk/", "ApplicationSearchServletParser", "HighPeakSearchParser"
"Wellingborough Borough Council", "Wellingborough", "http://planning.wellingborough.gov.uk/", "ApplicationSearchServletParser", "WellingboroughSearchParser"
"Barrow Borough Council", "Barrow", "http://localportal.barrowbc.gov.uk/", "ApplicationSearchServletParser", "BarrowSearchParser"
"Allerdale Borough Council", "Allerdale", "http://planning.allerdale.gov.uk/", "ApplicationSearchServletParser", "AllerdaleSearchParser"
"Ealing Council", "Ealing", "http://www.pam.ealing.gov.uk/", "ApplicationSearchServletParser", "EalingSearchParser"
"Denbighshire County Council", "Denbighshire", "http://planning.denbighshire.gov.uk/", "ApplicationSearchServletParser", "DenbighshireSearchParser"
"Wear Valley District Council", "Wear Valley", "http://planning.wearvalley.gov.uk/", "ApplicationSearchServletParser", "WearValleySearchParser"

+ 4
- 4
python_scrapers/createCGI.sh View File

@@ -1,14 +1,14 @@
#!/bin/bash

echo Removing contents of CGI directory
svn rm --force ../CGI/*
echo Removing contents of directory cgi-bin
svn rm --force ../cgi-bin/*

echo Running generateCGIScripts
python generateCGIScripts.py

svn add ../CGI/*
svn add ../cgi-bin/*

#echo Committing changes to svn
#(cd ../CGI ; svn commit -m "Removing and regenerating CGI directory")
#(cd ../cgi-bin ; svn commit -m "Removing and regenerating directory cgi-bin")

echo Done

+ 2
- 2
python_scrapers/generateCGIScripts.py View File

@@ -3,9 +3,9 @@
list_of_sites_filename = "PublicAccessSites.csv"
other_files_to_copy_filename = "OtherFilesToCopy.csv"
template_filename = "CGITemplate"
python_location = "/usr/bin/python"
python_location = "/usr/local/bin/python"

cgi_dir = "../CGI/"
cgi_dir = "../cgi-bin/"

import csv
from os import chmod


Loading…
Cancel
Save