Error when query using urllib2.Request

Execute code:
req = urllib2.Request("")<br> response = urllib2.urlopen(req)<br>
Have eksepsi: urllib2.HTTPError: HTTP Error 507: Insufficient Storage
What could be the problem?
October 8th 19 at 01:01
4 answers
October 8th 19 at 01:03
507 Insufficient Storage — not enough space for the execution of the current request. The problem may be temporary.Introduced in WebDAV.
This "timing" problem for half a day can not solve. - Reinhold66 commented on October 8th 19 at 01:06
October 8th 19 at 01:05
it's funny, but I have the same problem with Your code. I tried to use the urllib module works. Can't understand why :) perhaps You for problem enough opportunities for urllib?
Also tried to use urllib, but there was another problem: the page is loading for a long time, sometimes it loads only part of the page. Maybe this is due to JavaScipt on the called address? I do not know. - Reinhold66 commented on October 8th 19 at 01:08
yeah, tried to calculate the hash on each page (10 units taken), and all have turned out different. Interesting special effect - Reinhold66 commented on October 8th 19 at 01:11
October 8th 19 at 01:07
Server error — most likely, by default urllib2 sends some of those titles, or something like that.
A simple recipe is to catch the query that urllib2 sends the sniffer, and compare it with what you send, for example, browsers.

Maybe the problem with gzip-Ohm or encoding — the same curl the request works fine (checked hundreds of queries)
October 8th 19 at 01:09
# -*- coding: utf-8 -*-

import urllib2

opener = urllib2.build_opener()
opener.addheaders = [('User-agent', 'Mozilla/5.0')]
data ='')

Try this. I have the page load normally.
Eksepsi: urllib2.HTTPError: HTTP Error 307: Temporary Redirect - Reinhold66 commented on October 8th 19 at 01:12
Checked too. All OK loaded. - Reinhold66 commented on October 8th 19 at 01:15

Find more questions by tags Python