simple spider in python

samushack at gmail.com samushack at gmail.com
Thu Aug 23 10:29:58 EDT 2007


> I'm trying to do a simple spider in python which:
>
> 1) ask google a query
> 2) parse the data

While you could use urllib2.urlopen() as Frederick mentioned, there is
actually a Python module built JUST for getting info from Google
queries! So check out PyGoogle: http://pygoogle.sourceforge.net/

After you install and import it like a normal Python module, you can
do things like:
doGoogleSearch("thing to query") and get results! Very easy to use.

One thing that might throw you at first: You need to get an API key
from Google, and use that when you setup the classes. The link I
pasted above has all the details.

Good luck!

-Sam




More information about the Python-list mailing list