Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a library for urllib2 for python which we can download?

Tags:

python

urllib2

I need to use urllib2 with BeautifulSoup. I found the download file for BeautifulSoup and installed it, however, I couldn't find any download files for urllib2, is there another way to intall that module?

like image 385
Josh Avatar asked May 16 '13 21:05

Josh


1 Answers

The module comes with Python, simply import it:

import urllib2

If you're using Python3, the urllib was replaced by urllib.request. The Urllib PEP (Python3): http://www.python.org/dev/peps/pep-3108/#urllib-package.

like image 174
dav1d Avatar answered Oct 22 '22 08:10

dav1d