ソースを参照

Fix Canterbury parser.

import/raw
duncan.parkes 17年前
コミット
c1dc167ea9
3個のファイルの変更6行の追加6行の削除
  1. +3
    -3
      trunk/python_scrapers/AcolnetParser.py
  2. +2
    -2
      trunk/python_scrapers/ApplicationSearchServletParser.py
  3. +1
    -1
      trunk/python_scrapers/PublicAccess.py

+ 3
- 3
trunk/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")


+ 2
- 2
trunk/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

+ 1
- 1
trunk/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)

読み込み中…
キャンセル
保存