Skip to content

Commit

Permalink
Join multiple email addressess with semi-colons
Browse files Browse the repository at this point in the history
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 everypolitician/everypolitician-data#33726
  • Loading branch information
Oliver Denman committed Jul 7, 2017
1 parent e66515f commit ea0a9ea
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/member_page.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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 { |str| str.text.tidy }.join(';')
end

field :website do
Expand Down

0 comments on commit ea0a9ea

Please sign in to comment.