Re: trouble getting google through urllib

2006-12-20 Thread Fredrik Lundh
BJörn Lindqvist wrote: > For Google, that load must be piss in the ocean. I bet for Google to > even notice the abuse, it must be something really, really severe. like, say, business? http://scripting.wordpress.com/2006/12/19/scripting-news-for-12192006/#comment-25891 -- http://mail.python.o

Re: trouble getting google through urllib

2006-12-20 Thread BJörn Lindqvist
> > > Google doesnt like Python scripts. You will need to pretend to be a > > > browser by setting the user-agent string in the HTTP header. > > > > > and possibly also run the risk of having your system blocked by Google if > > they figure out you are lying to them? > > It is possible. I wrote a '

Re: trouble getting google through urllib

2006-12-19 Thread Amit Khemka
On 19 Dec 2006 16:12:59 -0800, Dr. Locke Z2A <[EMAIL PROTECTED]> wrote: > I looked at those APIs and it would appear that SOAP isn't around > anymore and there are no APIs for google translate :( Can anyone tell > me how to set the user-agent string in the HTTP header? import urllib2 req = urllib

Re: trouble getting google through urllib

2006-12-19 Thread Dr. Locke Z2A
I looked at those APIs and it would appear that SOAP isn't around anymore and there are no APIs for google translate :( Can anyone tell me how to set the user-agent string in the HTTP header? -- http://mail.python.org/mailman/listinfo/python-list

Re: trouble getting google through urllib

2006-12-19 Thread Will McGugan
Duncan Booth wrote: > > > > Google doesnt like Python scripts. You will need to pretend to be a > > browser by setting the user-agent string in the HTTP header. > > > and possibly also run the risk of having your system blocked by Google if > they figure out you are lying to them? It is possible

Re: trouble getting google through urllib

2006-12-19 Thread Paul Rubin
"Dr. Locke Z2A" <[EMAIL PROTECTED]> writes: > Does anyone know how I would get the bot to have permission to get the url? That's what this was for: http://code.google.com/apis/soapsearch/ -- http://mail.python.org/mailman/listinfo/python-list

Re: trouble getting google through urllib

2006-12-19 Thread Fredrik Lundh
Dr. Locke Z2A wrote: > Forbidden > Your client does not have permission to get URL > /translate_t?text='%20como%20estas'&hl=en&langpair=es%7Cen&tbb=1 > from this server. > Does anyone know how I would get the bot to have permission to get the > url? http://www.google.com/terms_of_service.h

Re: trouble getting google through urllib

2006-12-19 Thread Duncan Booth
Will McGugan <[EMAIL PROTECTED]> wrote: > Dr. Locke Z2A wrote: > >> Does anyone know how I would get the bot to have permission to get the >> url? When I put the url in on firefox it works fine. I noticed that in >> the output html that google gave me it replaced some of the characters >> in the

Re: trouble getting google through urllib

2006-12-19 Thread Will McGugan
Dr. Locke Z2A wrote: > Does anyone know how I would get the bot to have permission to get the > url? When I put the url in on firefox it works fine. I noticed that in > the output html that google gave me it replaced some of the characters > in the url with different stuff like the "&" and "%7C",

trouble getting google through urllib

2006-12-18 Thread Dr. Locke Z2A
So I'm writing a bot in python that will be able to do all kinds of weird shit. One of those weird shit is the ability to translate text from one language to another, which I figured I'd use google translate to do. Here is the section for translation that I'm having trouble with: elif(line[abuinde