unicode是字符集,Utf-8是编码方式,你解释的unicode实际应该是utf-16,这种方式是通用两个字节,所以浪费空间,utf-8可以节约空间,但是浪费时间,你这个解释似乎不是很准确。。
2016-08-30
你讲错了吧,decode("UTF-8")是把你获取到的网页代码转成UNICODE编码,beautifulsoup内部有自动转换功能,这一步也不是必须的,但是最好明确的转换
2016-08-30
安装报错: 'pymysql' is not a package 请指点,一下午都没过去这个坎...
File "F:/AG-Data/Space-Python/Code/imooc/wikitomysql.py", line 7, in <module>
import pymysql.cursors
ImportError: No module named 'pymysql.cursors'; 'pymysql' is not a package
Process finished with exit code 1
File "F:/AG-Data/Space-Python/Code/imooc/wikitomysql.py", line 7, in <module>
import pymysql.cursors
ImportError: No module named 'pymysql.cursors'; 'pymysql' is not a package
Process finished with exit code 1
2016-08-29
conn=pymysql.connect('127.0.0.1','root','root','test')
2016-08-28