以前的輸出
????print("我叫s%”%('小明'))
python3 后通過(guò){} 和:來(lái)代替以前的%
print ("我叫{}".format('小明'))
頁(yè)面交互遇錯(cuò),編譯問(wèn)題
#獲取當(dāng)前頁(yè)面代碼 page_source
print('當(dāng)前頁(yè)面代碼{}'.format(web.page_source))
解決方法
reload(sys)
sys.setdefaultencoding( "utf-8" )