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

五迷三道 提交于 2019-12-22 05:38:39

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!