Method: ESearchy::SocialEngines::Ziggs#crawl_people

Defined in:
lib/esearchy/SocialEngines/ziggs.rb

#crawl_people(text) ⇒ Object



27
28
29
30
31
32
33
34
35
# File 'lib/esearchy/SocialEngines/ziggs.rb', line 27

def crawl_people(text)
  text.scan(/<a class="l" href="([0-9A-Za-z:\\\/?&=@+%.;"'()_-]+)" [\sonmousedown="return curwt(this, ']*[0-9A-Za-z:\\\/?&=@+%.;"'()_-]*[')"]*>([\w\s]*) -/).each do |profile|
    pf = profile[0].to_s
    pf = pf.scan(/\/url\?q=([0-9A-Za-z:\\\/?=@+%.;"'()_-]+)&amp/).to_s if pf.match(/\/url\?q=/)
    p = profile[1].split(" ")
    @people << [ p, pf ]
    @results << [p, "P", pf, self.class.to_s.upcase, "N"]
  end
end