Re: [Pygoogle-discuss] Installation questions
Brought to you by:
bluecoat93
From: Chris S. <chr...@gm...> - 2007-07-17 09:42:38
|
On 7/17/07, Mitchell Hoffman <mh8...@gm...> wrote: > Hello, > > I am brand new to PyGoogle and Python in general. I am trying to write a > spider to retrieve the number of results from a simple search engine query > (have the search engine search for all the terms in a column of an Excel > spreadsheet and then return the number of results for each term). > > I tried looking on http://www.google.com/apis/ to find googlekey.txt, but > couldn't find it. Does anyone know where it is? The file googlekey.txt is something you have to create. In your Google account there's a link somewhere (Google for it) reading something like "email me my Google Key". Click that, copy the key from the email, and save it to that text file. > Second, to install PyGoogle, I ran Setup.py from IDLE in my Python25 drive. > Then I opened another IDLE window and typed 'import google' and I got > error saying the google module could not be found. So I manually copied the > four py files in PyGoogle ( Google.py, GoogleSoapFacade.py, Googletest.py, > and SOAP.py) into my Python 25. Now, after running SOAP.py, I am able to do > 'import google' without an error. Did I successfully install PyGoogle? Is > this the right way to install PyGoogle or will I experience problems later? In general, you'll want to run setup.py from a command line, in the form "python setup.py install" to install packages. It might have worked from IDLE if you have run it with the "install" argument, but it's easier to simply use the command line. > Third, is PyGoogle necessary to simply scrape the number of results? Will > simpler tools like UrlLib2 and UrlLib2 work for, or will Google resist/block > them? If you're not doing large numbers of queries, you can get away with urllib. Otherwise, Google will probably block you. After all, that is why they provide an API. Regards, Chris |