classifier systems re-coded in Python?

John Hunter jdhunter at ace.bsd.uchicago.edu
Tue Nov 19 03:40:10 EST 2002


>>>>> "Matt" == Matt Gerrans <mgerrans at mindspring.com> writes:

    Matt> Google web APIs: http://www.google.com/apis/ --

For starters, something like

#!/usr/local/bin/python
import google, sys

# Get your own from http://www.google.com/apis/
google.LICENSE_KEY = 'blah blah'
data = google.doGoogleSearch(sys.argv[1])
 

for result in data.results:
    print 'Title: ', result.title
    print 'URL: ', result.URL
    print 'Summary: ', result.snippet
    print

The title and snippet fields are html, so you'd probably want to strip
the tags with your favorite html2txt converter, and you need to handle
non-ascii charsets....

John Hunter





More information about the Python-list mailing list