From e446ff93e0671329db987a0bd4adea617e91d17b Mon Sep 17 00:00:00 2001 From: "duncan.parkes" Date: Fri, 6 Jun 2008 16:15:52 +0000 Subject: [PATCH] Adding hambleton scraper in php to see if it works :-) --- docs/scrapers/hambleton.php | 50 +++++++++++++++++++ python_scrapers/AcolnetParser.py | 4 +- .../ApplicationSearchServletParser.py | 2 +- python_scrapers/PublicAccess.py | 8 +-- python_scrapers/WAM.py | 6 +-- 5 files changed, 61 insertions(+), 9 deletions(-) create mode 100644 docs/scrapers/hambleton.php diff --git a/docs/scrapers/hambleton.php b/docs/scrapers/hambleton.php new file mode 100644 index 0000000..25009a9 --- /dev/null +++ b/docs/scrapers/hambleton.php @@ -0,0 +1,50 @@ +force_compile = true; + $smarty->compile_dir = SMARTY_COMPILE_DIRECTORY; + $smarty->template_dir = "../templates"; + $smarty->assign("authority_name", "Hambleton District Council"); + $smarty->assign("authority_short_name", "Hambleton"); + + if (sizeof($applications) > 0){ + $smarty->assign("applications", $applications); + } + + $smarty->display("xml.tpl"); + +?> \ No newline at end of file diff --git a/python_scrapers/AcolnetParser.py b/python_scrapers/AcolnetParser.py index 4006f70..02e609b 100644 --- a/python_scrapers/AcolnetParser.py +++ b/python_scrapers/AcolnetParser.py @@ -333,11 +333,11 @@ if __name__ == '__main__': #parser = AcolnetParser("Babergh", "Babergh", "http://planning.babergh.gov.uk/dcdatav2//acolnetcgi.gov?ACTION=UNWRAP&RIPNAME=Root.pgesearch") #parser = AcolnetParser("Basingstoke", "Basingstoke", "http://planning.basingstoke.gov.uk/DCOnline2/acolnetcgi.exe?ACTION=UNWRAP&RIPNAME=Root.pgesearch") #parser = BassetlawParser("Bassetlaw", "Bassetlaw", "http://www.bassetlaw.gov.uk/planning/acolnetcgi.gov?ACTION=UNWRAP&RIPNAME=Root.pgesearch") - parser = AcolnetParser("Bolton", "Bolton", "http://www.planning.bolton.gov.uk/DCOnlineV2/acolnetcgi.exe?ACTION=UNWRAP&RIPNAME=Root.pgesearch") + #parser = AcolnetParser("Bolton", "Bolton", "http://www.planning.bolton.gov.uk/DCOnlineV2/acolnetcgi.exe?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 = BoltonLikeParser("Carlisle", "Carlisle", "http://planning.carlisle.gov.uk/acolnet/acolnetcgi.gov?ACTION=UNWRAP&RIPNAME=Root.pgesearch") + parser = BoltonLikeParser("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") #parser = AcolnetParser("East Lindsey", "East Lindsey", "http://www.e-lindsey.gov.uk/planning/AcolnetCGI.exe?ACTION=UNWRAP&RIPNAME=Root.pgesearch", "AcolnetParser") diff --git a/python_scrapers/ApplicationSearchServletParser.py b/python_scrapers/ApplicationSearchServletParser.py index bf44c90..86f6ce8 100644 --- a/python_scrapers/ApplicationSearchServletParser.py +++ b/python_scrapers/ApplicationSearchServletParser.py @@ -501,4 +501,4 @@ if __name__ == "__main__": #parser = EalingSearchParser("Ealing", "Ealing", "http://www.pam.ealing.gov.uk") parser = HaringeySearchParser("Haringey", "Haringey", "http://www.planningservices.haringey.gov.uk") #parser = DenbighshireSearchParser("Denbighshire", "Denbighshire", "http://planning.denbighshire.gov.uk") - print parser.getResults(3,3,2008) + print parser.getResults(20,5,2008) diff --git a/python_scrapers/PublicAccess.py b/python_scrapers/PublicAccess.py index c64c04c..f06c1a5 100644 --- a/python_scrapers/PublicAccess.py +++ b/python_scrapers/PublicAccess.py @@ -351,9 +351,11 @@ class PublicAccessPropertyPageParser(HTMLParser.HTMLParser): if __name__ == '__main__': day = 20 - month = 11 - year = 2007 + month = 5 + year = 2008 - parser = PublicAccessParser("East Northants", "East Northants", "http://publicaccesssrv.east-northamptonshire.gov.uk/PublicAccess/tdc/", True) + #parser = PublicAccessParser("East Northants", "East Northants", "http://publicaccesssrv.east-northamptonshire.gov.uk/PublicAccess/tdc/", True) + #parser = PublicAccessParser("Cherwell District Council", "Cherwell", "http://cherweb.cherwell-dc.gov.uk/publicaccess/tdc/", False) + parser = PublicAccessParser("Hambleton District Council", "Hambleton", "http://planning.hambleton.gov.uk/publicaccess/tdc/", True) print parser.getResults(day, month, year) diff --git a/python_scrapers/WAM.py b/python_scrapers/WAM.py index 044fe32..b605689 100644 --- a/python_scrapers/WAM.py +++ b/python_scrapers/WAM.py @@ -168,12 +168,12 @@ if __name__ == '__main__': #parser = WAMParser("Barking and Dagenham", "Barking and Dagenham", "http://idoxwam.lbbd.gov.uk:8081/WAM/pas/searchApplications.do", debug=True) #parser = BraintreeParser("Braintree", "Braintree", "http://planningapp.braintree.gov.uk/WAM1/weeklyApplications.do", debug=True) # Camden - #parser = WAMParser("Castle Point", "Castle Point", "http://wam.castlepoint.gov.uk/WAM/pas/searchApplications.do")#, debug=True) + parser = WAMParser("Castle Point", "Castle Point", "http://wam.castlepoint.gov.uk/WAM/pas/searchApplications.do")#, debug=True) #Chichester - Done as PublicAccess #parser = BraintreeParser("Colchester", "Colchester", "http://www.planning.colchester.gov.uk/WAM/weeklyApplications.do", debug=True) #parser = WAMParser("East Lothian", "East Lothian", "http://www.planning.eastlothian.gov.uk/WAM/pas/searchApplications.do", debug=True) #parser = BraintreeParser("North Somerset", "North Somerset", "http://wam.n-somerset.gov.uk/MULTIWAM/weeklyApplications.do", debug=True) - parser = WAMParser("Nottingham", "Nottingham", "http://plan4.nottinghamcity.gov.uk/WAM/pas/searchApplications.do", debug=True) + #parser = WAMParser("Nottingham", "Nottingham", "http://plan4.nottinghamcity.gov.uk/WAM/pas/searchApplications.do", debug=True) #parser = PooleParser("Poole long", "Poole", "http://wam.boroughofpoole.com/WAM/pas/searchApplications.do", debug=True) #parser = WAMParser("Rother long", "Rother", "http://www.planning.rother.gov.uk/WAM/pas/searchApplications.do", debug=True) #parser = BraintreeParser("South Gloucestershire", "South Gloucestershire", "http://planning.southglos.gov.uk/WAM/pas/WeeklyApplications.do", debug=True) @@ -181,7 +181,7 @@ if __name__ == '__main__': #parser = BraintreeParser("Tower Hamlets", "Tower Hamlets", "http://194.201.98.213/WAM/weeklyApplications.do", debug=True) #parser = WAMParser("Westminster", "Westminster", "http://idocs.westminster.gov.uk:8080/WAM/search/pas/index.htm", debug=True) - print parser.getResults(22,3,2008) + print parser.getResults(20,5,2008) # Left to fix