Top "Urllib2" questions

urllib2 is a builtin python 2 module that defines functions and classes to help with URL actions.

Overriding urllib2.HTTPError or urllib.error.HTTPError and reading response HTML anyway

I receive a 'HTTP Error 500: Internal Server Error' response, but I still want to read the data inside the error …

python urllib2 urllib http-error
Download and decompress gzipped file in memory?

I would like to download a file using urllib and decompress the file in memory before saving. This is what …

python file gzip urllib2 stringio
A good way to get the charset/encoding of an HTTP response in Python

Looking for an easy way to get the charset/encoding information of an HTTP response using Python urllib2, or any …

python character-encoding httprequest urllib2
ValueError: unknown url type in urllib2, though the url is fine if opened in a browser

Basically, I am trying to download a URL using urllib2 in python. the code is the following: import urllib2 req = …

python urllib2 httprequest
Python urllib2.HTTPError: HTTP Error 503: Service Unavailable on valid website

I have been using Amazon's Product Advertising API to generate urls that contains prices for a given book. One url …

python urllib2
How do I prevent Python's urllib(2) from following a redirect

I am currently trying to log into a site using Python however the site seems to be sending a cookie …

python urllib2
urllib2 file name

If I open a file using urllib2, like so: remotefile = urllib2.urlopen('http://example.com/somefile.zip') Is there an …

python url urllib2
How to make HTTP DELETE method using urllib2?

Does urllib2 support DELETE or PUT method? If yes provide with any example please. I need to use piston API.

python urllib2
Python: Clicking a button with urllib or urllib2

I want to click a button with python, the info for the form is automatically filled by the webpage. the …

python urllib2 mechanize urllib twill
How to get the URL of a redirect with Python

In Python, I'm using urllib2 to open a url. This url redirects to another url, which redirects to yet another …

python redirect urllib2