Python Http Error 503 Service Unavailable
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting urllib2.httperror: http error 503: service unavailable goslate ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the urllib2.httperror http error 503 service unavailable google Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, just like you, helping each other. Join them; it only takes a
Urllib.error.httperror: Http Error 503: Service Unavailable Google
minute: Sign up HTTP Error 503: Service Unavailable up vote -1 down vote favorite When I try to use goslate in python 3, the first time it worked but then it gives this error. File "/usr/lib/python3.4/urllib/request.py", line 5, in http_error_default raise
Textblob Translate
HTTPError(req.full_url, code, msg, hdrs, fp) urllib.error.HTTPError: HTTP Error 503: Service Unavailable python python-2.7 python-3.x share|improve this question asked Apr 13 at 7:26 gho 717 add a comment| 1 Answer 1 active oldest votes up vote 0 down vote Google does not offer a free translation api, the goslate is using a crawler to translate, which is prevented by Google. The author of goslate has post that and will stop the update. So the answer is that google has banned your access, so you urllib2.httperror: http error 503: service temporarily unavailable got a 503. From: https://pypi.python.org/pypi/goslate share|improve this answer answered Apr 13 at 7:42 PapEr 83 But how did it work for the first time? –gho Apr 13 at 7:46 The result of a banned tools is unpredictable, maybe Google Translate accept your request as human the first time, but then find out it's a crawler. That remind me that Google reCaptcha can use one click to find out if you are a bot. but as I said, I don't know exactly how Google block the request. –PapEr Apr 13 at 8:40 So what can be the solution ? –gho Apr 13 at 8:52 Many translate APIs are available as paid services, you may use MS Bing Translate API, It has a limited free plan. Or you have to use Google Translate API, paid for it. –PapEr Apr 14 at 10:53 add a comment| Your Answer draft saved draft discarded Sign up or log in Sign up using Google Sign up using Facebook Sign up using Email and Password Post as a guest Name Email Post as a guest Name Email discard By posting your answer, you agree to the privacy policy and terms of service. Not the answer you're looking for? Browse other questions tagged python python-2.7 python-3.x or ask your own question. asked 6 months ago viewed 434 times active 6 months ago Blog Stack Overflow Podcast #92 - The Guerilla Guide to Interviewing Relat
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn
Python Translation Api
more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags python urllib user agent Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, just like you, python translate language helping each other. Join them; it only takes a minute: Sign up python - HTTP Error 503 Service Unavailable up vote 2 down vote favorite I am trying to scrape data from google and linkedin. Somehow it gave http://stackoverflow.com/questions/36591422/http-error-503-service-unavailable me this error: *** httperror_seek_wrapper: HTTP Error 503: Service Unavailable Can someone help advice how I solve this? error-handling web-scraping share|improve this question asked Aug 16 '14 at 22:33 Tommy N 328 add a comment| 2 Answers 2 active oldest votes up vote 2 down vote Google is simply detecting your query as automated. You would need a captcha solver to get unlimited results. The following link might be helpful. https://support.google.com/websearch/answer/86640?hl=en Bypassing Captcha using an OCR Engine: http://stackoverflow.com/questions/25344610/python-http-error-503-service-unavailable http://www.debasish.in/2012/01/bypass-captcha-using-python-and.html Simple Approach: An even simpler approach is to simply use sleep() a few times and to generate random queries. This way google will not spot that you are using an automated system. But the system is far slower ... Error Handling: To simply get remove the error message use try and except share|improve this answer edited Aug 22 '14 at 14:49 answered Aug 22 '14 at 9:13 Philipp Braun 1,02821229 add a comment| up vote 1 down vote I encountered the same situation and tried using the sleep() function before every request to spread the requests a little. It looked like it was working fine but failed soon enough even with a delay of 2 seconds. What solved it finally was using: with contextlib.closing(urllib.urlopen(urlToOpen)) as x: #do stuff with x. This I did because I thought opening too many requests keeps it open and had to closed. Nevertheless, it worked quite consistently with as less as 0.5s delay time. share|improve this answer answered Mar 20 at 16:56 Revanth Chetluru 111 add a comment| Your Answer draft saved draft discarded Sign up or log in Sign up using Google Sign up using Facebook Sign up using Email and Password Post as a guest Name Email Post as a guest Name Email discard By posting your answer, you agree to the privacy policy and terms of servi
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow http://stackoverflow.com/questions/35512132/urllib2-httperror-http-error-503-service-unavailable the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of https://github.com/mnielsen/mini_qa/issues/2 6.2 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up urllib2.HTTPError: HTTP Error 503: Service Unavailable up vote 0 down vote favorite I am getting the following exception: http error file "/usr/lib64/python2.6/urllib2.py", line 518, in http_error_default raise HTTPError(req.get_full_url(), code, msg, hdrs, fp) urllib2.HTTPError: HTTP Error 503: Service Unavailable My code: opener = urllib2.build_opener() opener.addheaders = [('User-agent', 'Mozilla/5.0')] response = opener.open(filePath) logText = response.read(); Moreover, I tried the following code as well: response = urllib2.urlopen(filePath) logText = response.read(); I am still getting the said error. However, I can access the filePath i.e. the url from windows machine using any browser. But I cannot access http error 503 the same filePath i.e. the URL from the linux machine where I am executing my Python script. Moreover, from this linux machine I cannot even open a web browser. EDIT: URL looks like this: http://tweb.mk.ca.am.polik.se/executions/6061/60583/logs/screenlog.ob1110.191120.txt However, as I am able to access this URL from the windows machine that's why I don't think that there is any problem at the server. Thanks!! python linux urllib2 share|improve this question edited Feb 19 at 18:25 asked Feb 19 at 18:17 John Rambo 6617 503 is generated server-side, so it's likely caused by something in the URL you're using and you didn't provide that. –Todd Knarr Feb 19 at 18:22 "...from this linux machine I cannot even open a web browser" -- I suggest you try a site that's more tech-support related, such as superuser –leongold Feb 19 at 18:24 @ToddKnarr edited the question –John Rambo Feb 19 at 18:30 I can't even get the host to resolve. It could be a Web filter that's set to deny the Linux machines Web access on the theory they don't need it, or something else entirely. Normally I'd do a telnet tweb.mk.ca.am.polik.se 80 and if it connects try doing GET / HTTP/1.0 and see what it says. I think this is l
Sign in Pricing Blog Support Search GitHub This repository Watch 5 Star 29 Fork 19 mnielsen/mini_qa Code Issues 0 Pull requests 0 Projects 0 Pulse Graphs New issue urllib2 uncatched exception when request is not answered #2 Closed newlog opened this Issue Sep 19, 2012 · 2 comments Projects None yet Labels None yet Milestone No milestone Assignees No one assigned 2 participants newlog commented Sep 19, 2012 The problem is in the google.py file, line 96 (the line might change given some modifications I've done to the code). The exception goes like this: Traceback (most recent call last): File "mini_qa.py", line 325, in pretty_qa("Who is the world's best tennis player?") File "mini_qa.py", line 78, in pretty_qa for (j, (answer, score)) in enumerate(qa(question, source)[:num]): File "mini_qa.py", line 96, in qa gqa = google_qa(question) File "mini_qa.py", line 111, in google_qa for summary in get_summaries(query.query): File "mini_qa.py", line 187, in get_summaries results = search(query) File "/Users/newlog/Documents/Proyectos/misc/github/mini_qa/google.py", line 181, in search html = get_page(url) File "/Users/newlog/Documents/Proyectos/misc/github/mini_qa/google.py", line 95, in get_page response = urllib2.urlopen(request) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 126, in urlopen return _opener.open(url, data, timeout) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 400, in open response = meth(req, response) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 513, in http_response 'http', request, response, code, msg, hdrs) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 432, in error result = self._call_chain(args) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 372, in _call_chain result = func(args) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 619, in http_error_302 return self.parent.open(new, timeout=req.timeout) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 400, in open response = meth(req, response) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py"