From 7e423683f56a92a00658dea98550b6885ed94731 Mon Sep 17 00:00:00 2001 From: "duncan.parkes" Date: Sun, 3 Feb 2008 14:41:13 +0000 Subject: [PATCH] Fix Canterbury parser. --- python_scrapers/AcolnetParser.py | 6 +++--- python_scrapers/ApplicationSearchServletParser.py | 4 ++-- python_scrapers/PublicAccess.py | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/python_scrapers/AcolnetParser.py b/python_scrapers/AcolnetParser.py index eaa2f96..2f1bb89 100644 --- a/python_scrapers/AcolnetParser.py +++ b/python_scrapers/AcolnetParser.py @@ -226,7 +226,7 @@ class CanterburyParser(AcolnetParser): """Here the apps are one row each in a big table.""" def _getResultsSections(self, soup): - return soup.find("table", {"class": "results-table"}).findAll("tr")[1:] + return soup.find("table").findAll("tr")[1:] def _getDateReceived(self, app_table): date_str = app_table.findAll("td")[3].string.strip() @@ -344,7 +344,7 @@ if __name__ == '__main__': #parser = BoltonParser("Bolton", "Bolton", "http://www.planning.bolton.gov.uk/PlanningSearch/acolnetcgi.gov?ACTION=UNWRAP&RIPNAME=Root.pgesearch") #parser = BridgnorthParser("Bridgnorth", "Bridgnorth", "http://www2.bridgnorth-dc.gov.uk/planning/acolnetcgi.gov?ACTION=UNWRAP&RIPNAME=Root.PgeSearch") #parser = AcolnetParser("Bury", "Bury", "http://e-planning.bury.gov.uk/DCWebPages/acolnetcgi.gov?ACTION=UNWRAP&RIPNAME=Root.pgesearch") - #parser = CanterburyParser("Canterbury", "Canterbury", "http://planning.canterbury.gov.uk/scripts/acolnetcgi.exe?ACTION=UNWRAP&RIPNAME=Root.pgesearch") + parser = CanterburyParser("Canterbury", "Canterbury", "http://planning.canterbury.gov.uk/scripts/acolnetcgi.exe?ACTION=UNWRAP&RIPNAME=Root.pgesearch") #parser = CarlisleParser("Carlisle", "Carlisle", "http://planning.carlisle.gov.uk/acolnet/acolnetcgi.gov?ACTION=UNWRAP&RIPNAME=Root.pgesearch") #parser = AcolnetParser("Croydon", "Croydon", "http://planning.croydon.gov.uk/DCWebPages/acolnetcgi.gov?ACTION=UNWRAP&RIPNAME=Root.pgesearch") #parser = AcolnetParser("Derby", "Derby", "http://eplanning.derby.gov.uk/acolnet/planningpages02/acolnetcgi.exe?ACTION=UNWRAP&RIPNAME=Root.pgesearch") @@ -353,7 +353,7 @@ if __name__ == '__main__': #parser = AcolnetParser("Fylde", "Fylde", "http://www2.fylde.gov.uk/planning/acolnetcgi.gov?ACTION=UNWRAP&RIPNAME=Root.pgesearch") #parser = AcolnetParser("Guildford", "Guildford", "http://www.guildford.gov.uk/DLDC_Version_2/acolnetcgi.exe?ACTION=UNWRAP&RIPNAME=Root.pgesearch") #parser = AcolnetParser("Harlow", "Harlow", "http://planning.harlow.gov.uk/PlanningSearch/acolnetcgi.exe?ACTION=UNWRAP&RIPNAME=Root.pgesearch") - parser = AcolnetParser("Havant", "Havant", "http://www3.havant.gov.uk/scripts/planningpages/acolnetcgi.exe?ACTION=UNWRAP&RIPNAME=Root.pgesearch") + #parser = AcolnetParser("Havant", "Havant", "http://www3.havant.gov.uk/scripts/planningpages/acolnetcgi.exe?ACTION=UNWRAP&RIPNAME=Root.pgesearch") #parser = AcolnetParser("Hertsmere", "Hertsmere", "http://www2.hertsmere.gov.uk/ACOLNET/DCOnline//acolnetcgi.gov?ACTION=UNWRAP&RIPNAME=Root.pgesearch") #parser = LewishamParser("Lewisham", "Lewisham", "http://acolnet.lewisham.gov.uk/lewis-xslpagesdc/acolnetcgi.exe?ACTION=UNWRAP&RIPNAME=Root.PgeSearch") #parser = AcolnetParser("Mid Suffolk", "Mid Suffolk", "http://planning.midsuffolk.gov.uk/planning/acolnetcgi.gov?ACTION=UNWRAP&RIPNAME=Root.pgesearch") diff --git a/python_scrapers/ApplicationSearchServletParser.py b/python_scrapers/ApplicationSearchServletParser.py index 514a0e7..644e042 100644 --- a/python_scrapers/ApplicationSearchServletParser.py +++ b/python_scrapers/ApplicationSearchServletParser.py @@ -511,8 +511,8 @@ if __name__ == "__main__": #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 = HaringeySearchParser("Haringey", "Haringey", "http://www.planningservices.haringey.gov.uk") + print parser.getResults(3,1,2008) #parser = DenbighshireSearchParser("Denbighshire", "Denbighshire", "http://planning.denbighshire.gov.uk") #print parser.getResults(20,3,2007) pass diff --git a/python_scrapers/PublicAccess.py b/python_scrapers/PublicAccess.py index 796a22d..e87464a 100644 --- a/python_scrapers/PublicAccess.py +++ b/python_scrapers/PublicAccess.py @@ -354,6 +354,6 @@ if __name__ == '__main__': month = 11 year = 2007 - parser = PublicAccessParser("Hambleton", "Hambleton", "http://planning.hambleton.gov.uk/publicaccess/tdc/", True) + parser = PublicAccessParser("Chester-le-Street", "Chester-le-Street", "http://planning.chester-le-street.gov.uk/publicaccess/tdc/", True) print parser.getResults(day, month, year)