# -- 
# File: ghost.py
# Date: Tue May 24 08:19:27 PDT 2005 
#
# A simple, completely braindead method of using google cache for DNS
# resolution.
#
# Requires pygoogle :      http://pygoogle.sourceforge.net/
# and a valid google key : http://api.google.com/createkey
# 
#
# --
import sys
import google

google.setLicense('<add your google API key here>')

url    = "yuba.stanford.edu/~casado/goodn/complete.html"

data = google.doGetCachedPage(url)

for line in data.split('\n'):
    if line.startswith('<b>'+sys.argv[1]):
        print line.replace('<b>','').replace('</b>','').replace('<br>','')
