From 11b286209b2ac1cee161930d25a137a8d90ee5a1 Mon Sep 17 00:00:00 2001 From: "duncan.parkes" Date: Tue, 18 Sep 2007 20:25:24 +0000 Subject: [PATCH] Fix Babergh - the site changes to a different url and slightly different style after 21/06/2006 --- python_scrapers/AcolnetParser.py | 16 +++++++++++++--- python_scrapers/SitesToGenerate.csv | 2 +- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/python_scrapers/AcolnetParser.py b/python_scrapers/AcolnetParser.py index 9f3daae..70e8034 100644 --- a/python_scrapers/AcolnetParser.py +++ b/python_scrapers/AcolnetParser.py @@ -218,12 +218,22 @@ class AcolnetParser(HTMLParser.HTMLParser): def getResults(self, day, month, year): return self.getResultsByDayMonthYear(int(day), int(month), int(year)).displayXML() +## # Babergh up to 21/06/2007 +## class BaberghParser(AcolnetParser): +## case_number_tr = 1 # this one can be got by the td class attribute +## reg_date_tr = 2 +## location_tr = 4 +## proposal_tr = 5 +## # It would be nice to scrape this... +## comments_email_address = "planning.reception@babergh.gov.uk" + +# Site changes to here from 22/06/2007 class BaberghParser(AcolnetParser): case_number_tr = 1 # this one can be got by the td class attribute - reg_date_tr = 2 - location_tr = 4 - proposal_tr = 5 + reg_date_tr = 3 + location_tr = 5 + proposal_tr = 6 # It would be nice to scrape this... comments_email_address = "planning.reception@babergh.gov.uk" diff --git a/python_scrapers/SitesToGenerate.csv b/python_scrapers/SitesToGenerate.csv index ab69867..d44a7e1 100644 --- a/python_scrapers/SitesToGenerate.csv +++ b/python_scrapers/SitesToGenerate.csv @@ -87,7 +87,7 @@ "Vale Royal Borough Council", "Vale Royal", "http://pa.valeroyal.gov.uk/publicaccess/tdc/", "PublicAccess", "PublicAccessParser" "Winchester City Council", "Winchester", "http://win2padmz.winchester.gov.uk/publicaccess/tdc/", "PublicAccess", "PublicAccessParser" "Wolverhampton City Council", "Wolverhampton", "http://planningonline.wolverhampton.gov.uk/PublicAccess/dc/", "PublicAccess", "PublicAccessParser" -"Babergh District Council", "Babergh", "http://planning.babergh.gov.uk/dataOnlinePlanning/acolnetcgi.gov?ACTION=UNWRAP&RIPNAME=Root.pgesearch", "AcolnetParser", "BaberghParser" +"Babergh District Council", "Babergh", "http://planning.babergh.gov.uk/dcdatav2//acolnetcgi.gov?ACTION=UNWRAP&RIPNAME=Root.pgesearch", "AcolnetParser", "BaberghParser" "Basingstoke and Deane Borough Council", "Basingstoke and Deane", "http://planning.basingstoke.gov.uk/DCOnline2/acolnetcgi.exe?ACTION=UNWRAP&RIPNAME=Root.pgesearch", "AcolnetParser", "BasingstokeParser" "Bassetlaw District Council", "Bassetlaw","http://www.bassetlaw.gov.uk/planning/acolnetcgi.gov?ACTION=UNWRAP&RIPNAME=Root.pgesearch", "AcolnetParser", "BassetlawParser" "Bury Metropolitan Borough Council", "Bury", "http://e-planning.bury.gov.uk/ePlanning/acolnetcgi.gov?ACTION=UNWRAP&RIPNAME=Root.PgeSearch", "AcolnetParser", "BuryParser"