From 2715d297ccc47b219bef6df7e786aab788b68212 Mon Sep 17 00:00:00 2001 From: Adrian Short Date: Thu, 29 Jun 2017 18:13:42 +0100 Subject: [PATCH] Bugfix: prefix baseurl to images url --- scraper.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/scraper.rb b/scraper.rb index ec127b1..a9a4b25 100644 --- a/scraper.rb +++ b/scraper.rb @@ -20,12 +20,11 @@ def parse(app) matches = record['title'].match(/(\d+\/\d+\/\w+)\s+-\s+(.+)/) record['council_reference'] = matches[1] record['type'] = matches[2] - # puts record['council_reference'] app.search("a").each do |link| record['info_url'] = BASEURL + link['href'].strip if link['href'].match(/Details/) record['map_url'] = link['href'].strip if link['href'].match(/\?map=/) - record['images_url'] = link['href'].strip if link['href'].match(/ImageMenu/) + record['images_url'] = BASEURL + link['href'].strip if link['href'].match(/ImageMenu/) record['comment_url'] = BASEURL + link['href'].strip if link['href'].match(/PlanningComments/) end