摘要: 自己做了共享模块包,放入Python第三方包模块site-packages时,使用Eclipse工具import此包,提示Unresolved import错误; 但是使用pycharm工具可用正常引入并使用。 原因是Eclipse引入的包中,必须要有__init__.py这个默认的文件;手动增加_ 阅读全文
posted @ 2017-04-21 10:31 wei_aust 阅读(199) 评论(0) 推荐(0) 编辑
摘要: #在程序前加上这段代码 from selenium import webdriver options = webdriver.ChromeOptions() options.add_experimental_option("excludeSwitches",["ignore-certificate-errors"]) driver = webdriver.Chrome(chrome_option... 阅读全文
posted @ 2017-04-13 11:16 wei_aust 阅读(1560) 评论(0) 推荐(0) 编辑
摘要: 需要添加一句 data = data.decode('utf-8') 其中, utf-8 编码是根据读取的网页的编码,例如读取CSDN博客或者163页面,那就要这样写:data = data.decode('GBK') 阅读全文
posted @ 2017-04-13 11:07 wei_aust 阅读(489) 评论(0) 推荐(0) 编辑