I want to grab some information about university names, and I found
this term called "web scraping"
I search about it in google, and there are tools in ruby.
One of them is nokogiri but I'm a bit confused because it seems that
it only gets information that its already in an html or xml
Yes, Nokogiri is a toolkit for (among lots of other things) running Xpath or CSS queries against a text file. That text file can be anything -- an io stream of one sort or another with textual data in it will do.
I found a webpage that have a list of university names as a
<select> </select> (html label)
and I want to grab that information
The question is... can I do that with nokogiri or another tool?
The list is like a country list, but with the names of the
universities of my country.
A select can be traversed like any other DOM object, this should be fairly close:
#given doc is a Nokogiri::XML or Nokogiri::HTML nodeset
doc.css('#yourPickerId option').each do |opt|
foo = opt['value']
#whatever else you want to do with foo here
It seems that it get that information from an DB using ajax, and what
I'm trying to do may not be legal or possible
I'll really appreciate if someone can help me to understand what this
tool is used for, and if what I'm trying to do is possible