Skip to content

Instantly share code, notes, and snippets.

@breim
Created June 11, 2014 21:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save breim/64d389e0828d28e06224 to your computer and use it in GitHub Desktop.
Save breim/64d389e0828d28e06224 to your computer and use it in GitHub Desktop.
asd
require 'mechanize'
agent = Mechanize.new.get("http://www.mepergunte.com/index_novas_respostas.php")
total = agent.links.count
total.times do |i|
puts agent.links[i].href
agent2 = Mechanize.new.get("http://www.mepergunte.com/"+ agent.links[i].href )
agent2.links.count.times do |j|
a = agent2.links[j].href.to_s && j
t = a[0].scan('http://mepergunte.s3.amazonaws.com/usuarios/')
puts t if t != []
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment