Created
October 5, 2011 04:05
-
-
Save paulkaplan/1263604 to your computer and use it in GitHub Desktop.
API for accessing full names from CNet ID's
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'nokogiri' | |
cnet = ARGV[0] | |
raw = `curl -d "cnetid=#{cnet}&commit=Search" http://directory.uchicago.edu/` | |
doc = Nokogiri::HTML( raw ) | |
name = doc.xpath('//td[@headers="fullname"]').text | |
puts name |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment