From 6d72d251665941b56daaefa33d463b4f590b4ace Mon Sep 17 00:00:00 2001 From: Adrian Short Date: Thu, 20 Sep 2018 16:30:40 +0100 Subject: [PATCH] Search field name variant for Idox eg Bolton --- lib/uk_planning_scraper/idox.rb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/uk_planning_scraper/idox.rb b/lib/uk_planning_scraper/idox.rb index b773c8a..9810624 100644 --- a/lib/uk_planning_scraper/idox.rb +++ b/lib/uk_planning_scraper/idox.rb @@ -36,7 +36,12 @@ module UKPlanningScraper # Some councils don't have the applicant name on their form, eg Bexley form.send(:"searchCriteria\.applicantName", params[:applicant_name]) if form.has_field? 'searchCriteria.applicantName' - form.send(:"searchCriteria\.caseType", params[:application_type]) + + form.send(:"searchCriteria\.caseType", params[:application_type]) if form.has_field? 'searchCriteria.caseType' + # Some Idox sites (eg Bolton) call this 'searchCriteria.developmentType' + form.send(:"searchCriteria\.developmentType", params[:application_type]) if form.has_field? 'searchCriteria.developmentType' + + page = form.submit loop do