From 7957d12945bac143b764bc11fabe062f890c5547 Mon Sep 17 00:00:00 2001 From: "duncan.parkes" Date: Thu, 24 May 2007 16:54:06 +0000 Subject: [PATCH] adding oldham --- trunk/cgi-bin/AcolnetParser.py | 17 +++++++++++- trunk/cgi-bin/Allerdale.cgi | 0 trunk/cgi-bin/Alnwick.cgi | 0 trunk/cgi-bin/Angus.cgi | 0 trunk/cgi-bin/Aylesbury Vale.cgi | 0 trunk/cgi-bin/Babergh.cgi | 0 trunk/cgi-bin/Barrow.cgi | 0 trunk/cgi-bin/Basildon.cgi | 0 trunk/cgi-bin/Basingstoke and Deane.cgi | 0 trunk/cgi-bin/Bassetlaw.cgi | 0 trunk/cgi-bin/Bath.cgi | 0 trunk/cgi-bin/Bexley.cgi | 0 trunk/cgi-bin/Blaby.cgi | 0 trunk/cgi-bin/Bolsover.cgi | 0 trunk/cgi-bin/Bridgnorth.cgi | 0 trunk/cgi-bin/Bristol.cgi | 0 trunk/cgi-bin/Buckinghamshire.cgi | 0 trunk/cgi-bin/Bury.cgi | 0 trunk/cgi-bin/Carlisle.cgi | 0 trunk/cgi-bin/Chelmsford.cgi | 0 trunk/cgi-bin/Cherwell.cgi | 0 trunk/cgi-bin/Chorley.cgi | 0 trunk/cgi-bin/City of London.cgi | 0 trunk/cgi-bin/Cornwall.cgi | 0 trunk/cgi-bin/Coventry.cgi | 0 trunk/cgi-bin/Croydon.cgi | 0 trunk/cgi-bin/Denbighshire.cgi | 0 trunk/cgi-bin/Derby.cgi | 0 trunk/cgi-bin/Doncaster.cgi | 0 trunk/cgi-bin/Dundee.cgi | 0 trunk/cgi-bin/Durham.cgi | 0 trunk/cgi-bin/Ealing.cgi | 0 trunk/cgi-bin/Easington.cgi | 0 trunk/cgi-bin/East Devon.cgi | 0 trunk/cgi-bin/East Dorset.cgi | 0 trunk/cgi-bin/East Lindsey.cgi | 0 trunk/cgi-bin/Edinburgh.cgi | 0 trunk/cgi-bin/Epsom and Ewell.cgi | 0 trunk/cgi-bin/Fenland.cgi | 0 trunk/cgi-bin/Fylde.cgi | 0 trunk/cgi-bin/Gateshead.cgi | 0 trunk/cgi-bin/Gedling.cgi | 0 trunk/cgi-bin/Gloucestershire.cgi | 0 trunk/cgi-bin/Gravesham.cgi | 0 trunk/cgi-bin/Hammersmith and Fulham.cgi | 0 trunk/cgi-bin/Haringey.cgi | 0 trunk/cgi-bin/Harlow.cgi | 0 trunk/cgi-bin/Harrogate.cgi | 0 trunk/cgi-bin/Hart.cgi | 0 trunk/cgi-bin/Hartlepool.cgi | 0 trunk/cgi-bin/Hertsmere.cgi | 0 trunk/cgi-bin/High Peak.cgi | 0 trunk/cgi-bin/Huntingdonshire.cgi | 0 trunk/cgi-bin/Kerrier.cgi | 0 trunk/cgi-bin/Knowsley.cgi | 0 trunk/cgi-bin/Lancaster.cgi | 0 trunk/cgi-bin/Lewisham.cgi | 0 trunk/cgi-bin/Luton.cgi | 0 trunk/cgi-bin/Malvern Hills.cgi | 0 trunk/cgi-bin/Manchester.cgi | 0 trunk/cgi-bin/Mid Devon.cgi | 0 trunk/cgi-bin/Milton Keynes.cgi | 0 trunk/cgi-bin/NW Leicestershire.cgi | 0 trunk/cgi-bin/New Forest.cgi | 0 trunk/cgi-bin/Newcastle-under-Lyme.cgi | 0 trunk/cgi-bin/Newcastle.cgi | 0 trunk/cgi-bin/Newham.cgi | 0 trunk/cgi-bin/North Hertfordshire.cgi | 0 trunk/cgi-bin/North Tyneside.cgi | 0 trunk/cgi-bin/North Warwickshire.cgi | 0 trunk/cgi-bin/North Wiltshire.cgi | 0 trunk/cgi-bin/Northumberland.cgi | 0 trunk/cgi-bin/Oadby and Wigston.cgi | 0 trunk/cgi-bin/Oldham.cgi | 29 +++++++++++++++++++++ trunk/cgi-bin/Oswestry.cgi | 0 trunk/cgi-bin/Peterborough.cgi | 0 trunk/cgi-bin/Portsmouth.cgi | 0 trunk/cgi-bin/Redditch.cgi | 0 trunk/cgi-bin/Rushmoor.cgi | 0 trunk/cgi-bin/Scarborough.cgi | 0 trunk/cgi-bin/Sevenoaks.cgi | 0 trunk/cgi-bin/South Bucks.cgi | 0 trunk/cgi-bin/South Ribble.cgi | 0 trunk/cgi-bin/South Staffordshire.cgi | 0 trunk/cgi-bin/SouthOxfordshire.cgi | 0 trunk/cgi-bin/Southampton.cgi | 0 trunk/cgi-bin/Spelthorne.cgi | 0 trunk/cgi-bin/St Helens.cgi | 0 trunk/cgi-bin/Stevenage.cgi | 0 trunk/cgi-bin/Stirling.cgi | 0 trunk/cgi-bin/Stockton-On-Tees.cgi | 0 trunk/cgi-bin/Stratford.cgi | 0 trunk/cgi-bin/Sunderland.cgi | 0 trunk/cgi-bin/Teignbridge.cgi | 0 trunk/cgi-bin/Test Valley.cgi | 0 trunk/cgi-bin/Tonbridge.cgi | 0 trunk/cgi-bin/Torbay.cgi | 0 trunk/cgi-bin/Vale Royal.cgi | 0 trunk/cgi-bin/Waveney.cgi | 0 trunk/cgi-bin/Wear Valley.cgi | 0 trunk/cgi-bin/Wellingborough.cgi | 0 trunk/cgi-bin/West Berkshire.cgi | 0 trunk/cgi-bin/West Lancashire.cgi | 0 trunk/cgi-bin/West Norfolk.cgi | 0 trunk/cgi-bin/Winchester.cgi | 0 trunk/cgi-bin/Woking.cgi | 0 trunk/cgi-bin/Wolverhampton.cgi | 0 trunk/cgi-bin/York.cgi | 0 trunk/python_scrapers/AcolnetParser.py | 17 +++++++++++- trunk/python_scrapers/PublicAccessSites.csv | 1 + 110 files changed, 62 insertions(+), 2 deletions(-) mode change 100755 => 100644 trunk/cgi-bin/Allerdale.cgi mode change 100755 => 100644 trunk/cgi-bin/Alnwick.cgi mode change 100755 => 100644 trunk/cgi-bin/Angus.cgi mode change 100755 => 100644 trunk/cgi-bin/Aylesbury Vale.cgi mode change 100755 => 100644 trunk/cgi-bin/Babergh.cgi mode change 100755 => 100644 trunk/cgi-bin/Barrow.cgi mode change 100755 => 100644 trunk/cgi-bin/Basildon.cgi mode change 100755 => 100644 trunk/cgi-bin/Basingstoke and Deane.cgi mode change 100755 => 100644 trunk/cgi-bin/Bassetlaw.cgi mode change 100755 => 100644 trunk/cgi-bin/Bath.cgi mode change 100755 => 100644 trunk/cgi-bin/Bexley.cgi mode change 100755 => 100644 trunk/cgi-bin/Blaby.cgi mode change 100755 => 100644 trunk/cgi-bin/Bolsover.cgi mode change 100644 => 100755 trunk/cgi-bin/Bridgnorth.cgi mode change 100755 => 100644 trunk/cgi-bin/Bristol.cgi mode change 100755 => 100644 trunk/cgi-bin/Buckinghamshire.cgi mode change 100755 => 100644 trunk/cgi-bin/Bury.cgi mode change 100644 => 100755 trunk/cgi-bin/Carlisle.cgi mode change 100755 => 100644 trunk/cgi-bin/Chelmsford.cgi mode change 100755 => 100644 trunk/cgi-bin/Cherwell.cgi mode change 100755 => 100644 trunk/cgi-bin/Chorley.cgi mode change 100755 => 100644 trunk/cgi-bin/City of London.cgi mode change 100755 => 100644 trunk/cgi-bin/Cornwall.cgi mode change 100755 => 100644 trunk/cgi-bin/Coventry.cgi mode change 100644 => 100755 trunk/cgi-bin/Croydon.cgi mode change 100755 => 100644 trunk/cgi-bin/Denbighshire.cgi mode change 100755 => 100644 trunk/cgi-bin/Derby.cgi mode change 100755 => 100644 trunk/cgi-bin/Doncaster.cgi mode change 100755 => 100644 trunk/cgi-bin/Dundee.cgi mode change 100755 => 100644 trunk/cgi-bin/Durham.cgi mode change 100755 => 100644 trunk/cgi-bin/Ealing.cgi mode change 100755 => 100644 trunk/cgi-bin/Easington.cgi mode change 100755 => 100644 trunk/cgi-bin/East Devon.cgi mode change 100644 => 100755 trunk/cgi-bin/East Dorset.cgi mode change 100755 => 100644 trunk/cgi-bin/East Lindsey.cgi mode change 100755 => 100644 trunk/cgi-bin/Edinburgh.cgi mode change 100755 => 100644 trunk/cgi-bin/Epsom and Ewell.cgi mode change 100755 => 100644 trunk/cgi-bin/Fenland.cgi mode change 100644 => 100755 trunk/cgi-bin/Fylde.cgi mode change 100644 => 100755 trunk/cgi-bin/Gateshead.cgi mode change 100755 => 100644 trunk/cgi-bin/Gedling.cgi mode change 100644 => 100755 trunk/cgi-bin/Gloucestershire.cgi mode change 100755 => 100644 trunk/cgi-bin/Gravesham.cgi mode change 100755 => 100644 trunk/cgi-bin/Hammersmith and Fulham.cgi mode change 100755 => 100644 trunk/cgi-bin/Haringey.cgi mode change 100755 => 100644 trunk/cgi-bin/Harlow.cgi mode change 100755 => 100644 trunk/cgi-bin/Harrogate.cgi mode change 100755 => 100644 trunk/cgi-bin/Hart.cgi mode change 100755 => 100644 trunk/cgi-bin/Hartlepool.cgi mode change 100755 => 100644 trunk/cgi-bin/Hertsmere.cgi mode change 100755 => 100644 trunk/cgi-bin/High Peak.cgi mode change 100755 => 100644 trunk/cgi-bin/Huntingdonshire.cgi mode change 100755 => 100644 trunk/cgi-bin/Kerrier.cgi mode change 100755 => 100644 trunk/cgi-bin/Knowsley.cgi mode change 100755 => 100644 trunk/cgi-bin/Lancaster.cgi mode change 100644 => 100755 trunk/cgi-bin/Lewisham.cgi mode change 100755 => 100644 trunk/cgi-bin/Luton.cgi mode change 100755 => 100644 trunk/cgi-bin/Malvern Hills.cgi mode change 100755 => 100644 trunk/cgi-bin/Manchester.cgi mode change 100755 => 100644 trunk/cgi-bin/Mid Devon.cgi mode change 100755 => 100644 trunk/cgi-bin/Milton Keynes.cgi mode change 100755 => 100644 trunk/cgi-bin/NW Leicestershire.cgi mode change 100644 => 100755 trunk/cgi-bin/New Forest.cgi mode change 100644 => 100755 trunk/cgi-bin/Newcastle-under-Lyme.cgi mode change 100755 => 100644 trunk/cgi-bin/Newcastle.cgi mode change 100755 => 100644 trunk/cgi-bin/Newham.cgi mode change 100644 => 100755 trunk/cgi-bin/North Hertfordshire.cgi mode change 100755 => 100644 trunk/cgi-bin/North Tyneside.cgi mode change 100755 => 100644 trunk/cgi-bin/North Warwickshire.cgi mode change 100755 => 100644 trunk/cgi-bin/North Wiltshire.cgi mode change 100755 => 100644 trunk/cgi-bin/Northumberland.cgi mode change 100755 => 100644 trunk/cgi-bin/Oadby and Wigston.cgi create mode 100755 trunk/cgi-bin/Oldham.cgi mode change 100755 => 100644 trunk/cgi-bin/Oswestry.cgi mode change 100755 => 100644 trunk/cgi-bin/Peterborough.cgi mode change 100755 => 100644 trunk/cgi-bin/Portsmouth.cgi mode change 100755 => 100644 trunk/cgi-bin/Redditch.cgi mode change 100755 => 100644 trunk/cgi-bin/Rushmoor.cgi mode change 100755 => 100644 trunk/cgi-bin/Scarborough.cgi mode change 100755 => 100644 trunk/cgi-bin/Sevenoaks.cgi mode change 100755 => 100644 trunk/cgi-bin/South Bucks.cgi mode change 100755 => 100644 trunk/cgi-bin/South Ribble.cgi mode change 100755 => 100644 trunk/cgi-bin/South Staffordshire.cgi mode change 100755 => 100644 trunk/cgi-bin/SouthOxfordshire.cgi mode change 100755 => 100644 trunk/cgi-bin/Southampton.cgi mode change 100755 => 100644 trunk/cgi-bin/Spelthorne.cgi mode change 100755 => 100644 trunk/cgi-bin/St Helens.cgi mode change 100755 => 100644 trunk/cgi-bin/Stevenage.cgi mode change 100755 => 100644 trunk/cgi-bin/Stirling.cgi mode change 100755 => 100644 trunk/cgi-bin/Stockton-On-Tees.cgi mode change 100755 => 100644 trunk/cgi-bin/Stratford.cgi mode change 100755 => 100644 trunk/cgi-bin/Sunderland.cgi mode change 100755 => 100644 trunk/cgi-bin/Teignbridge.cgi mode change 100755 => 100644 trunk/cgi-bin/Test Valley.cgi mode change 100755 => 100644 trunk/cgi-bin/Tonbridge.cgi mode change 100755 => 100644 trunk/cgi-bin/Torbay.cgi mode change 100644 => 100755 trunk/cgi-bin/Vale Royal.cgi mode change 100755 => 100644 trunk/cgi-bin/Waveney.cgi mode change 100755 => 100644 trunk/cgi-bin/Wear Valley.cgi mode change 100755 => 100644 trunk/cgi-bin/Wellingborough.cgi mode change 100755 => 100644 trunk/cgi-bin/West Berkshire.cgi mode change 100755 => 100644 trunk/cgi-bin/West Lancashire.cgi mode change 100755 => 100644 trunk/cgi-bin/West Norfolk.cgi mode change 100644 => 100755 trunk/cgi-bin/Winchester.cgi mode change 100755 => 100644 trunk/cgi-bin/Woking.cgi mode change 100644 => 100755 trunk/cgi-bin/Wolverhampton.cgi mode change 100755 => 100644 trunk/cgi-bin/York.cgi diff --git a/trunk/cgi-bin/AcolnetParser.py b/trunk/cgi-bin/AcolnetParser.py index 5a973f3..2a11ead 100644 --- a/trunk/cgi-bin/AcolnetParser.py +++ b/trunk/cgi-bin/AcolnetParser.py @@ -374,6 +374,21 @@ class NorthWiltshireParser(AcolnetParser): location_tr = 6 proposal_tr = 7 +class OldhamParser(AcolnetParser): + case_number_tr = 1 # this one can be got by the td class attribute + reg_date_tr = 3 + location_tr = 6 + proposal_tr = 7 + + def _cleanupHTML(self, html): + """There is a bad table end tag in this one. + Fix it before we start""" + + bad_table_end = '' + good_table_end = '' + return html.replace(bad_table_end, good_table_end) + + if __name__ == '__main__': day = 15 @@ -389,7 +404,7 @@ if __name__ == '__main__': # canterbury # results as columns of one table - parser = HavantParser("HavantBC", "Havant", "http://www3.havant.gov.uk/scripts/planningpages/acolnetcgi.exe?ACTION=UNWRAP&RIPNAME=Root.pgesearch") + parser = OldhamParser("Oldham", "Oldham", "http://planning.oldham.gov.uk/planning//acolnetcgi.gov?ACTION=UNWRAP&RIPNAME=Root.pgesearch") print parser.getResults(day, month, year) diff --git a/trunk/cgi-bin/Allerdale.cgi b/trunk/cgi-bin/Allerdale.cgi old mode 100755 new mode 100644 diff --git a/trunk/cgi-bin/Alnwick.cgi b/trunk/cgi-bin/Alnwick.cgi old mode 100755 new mode 100644 diff --git a/trunk/cgi-bin/Angus.cgi b/trunk/cgi-bin/Angus.cgi old mode 100755 new mode 100644 diff --git a/trunk/cgi-bin/Aylesbury Vale.cgi b/trunk/cgi-bin/Aylesbury Vale.cgi old mode 100755 new mode 100644 diff --git a/trunk/cgi-bin/Babergh.cgi b/trunk/cgi-bin/Babergh.cgi old mode 100755 new mode 100644 diff --git a/trunk/cgi-bin/Barrow.cgi b/trunk/cgi-bin/Barrow.cgi old mode 100755 new mode 100644 diff --git a/trunk/cgi-bin/Basildon.cgi b/trunk/cgi-bin/Basildon.cgi old mode 100755 new mode 100644 diff --git a/trunk/cgi-bin/Basingstoke and Deane.cgi b/trunk/cgi-bin/Basingstoke and Deane.cgi old mode 100755 new mode 100644 diff --git a/trunk/cgi-bin/Bassetlaw.cgi b/trunk/cgi-bin/Bassetlaw.cgi old mode 100755 new mode 100644 diff --git a/trunk/cgi-bin/Bath.cgi b/trunk/cgi-bin/Bath.cgi old mode 100755 new mode 100644 diff --git a/trunk/cgi-bin/Bexley.cgi b/trunk/cgi-bin/Bexley.cgi old mode 100755 new mode 100644 diff --git a/trunk/cgi-bin/Blaby.cgi b/trunk/cgi-bin/Blaby.cgi old mode 100755 new mode 100644 diff --git a/trunk/cgi-bin/Bolsover.cgi b/trunk/cgi-bin/Bolsover.cgi old mode 100755 new mode 100644 diff --git a/trunk/cgi-bin/Bridgnorth.cgi b/trunk/cgi-bin/Bridgnorth.cgi old mode 100644 new mode 100755 diff --git a/trunk/cgi-bin/Bristol.cgi b/trunk/cgi-bin/Bristol.cgi old mode 100755 new mode 100644 diff --git a/trunk/cgi-bin/Buckinghamshire.cgi b/trunk/cgi-bin/Buckinghamshire.cgi old mode 100755 new mode 100644 diff --git a/trunk/cgi-bin/Bury.cgi b/trunk/cgi-bin/Bury.cgi old mode 100755 new mode 100644 diff --git a/trunk/cgi-bin/Carlisle.cgi b/trunk/cgi-bin/Carlisle.cgi old mode 100644 new mode 100755 diff --git a/trunk/cgi-bin/Chelmsford.cgi b/trunk/cgi-bin/Chelmsford.cgi old mode 100755 new mode 100644 diff --git a/trunk/cgi-bin/Cherwell.cgi b/trunk/cgi-bin/Cherwell.cgi old mode 100755 new mode 100644 diff --git a/trunk/cgi-bin/Chorley.cgi b/trunk/cgi-bin/Chorley.cgi old mode 100755 new mode 100644 diff --git a/trunk/cgi-bin/City of London.cgi b/trunk/cgi-bin/City of London.cgi old mode 100755 new mode 100644 diff --git a/trunk/cgi-bin/Cornwall.cgi b/trunk/cgi-bin/Cornwall.cgi old mode 100755 new mode 100644 diff --git a/trunk/cgi-bin/Coventry.cgi b/trunk/cgi-bin/Coventry.cgi old mode 100755 new mode 100644 diff --git a/trunk/cgi-bin/Croydon.cgi b/trunk/cgi-bin/Croydon.cgi old mode 100644 new mode 100755 diff --git a/trunk/cgi-bin/Denbighshire.cgi b/trunk/cgi-bin/Denbighshire.cgi old mode 100755 new mode 100644 diff --git a/trunk/cgi-bin/Derby.cgi b/trunk/cgi-bin/Derby.cgi old mode 100755 new mode 100644 diff --git a/trunk/cgi-bin/Doncaster.cgi b/trunk/cgi-bin/Doncaster.cgi old mode 100755 new mode 100644 diff --git a/trunk/cgi-bin/Dundee.cgi b/trunk/cgi-bin/Dundee.cgi old mode 100755 new mode 100644 diff --git a/trunk/cgi-bin/Durham.cgi b/trunk/cgi-bin/Durham.cgi old mode 100755 new mode 100644 diff --git a/trunk/cgi-bin/Ealing.cgi b/trunk/cgi-bin/Ealing.cgi old mode 100755 new mode 100644 diff --git a/trunk/cgi-bin/Easington.cgi b/trunk/cgi-bin/Easington.cgi old mode 100755 new mode 100644 diff --git a/trunk/cgi-bin/East Devon.cgi b/trunk/cgi-bin/East Devon.cgi old mode 100755 new mode 100644 diff --git a/trunk/cgi-bin/East Dorset.cgi b/trunk/cgi-bin/East Dorset.cgi old mode 100644 new mode 100755 diff --git a/trunk/cgi-bin/East Lindsey.cgi b/trunk/cgi-bin/East Lindsey.cgi old mode 100755 new mode 100644 diff --git a/trunk/cgi-bin/Edinburgh.cgi b/trunk/cgi-bin/Edinburgh.cgi old mode 100755 new mode 100644 diff --git a/trunk/cgi-bin/Epsom and Ewell.cgi b/trunk/cgi-bin/Epsom and Ewell.cgi old mode 100755 new mode 100644 diff --git a/trunk/cgi-bin/Fenland.cgi b/trunk/cgi-bin/Fenland.cgi old mode 100755 new mode 100644 diff --git a/trunk/cgi-bin/Fylde.cgi b/trunk/cgi-bin/Fylde.cgi old mode 100644 new mode 100755 diff --git a/trunk/cgi-bin/Gateshead.cgi b/trunk/cgi-bin/Gateshead.cgi old mode 100644 new mode 100755 diff --git a/trunk/cgi-bin/Gedling.cgi b/trunk/cgi-bin/Gedling.cgi old mode 100755 new mode 100644 diff --git a/trunk/cgi-bin/Gloucestershire.cgi b/trunk/cgi-bin/Gloucestershire.cgi old mode 100644 new mode 100755 diff --git a/trunk/cgi-bin/Gravesham.cgi b/trunk/cgi-bin/Gravesham.cgi old mode 100755 new mode 100644 diff --git a/trunk/cgi-bin/Hammersmith and Fulham.cgi b/trunk/cgi-bin/Hammersmith and Fulham.cgi old mode 100755 new mode 100644 diff --git a/trunk/cgi-bin/Haringey.cgi b/trunk/cgi-bin/Haringey.cgi old mode 100755 new mode 100644 diff --git a/trunk/cgi-bin/Harlow.cgi b/trunk/cgi-bin/Harlow.cgi old mode 100755 new mode 100644 diff --git a/trunk/cgi-bin/Harrogate.cgi b/trunk/cgi-bin/Harrogate.cgi old mode 100755 new mode 100644 diff --git a/trunk/cgi-bin/Hart.cgi b/trunk/cgi-bin/Hart.cgi old mode 100755 new mode 100644 diff --git a/trunk/cgi-bin/Hartlepool.cgi b/trunk/cgi-bin/Hartlepool.cgi old mode 100755 new mode 100644 diff --git a/trunk/cgi-bin/Hertsmere.cgi b/trunk/cgi-bin/Hertsmere.cgi old mode 100755 new mode 100644 diff --git a/trunk/cgi-bin/High Peak.cgi b/trunk/cgi-bin/High Peak.cgi old mode 100755 new mode 100644 diff --git a/trunk/cgi-bin/Huntingdonshire.cgi b/trunk/cgi-bin/Huntingdonshire.cgi old mode 100755 new mode 100644 diff --git a/trunk/cgi-bin/Kerrier.cgi b/trunk/cgi-bin/Kerrier.cgi old mode 100755 new mode 100644 diff --git a/trunk/cgi-bin/Knowsley.cgi b/trunk/cgi-bin/Knowsley.cgi old mode 100755 new mode 100644 diff --git a/trunk/cgi-bin/Lancaster.cgi b/trunk/cgi-bin/Lancaster.cgi old mode 100755 new mode 100644 diff --git a/trunk/cgi-bin/Lewisham.cgi b/trunk/cgi-bin/Lewisham.cgi old mode 100644 new mode 100755 diff --git a/trunk/cgi-bin/Luton.cgi b/trunk/cgi-bin/Luton.cgi old mode 100755 new mode 100644 diff --git a/trunk/cgi-bin/Malvern Hills.cgi b/trunk/cgi-bin/Malvern Hills.cgi old mode 100755 new mode 100644 diff --git a/trunk/cgi-bin/Manchester.cgi b/trunk/cgi-bin/Manchester.cgi old mode 100755 new mode 100644 diff --git a/trunk/cgi-bin/Mid Devon.cgi b/trunk/cgi-bin/Mid Devon.cgi old mode 100755 new mode 100644 diff --git a/trunk/cgi-bin/Milton Keynes.cgi b/trunk/cgi-bin/Milton Keynes.cgi old mode 100755 new mode 100644 diff --git a/trunk/cgi-bin/NW Leicestershire.cgi b/trunk/cgi-bin/NW Leicestershire.cgi old mode 100755 new mode 100644 diff --git a/trunk/cgi-bin/New Forest.cgi b/trunk/cgi-bin/New Forest.cgi old mode 100644 new mode 100755 diff --git a/trunk/cgi-bin/Newcastle-under-Lyme.cgi b/trunk/cgi-bin/Newcastle-under-Lyme.cgi old mode 100644 new mode 100755 diff --git a/trunk/cgi-bin/Newcastle.cgi b/trunk/cgi-bin/Newcastle.cgi old mode 100755 new mode 100644 diff --git a/trunk/cgi-bin/Newham.cgi b/trunk/cgi-bin/Newham.cgi old mode 100755 new mode 100644 diff --git a/trunk/cgi-bin/North Hertfordshire.cgi b/trunk/cgi-bin/North Hertfordshire.cgi old mode 100644 new mode 100755 diff --git a/trunk/cgi-bin/North Tyneside.cgi b/trunk/cgi-bin/North Tyneside.cgi old mode 100755 new mode 100644 diff --git a/trunk/cgi-bin/North Warwickshire.cgi b/trunk/cgi-bin/North Warwickshire.cgi old mode 100755 new mode 100644 diff --git a/trunk/cgi-bin/North Wiltshire.cgi b/trunk/cgi-bin/North Wiltshire.cgi old mode 100755 new mode 100644 diff --git a/trunk/cgi-bin/Northumberland.cgi b/trunk/cgi-bin/Northumberland.cgi old mode 100755 new mode 100644 diff --git a/trunk/cgi-bin/Oadby and Wigston.cgi b/trunk/cgi-bin/Oadby and Wigston.cgi old mode 100755 new mode 100644 diff --git a/trunk/cgi-bin/Oldham.cgi b/trunk/cgi-bin/Oldham.cgi new file mode 100755 index 0000000..39926a8 --- /dev/null +++ b/trunk/cgi-bin/Oldham.cgi @@ -0,0 +1,29 @@ +#!/usr/local/bin/python + +# This is the parser for Oldham 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 = "Oldham District Council" +authority_short_name = "Oldham" +base_url = "http://planning.oldham.gov.uk/planning//acolnetcgi.gov?ACTION=UNWRAP&RIPNAME=Root.pgesearch" + +import AcolnetParser + +parser = AcolnetParser.OldhamParser(authority_name, authority_short_name, base_url) + +xml = parser.getResults(day, month, year) + +print "Content-Type: text/xml" # XML is following +print +print xml # print the xml diff --git a/trunk/cgi-bin/Oswestry.cgi b/trunk/cgi-bin/Oswestry.cgi old mode 100755 new mode 100644 diff --git a/trunk/cgi-bin/Peterborough.cgi b/trunk/cgi-bin/Peterborough.cgi old mode 100755 new mode 100644 diff --git a/trunk/cgi-bin/Portsmouth.cgi b/trunk/cgi-bin/Portsmouth.cgi old mode 100755 new mode 100644 diff --git a/trunk/cgi-bin/Redditch.cgi b/trunk/cgi-bin/Redditch.cgi old mode 100755 new mode 100644 diff --git a/trunk/cgi-bin/Rushmoor.cgi b/trunk/cgi-bin/Rushmoor.cgi old mode 100755 new mode 100644 diff --git a/trunk/cgi-bin/Scarborough.cgi b/trunk/cgi-bin/Scarborough.cgi old mode 100755 new mode 100644 diff --git a/trunk/cgi-bin/Sevenoaks.cgi b/trunk/cgi-bin/Sevenoaks.cgi old mode 100755 new mode 100644 diff --git a/trunk/cgi-bin/South Bucks.cgi b/trunk/cgi-bin/South Bucks.cgi old mode 100755 new mode 100644 diff --git a/trunk/cgi-bin/South Ribble.cgi b/trunk/cgi-bin/South Ribble.cgi old mode 100755 new mode 100644 diff --git a/trunk/cgi-bin/South Staffordshire.cgi b/trunk/cgi-bin/South Staffordshire.cgi old mode 100755 new mode 100644 diff --git a/trunk/cgi-bin/SouthOxfordshire.cgi b/trunk/cgi-bin/SouthOxfordshire.cgi old mode 100755 new mode 100644 diff --git a/trunk/cgi-bin/Southampton.cgi b/trunk/cgi-bin/Southampton.cgi old mode 100755 new mode 100644 diff --git a/trunk/cgi-bin/Spelthorne.cgi b/trunk/cgi-bin/Spelthorne.cgi old mode 100755 new mode 100644 diff --git a/trunk/cgi-bin/St Helens.cgi b/trunk/cgi-bin/St Helens.cgi old mode 100755 new mode 100644 diff --git a/trunk/cgi-bin/Stevenage.cgi b/trunk/cgi-bin/Stevenage.cgi old mode 100755 new mode 100644 diff --git a/trunk/cgi-bin/Stirling.cgi b/trunk/cgi-bin/Stirling.cgi old mode 100755 new mode 100644 diff --git a/trunk/cgi-bin/Stockton-On-Tees.cgi b/trunk/cgi-bin/Stockton-On-Tees.cgi old mode 100755 new mode 100644 diff --git a/trunk/cgi-bin/Stratford.cgi b/trunk/cgi-bin/Stratford.cgi old mode 100755 new mode 100644 diff --git a/trunk/cgi-bin/Sunderland.cgi b/trunk/cgi-bin/Sunderland.cgi old mode 100755 new mode 100644 diff --git a/trunk/cgi-bin/Teignbridge.cgi b/trunk/cgi-bin/Teignbridge.cgi old mode 100755 new mode 100644 diff --git a/trunk/cgi-bin/Test Valley.cgi b/trunk/cgi-bin/Test Valley.cgi old mode 100755 new mode 100644 diff --git a/trunk/cgi-bin/Tonbridge.cgi b/trunk/cgi-bin/Tonbridge.cgi old mode 100755 new mode 100644 diff --git a/trunk/cgi-bin/Torbay.cgi b/trunk/cgi-bin/Torbay.cgi old mode 100755 new mode 100644 diff --git a/trunk/cgi-bin/Vale Royal.cgi b/trunk/cgi-bin/Vale Royal.cgi old mode 100644 new mode 100755 diff --git a/trunk/cgi-bin/Waveney.cgi b/trunk/cgi-bin/Waveney.cgi old mode 100755 new mode 100644 diff --git a/trunk/cgi-bin/Wear Valley.cgi b/trunk/cgi-bin/Wear Valley.cgi old mode 100755 new mode 100644 diff --git a/trunk/cgi-bin/Wellingborough.cgi b/trunk/cgi-bin/Wellingborough.cgi old mode 100755 new mode 100644 diff --git a/trunk/cgi-bin/West Berkshire.cgi b/trunk/cgi-bin/West Berkshire.cgi old mode 100755 new mode 100644 diff --git a/trunk/cgi-bin/West Lancashire.cgi b/trunk/cgi-bin/West Lancashire.cgi old mode 100755 new mode 100644 diff --git a/trunk/cgi-bin/West Norfolk.cgi b/trunk/cgi-bin/West Norfolk.cgi old mode 100755 new mode 100644 diff --git a/trunk/cgi-bin/Winchester.cgi b/trunk/cgi-bin/Winchester.cgi old mode 100644 new mode 100755 diff --git a/trunk/cgi-bin/Woking.cgi b/trunk/cgi-bin/Woking.cgi old mode 100755 new mode 100644 diff --git a/trunk/cgi-bin/Wolverhampton.cgi b/trunk/cgi-bin/Wolverhampton.cgi old mode 100644 new mode 100755 diff --git a/trunk/cgi-bin/York.cgi b/trunk/cgi-bin/York.cgi old mode 100755 new mode 100644 diff --git a/trunk/python_scrapers/AcolnetParser.py b/trunk/python_scrapers/AcolnetParser.py index 5a973f3..2a11ead 100644 --- a/trunk/python_scrapers/AcolnetParser.py +++ b/trunk/python_scrapers/AcolnetParser.py @@ -374,6 +374,21 @@ class NorthWiltshireParser(AcolnetParser): location_tr = 6 proposal_tr = 7 +class OldhamParser(AcolnetParser): + case_number_tr = 1 # this one can be got by the td class attribute + reg_date_tr = 3 + location_tr = 6 + proposal_tr = 7 + + def _cleanupHTML(self, html): + """There is a bad table end tag in this one. + Fix it before we start""" + + bad_table_end = '' + good_table_end = '' + return html.replace(bad_table_end, good_table_end) + + if __name__ == '__main__': day = 15 @@ -389,7 +404,7 @@ if __name__ == '__main__': # canterbury # results as columns of one table - parser = HavantParser("HavantBC", "Havant", "http://www3.havant.gov.uk/scripts/planningpages/acolnetcgi.exe?ACTION=UNWRAP&RIPNAME=Root.pgesearch") + parser = OldhamParser("Oldham", "Oldham", "http://planning.oldham.gov.uk/planning//acolnetcgi.gov?ACTION=UNWRAP&RIPNAME=Root.pgesearch") print parser.getResults(day, month, year) diff --git a/trunk/python_scrapers/PublicAccessSites.csv b/trunk/python_scrapers/PublicAccessSites.csv index 3c6e0c2..c584d56 100644 --- a/trunk/python_scrapers/PublicAccessSites.csv +++ b/trunk/python_scrapers/PublicAccessSites.csv @@ -106,3 +106,4 @@ "Carlisle City Council", "Carlisle", "http://planning.carlisle.gov.uk/acolnet/acolnetcgi.gov?ACTION=UNWRAP&RIPNAME=Root.pgesearch", "AcolnetParser", "CarlisleParser" "Newcastle City Council", "Newcastle", "http://gispublic.newcastle.gov.uk/publicaccess/tdc/", "PublicAccess", "PublicAccessParser" "North Wiltshire District Council", "North Wiltshire", "http://planning.northwilts.gov.uk/DCOnline/acolnetcgi.gov?ACTION=UNWRAP&RIPNAME=Root.pgesearch", "AcolnetParser", "NorthWiltshireParser" +"Oldham District Council", "Oldham", "http://planning.oldham.gov.uk/planning//acolnetcgi.gov?ACTION=UNWRAP&RIPNAME=Root.pgesearch", "AcolnetParser", "OldhamParser"