Переглянути джерело

Sort out Harlow comment url.

import/raw
duncan.parkes 16 роки тому
джерело
коміт
28dbf0d579
2 змінених файлів з 7 додано та 3 видалено
  1. +6
    -2
      trunk/python_scrapers/AcolnetParser.py
  2. +1
    -1
      trunk/python_scrapers/SitesToGenerate.csv

+ 6
- 2
trunk/python_scrapers/AcolnetParser.py Переглянути файл

@@ -201,7 +201,6 @@ class BridgnorthParser(AcolnetParser):
def _getCouncilReference(self, app_table):
return app_table.a.string.split()[-1]


def _getCommentUrl(self, app_table):
"""This must be run after _getInfoUrl"""
#http://www2.bridgnorth-dc.gov.uk/planning/acolnetcgi.gov?ACTION=UNWRAP&RIPNAME=Root.PgeCommentForm&TheSystemkey=46958
@@ -319,7 +318,12 @@ class BassetlawParser(BoltonLikeParser):
div_regex = re.compile("</?div[^>]*>", re.IGNORECASE)
return div_regex.sub('', html)

class HarlowParser(AcolnetParser):
def _getCommentUrl(self, app_table):
"""This must be run after _getInfoUrl"""
#http://www2.bridgnorth-dc.gov.uk/planning/acolnetcgi.gov?ACTION=UNWRAP&RIPNAME=Root.PgeCommentForm&TheSystemkey=46958
return self._current_application.info_url.replace("PgeResultDetail", "PgeCommentNeighbourForm&hasreference=no")

if __name__ == '__main__':
day = 4
month = 4


+ 1
- 1
trunk/python_scrapers/SitesToGenerate.csv Переглянути файл

@@ -96,7 +96,7 @@
"East Lindsey District Council", "East Lindsey", "http://www.e-lindsey.gov.uk/planning/AcolnetCGI.exe?ACTION=UNWRAP&RIPNAME=Root.pgesearch", "AcolnetParser", "AcolnetParser"
"Fylde Borough Council", "Fylde", "http://www2.fylde.gov.uk/planning/acolnetcgi.gov?ACTION=UNWRAP&RIPNAME=Root.pgesearch", "AcolnetParser", "BoltonLikeParser"
"Guildford Borough Council", "Guildford", "http://www.guildford.gov.uk/DLDC_Version_2/acolnetcgi.exe?ACTION=UNWRAP&RIPNAME=Root.pgesearch", "AcolnetParser", "AcolnetParser"
"Harlow Council", "Harlow", "http://planning.harlow.gov.uk/DLDC_Version_2/acolnetcgi.exe?ACTION=UNWRAP&RIPNAME=Root.pgesearch", "AcolnetParser", "AcolnetParser"
"Harlow Council", "Harlow", "http://planning.harlow.gov.uk/DLDC_Version_2/acolnetcgi.exe?ACTION=UNWRAP&RIPNAME=Root.pgesearch", "AcolnetParser", "HarlowParser"
"Hertsmere Borough Council", "Hertsmere", "http://www2.hertsmere.gov.uk/ACOLNET/DCOnline//acolnetcgi.gov?ACTION=UNWRAP&RIPNAME=Root.pgesearch", "AcolnetParser", "BoltonLikeParser"
"London Borough of Lewisham", "Lewisham", "http://acolnet.lewisham.gov.uk/lewis-xslpagesdc/acolnetcgi.exe?ACTION=UNWRAP&RIPNAME=Root.PgeSearch", "AcolnetParser", "LewishamParser"
"North Hertfordshire District Council", "North Hertfordshire", "http://www.north-herts.gov.uk/dcdataonline/Pages/acolnetcgi.gov?ACTION=UNWRAP&RIPNAME=Root.PgeSearch", "AcolnetParser", "AcolnetParser"


Завантаження…
Відмінити
Зберегти