Skip to content

Commit

Permalink
Handle multiple email addresess
Browse files Browse the repository at this point in the history
  • Loading branch information
tmtmtmtm committed Oct 7, 2017
1 parent f68b745 commit e30d055
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scraper.rb
Expand Up @@ -80,7 +80,7 @@ def scrape_person(url)
faction = 'Independent' if faction.empty?
end

email = bio.xpath('//table/tr/td/a[contains(@href, "mailto")]/text()').to_s.tidy
email = bio.xpath('//table/tr/td/a[contains(@href, "mailto")]').map(&:text).map(&:tidy).join(";")

website = bio.xpath('//table/tr/td[contains(.,"Homepage")]/following-sibling::td/a/text()').to_s.tidy
phone = bio.xpath('//table/tr/td[contains(.,"telephone")]/following-sibling::td[position() = 2]/text()').to_s.tidy
Expand Down

0 comments on commit e30d055

Please sign in to comment.