Skip to content

Commit

Permalink
Sintaxis nueva de hash
Browse files Browse the repository at this point in the history
  • Loading branch information
faloi committed Jul 25, 2017
1 parent 706309d commit 85b8d73
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions scraper.rb
Expand Up @@ -20,13 +20,13 @@ def leer_avisos_con_tipo!(tipo)

page.search('li.post').map do |aviso|
{
:id => aviso['id'].gsub('aviso-', ''),
:tipo => tipo,
:titulo => aviso.search('.post-titulo').text,
:barrio => aviso.search('.post-location span').text.gsub(', Capital Federal', ''),
:direccion => aviso.search('.post-location').text.gsub(/\n|\t/, ''),
:precio => aviso.search('.precio-valor').text.strip,
:url => 'http://www.zonaprop.com.ar' + aviso.search('.post-titulo a').attr('href').value
id: aviso['id'].gsub('aviso-', ''),
tipo: tipo,
titulo: aviso.search('.post-titulo').text,
barrio: aviso.search('.post-location span').text.gsub(', Capital Federal', ''),
direccion: aviso.search('.post-location').text.gsub(/\n|\t/, ''),
precio: aviso.search('.precio-valor').text.strip,
url: 'http://www.zonaprop.com.ar' + aviso.search('.post-titulo a').attr('href').value
}
end
end
Expand Down

0 comments on commit 85b8d73

Please sign in to comment.