Pārlūkot izejas kodu

use :council_reference

pull/37/head
Jez Nicholson pirms 5 gadiem
vecāks
revīzija
0a897805ac
3 mainītis faili ar 6 papildinājumiem un 3 dzēšanām
  1. +2
    -0
      lib/uk_planning_scraper/authorities.csv
  2. +2
    -2
      lib/uk_planning_scraper/authority_scrape_params.rb
  3. +2
    -1
      lib/uk_planning_scraper/idox.rb

+ 2
- 0
lib/uk_planning_scraper/authorities.csv Parādīt failu

@@ -29,6 +29,7 @@ Camden,http://planningrecords.camden.gov.uk/Northgate/PlanningExplorer17/General
Cardiff,https://planningonline.cardiff.gov.uk/online-applications/search.do?action=advanced,wales
Cheshire West and Chester,https://pa.cheshirewestandchester.gov.uk/online-applications/search.do?action=advanced,chester cheshire england
City of London,http://www.planning2.cityoflondon.gov.uk/online-applications/search.do?action=advanced,london innerlondon northlondon england
Cornwall,http://planning.cornwall.gov.uk/online-applications/search.do?action=advanced,england
Croydon,http://publicaccess2.croydon.gov.uk/online-applications/search.do?action=advanced,londonboroughs london
Cornwall,http://planning.cornwall.gov.uk/online-applications/search.do?action=advanced,england
County Durham,https://publicaccess.durham.gov.uk/online-applications/search.do?action=advanced,england
@@ -38,6 +39,7 @@ Doncaster,https://planning.doncaster.gov.uk/online-applications/search.do?action
Dumfries and Galloway,https://eaccess.dumgal.gov.uk/online-applications/search.do?action=advanced,scotland
Ealing,https://pam.ealing.gov.uk/online-applications/search.do?action=advanced,londonboroughs london
East Riding of Yorkshire,https://newplanningaccess.eastriding.gov.uk/newplanningaccess/search.do?action=advanced,england
East Lothian,https://pa.eastlothian.gov.uk/online-applications/search.do?action=advanced,scotland
Edinburgh,https://citydev-portal.edinburgh.gov.uk/idoxpa-web/search.do?action=advanced,scotland
Enfield,https://planningandbuildingcontrol.enfield.gov.uk/online-applications/search.do?action=advanced,londonboroughs london
Epsom and Ewell,http://eplanning.epsom-ewell.gov.uk/online-applications/search.do?action=advanced,surrey england


+ 2
- 2
lib/uk_planning_scraper/authority_scrape_params.rb Parādīt failu

@@ -51,9 +51,9 @@ module UKPlanningScraper
self
end
def reference(s)
def council_reference(s)
check_class(s, String)
@scrape_params[:reference] = s.strip
@scrape_params[:council_reference] = s.strip
self
end


+ 2
- 1
lib/uk_planning_scraper/idox.rb Parādīt failu

@@ -41,7 +41,7 @@ module UKPlanningScraper
form.send(:"date(applicationDecisionStart)", params[:decided_from].strftime(date_format)) if params[:decided_from]
form.send(:"date(applicationDecisionEnd)", params[:decided_to].strftime(date_format)) if params[:decided_to]

form.send(:"searchCriteria\.reference", params[:reference])
form.send(:"searchCriteria\.reference", params[:council_reference])
form.send(:"searchCriteria\.description", params[:keywords])
# Some councils don't have the applicant name on their form, eg Bexley
@@ -124,6 +124,7 @@ module UKPlanningScraper

if apps == [] && page.search('pa')
app = Application.new
app.council_reference = params[:council_reference] if params[:council_reference]
parse_summary(app, page)
apps << app
end # direct hit


Notiek ielāde…
Atcelt
Saglabāt