has_key方法在python2中是可以使用的,在python3中删除了。
比如:
if dict.has_key(word):
改为:
if word in dict:
python3 import selenium出错,解决方法
pip uninstall selenium
pip install selenium==2.48.0
启动 ./mongod --config mongo.conf
在浏览器里输入mongodb所在机器IP及端口号:http://192.168.6.70:27017/
>>>
import
urllib.request
Python 3 改成 http.cookiejar了,所以只要改成import http.cookiejar就自动导入cookiejar了
改为
story_data = json.loads(self.request.body.decode('utf-8'))
has_key方法在python2中是可以使用的,在python3中删除了。
比如:
if dict.has_key(word):
改为:
if word in dict:
pip uninstall selenium
pip install selenium==2.48.0