From e7fff48f0f6414c8797306571cc3dfa68b63adbc Mon Sep 17 00:00:00 2001 From: Oliver Denman Date: Fri, 7 Jul 2017 15:05:21 +0100 Subject: [PATCH] Join multiple email addressess with semi-colons Some members have multiple email addresses. Previously MemberPage was capturing them joined as one contiguous string. With this commit, multiple email addresses are now delimited with semi-colons. Fixes https://github.com/everypolitician/everypolitician-data/issues/33726 --- lib/member_page.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/member_page.rb b/lib/member_page.rb index 2ad59c476..3d6315da8 100644 --- a/lib/member_page.rb +++ b/lib/member_page.rb @@ -38,7 +38,7 @@ class MemberPage < Scraped::HTML end field :email do - bio.xpath('//table/tr/td/a[contains(@href, "mailto")]/text()').to_s.tidy + bio.xpath('//table/tr/td/a[contains(@href, "mailto")]').map(&:text).map(&:tidy).join(';') end field :website do