Permalink
Browse files

Merge pull request #1 from everypolitician-scrapers/replace-pipes-wit…

…h-semi-colons

Replace occurences of | and / in email strings with ;
  • Loading branch information...
tmtmtmtm committed Sep 21, 2016
2 parents ca2370f + 736859a commit 30780196139c9a79b7b013eb369d74342e3d8852
Showing with 1 addition and 1 deletion.
  1. +1 −1 scraper.rb
View
@@ -41,7 +41,7 @@ def scrape_party(url)
party: tds[2].text.strip,
party_id: CGI.parse(URI.parse(url).query)['party'].first.gsub(/[{}]/,''),
constituency: memberships.first[/ in (.*?) from/, 1].sub('greater constituency','').strip,
email: box.css('div.person a[href*="mailto:"]/@href').text.gsub('mailto:',''),
email: box.css('div.person a[href*="mailto:"]/@href').text.gsub('mailto:','').tr('|/',';'),
homepage: box.css('div.person a[href*="http"]/@href').text,
image: box.css('div.person img/@src').text,
memberships: memberships.join("+++"),

0 comments on commit 3078019

Please sign in to comment.