Skip to content

Commit

Permalink
Fix email
Browse files Browse the repository at this point in the history
  • Loading branch information
tmtmtmtm committed Apr 1, 2016
1 parent cf5472d commit deb439f
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions scraper.rb
Expand Up @@ -91,10 +91,9 @@ def scrape_person(url)
data = {
name:noko.css('td strong').find { |n| n.text.include? 'Dip. ' }.text.sub('Dip. ','').sub(' (LICENCIA)', '').tidy,
image: noko.at_css('img[src*="fotos"]/@src').text,
email: noko.xpath('//td[span[contains(.,"Correo")]]/a/@href').text.gsub(/mailto:\s*/,''),
email: noko.xpath('//td[contains(.,"Correo")]').last.xpath('following-sibling::td').text,
source: url.to_s,
}
binding.pry
data[:image] = URI.join(url, URI.escape(data[:image])).to_s unless data[:image].to_s.empty?
return data
end
Expand Down

0 comments on commit deb439f

Please sign in to comment.