Skip to content

Instantly share code, notes, and snippets.

@paulkaplan
Created October 5, 2011 04:05
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 paulkaplan/1263604 to your computer and use it in GitHub Desktop.
Save paulkaplan/1263604 to your computer and use it in GitHub Desktop.
API for accessing full names from CNet ID's
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