I writing a python script (personal use only) to translate a text using the terminal on linux.
I tried:
#!/usr/bin/python
import urllib,urllib2
url="http://translate.google.com/#en|pt|love"
#url="http://www.google.com"
request=urllib2.Request(url)
answer=urllib2.urlopen(request).read()
print "request:\n",request,"\n\n"
print "answer:\n",answer,"\n\n"
But it isn't working. The truth if we uncomment the line
#url="http://www.google.com"
and comment url="http://translate.google.com/#en|pt|love"
all works.
It strange because if we copy url="http://translate.google.com/#en|pt|love"
and paste in the browser the url will works.
So, how can I fix this to catch the results?