doc = requests.get(‘https://www.baidu.com’)
doc.encoding = ‘utf-8’
print(doc.text)
https://blog.csdn.net/godot06/article/details/81558910
UserWarning: Selenium support for PhantomJS has been deprecated, please use headless versions of Chrome or Firefox instead warnings.warn('Selenium support for PhantomJS has been deprecated, please use headless
意思就是Selenuim已经放弃PhantomJS,了,建议使用火狐或者谷歌无界面浏览器。解决:https://www.cnblogs.com/shaosks/p/9134257.html
如果pycharm中有这个模块,能够导入使用。那么说明版本太低了。升级一下