问题
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?
回答1:
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.
来源:https://stackoverflow.com/questions/16597865/is-there-a-library-for-urllib2-for-python-which-we-can-download