Permalink
Browse files

Fix broken image paths

  • Loading branch information...
tmtmtmtm committed Jul 31, 2015
1 parent 16d526c commit 5c17d40e640b2831706d2f5fdb01fee2f3d47423
Showing with 1 addition and 1 deletion.
  1. +1 −1 scraper.rb
View
@@ -36,7 +36,7 @@ def scrape_list(url)
constituency: tds[3].text,
}
data[:id] = data[:image][/(\d+).(jpg|png)$/, 1]
data[:image] = URI.join(url, data[:image]).to_s.sub('/images/','/images/mpsL/') unless data[:image].to_s.empty?
data[:image] = URI.join(url, data[:image]).to_s.sub('/images/mps/','/images/mpsL/') unless data[:image].to_s.empty?
data
end
end

0 comments on commit 5c17d40

Please sign in to comment.