Top "Urllib2" questions

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

How to save "complete webpage" not just basic html using Python

I am using following code to save webpage using Python: import urllib import sys from bs4 import BeautifulSoup url = 'http://…

python html python-2.7 urllib2 urllib
HTTP Error 504: Gateway Time-out when trying to read a reddit comments post

I am encountering an error when trying to get a comments' http from reddit. This has happened to various URLs (…

python web-scraping urllib2 reddit http-status-code-504
HandShake Failure in python(_ssl.c:590)

When I execute the below line, req = urllib2.Request(requestwithtoken) self.response = urllib2.urlopen(req,self.request).read() I am …

python ssl-certificate urllib2 pycurl sslhandshakeexception
How can I check whether a URL is valid using `urlparse`?

I want to check whether a URL is valid, before I open it to read data. I was using the …

python urllib2 url-parsing urlparse
How to read image from in memory buffer (StringIO) or from url with opencv python library

Just share a way to create opencv image object from in memory buffer or from url to improve performance. Sometimes …

image opencv numpy urllib2 stringio
How can I speed up fetching pages with urllib2 in python?

I have a script that fetches several web pages and parses the info. (An example can be seen at http://…

python time urllib2 urlopen cprofile
What should I do if socket.setdefaulttimeout() is not working?

I'm writing a script(multi-threaded) to retrieve contents from a website, and the site's not very stable so every now …

python http urllib2 mechanize urllib
Which urllib I should choose?

as we know, python has two built-in url lib: urllib urllib2 and a third-party lib: urllib3 if my requirement is …

python urllib2 urllib urllib3
Python urllib2 Progress Hook

I am trying to create a download progress bar in python using the urllib2 http client. I've looked through the …

python http progress-bar urllib2 httpclient
timeout for urllib2.urlopen() in pre Python 2.6 versions

The urllib2 documentation says that timeout parameter was added in Python 2.6. Unfortunately my code base has been running on Python 2.5 …

python urllib2 urlopen