소스 검색

Add Swansea scraper.

master
duncan.parkes 17 년 전
부모
커밋
e22a071d69
2개의 변경된 파일9개의 추가작업 그리고 5개의 파일을 삭제
  1. +7
    -4
      python_scrapers/PlanningExplorer.py
  2. +2
    -1
      python_scrapers/SitesToGenerate.csv

+ 7
- 4
python_scrapers/PlanningExplorer.py 파일 보기

@@ -471,8 +471,8 @@ class LiverpoolParser(PlanningExplorerParser):

return ''.join(ws_re.split(url))

# FIXME - Merton, Shrewsbury, and South Norfolk need to be done here.
# All are down today...
# FIXME - Merton and Shrewsbury need to be done here.
# Both are down today...

class SouthNorfolkParser(PlanningExplorerParser):
use_firefox_user_agent = True
@@ -517,7 +517,9 @@ class StockportParser(PlanningExplorerParser):

return post_data

# FIXME - should add Swansea, but it is currently down
class SwanseaParser(BroadlandLike, PlanningExplorerParser):
# Unlike the other BroadlandLike sites, there are postcodes :-)
pass

class TamworthParser(PlanningExplorerParser):
comments_email_address = "planningadmin@tamworth.gov.uk"
@@ -554,7 +556,8 @@ if __name__ == '__main__':
#parser = SouthNorfolkParser("South Norfolk Council", "South Norfolk", "http://planning.south-norfolk.gov.uk/")
#parser = SouthShropshireParser("South Shropshire District Council", "South Shropshire", "http://194.201.44.102/")
#parser = SouthTynesideParser("South Tyneside Council", "South Tyneside", "http://poppy.southtyneside.gov.uk/")
parser = StockportParser("Stockport Metropolitan District Council", "Stockport", "http://s1.stockport.gov.uk/council/eed/dc/planning/")
#parser = StockportParser("Stockport Metropolitan District Council", "Stockport", "http://s1.stockport.gov.uk/council/eed/dc/planning/")
parser = SwanseaParser("City and County of Swansea", "Swansea", "http://www2.swansea.gov.uk/")
#parser = TamworthParser("Tamworth Borough Council", "Tamworth", "http://80.1.64.77/")
#parser = TraffordParser("Trafford Council", "Trafford", "http://planning.trafford.gov.uk/")
#parser = WestOxfordshireParser("West Oxfordshire District Council", "West Oxfordshire", "http://planning.westoxon.gov.uk/")


+ 2
- 1
python_scrapers/SitesToGenerate.csv 파일 보기

@@ -179,4 +179,5 @@
"Slough Borough Council", "Slough", "http://www2.slough.gov.uk/swiftlg/apas/run/", "SwiftLG", "SloughParser"
"Snowdonia National Park Authority", "Snowdonia", "http://www.snowdonia-npa.gov.uk/swiftlg/apas/run/", "SwiftLG", "SwiftLGParser"
"St Edmundsbury Borough Council", "Bury St Edmunds", "http://www.stedmundsbury.gov.uk/swiftlg/apas/run/", "SwiftLG", "SwiftLGParser"
"Boston Borough Council", "Boston", "http://195.224.121.199/swiftlg/apas/run/", "SwiftLG", "SwiftLGParser"
"Boston Borough Council", "Boston", "http://195.224.121.199/swiftlg/apas/run/", "SwiftLG", "SwiftLGParser"
"City and County of Swansea", "Swansea", "http://www2.swansea.gov.uk/", "PlanningExplorer", "SwanseaParser"

불러오는 중...
취소
저장