Python > 3.0导入库整理

1、from sgmllib import SGMLParser

2、from bs4 import BeautifulSoup:原始的 from BeautifulSoup import BeautifulSoup不能用了,安装了BeautifulSoup以后,需要以这种方式才能通过。

3、from urllib.request import urlopen:3.0以下版本都是直接使用import urllib2即可使用,但是到3.0以上后需要
from urllib.request import urlopen才能使用,在python帮助文档中也有专门指出。
原文地址:https://www.cnblogs.com/dukewell/p/2933682.html