上一页 1 ··· 102 103 104 105 106 107 108 109 110 ··· 337 下一页
摘要: REF https://www.zhihu.com/question/51745620 import matplotlib.pyplot as plt fig = plt.figure(1) ax1 = fig.add_subplot(211) ax2 = fig.add_subplot(212) 阅读全文
posted @ 2021-12-17 15:54 emanlee 阅读(726) 评论(0) 推荐(0)
摘要: REF http://blog.itpub.net/23556054/viewspace-1115506/ 查看 oracle 数据库是否启动: 一、LINUX: 1、用 ps -ef|grep ora 查看,是否有oracle的进程,linux下还可以用ipcs查看 2、查看监听的方法 cd /o 阅读全文
posted @ 2021-12-17 11:13 emanlee 阅读(922) 评论(0) 推荐(0)
摘要: Run菜单,选择‘’编辑配置‘, 每个py文件单独做以下的设置: 勾选 Run with Python Console 执行脚本,可以看到现在脚本运行在Python Console中,而不是通常的Run下运行了,现在我们就可以像IDLE一样,程序运行结束后,直接在Console输入命令,查看变量的值 阅读全文
posted @ 2021-12-16 19:44 emanlee 阅读(2139) 评论(0) 推荐(0)
摘要: 【 REF:https://blog.csdn.net/solaris_navi/article/details/3589256 】 要查找和替换的项目的通配符如果要查找:任意单个字符键入 ?例如,s?t 可查找“sat”和“set”。 任意字符串键入 *例如,s*d 可查找“sad”和“start 阅读全文
posted @ 2021-12-06 21:40 emanlee 阅读(534) 评论(0) 推荐(0)
摘要: beautifulsoup通过id获取指定元素内容 bs.find('th', id='DetailTilte') 通过class 查找 soup.find_all('span', class_='item_hot_topic_title') soup.find(class_ ='primaryco 阅读全文
posted @ 2021-12-05 20:46 emanlee 阅读(57) 评论(0) 推荐(0)
摘要: 解决办法: 1.安装 pip install lxml pip install html_parser 2.将 BeautifulSoup(html,'html.parser') 改为 BeautifulSoup(html,'lxml') , 或 反之 阅读全文
posted @ 2021-12-05 19:44 emanlee 阅读(608) 评论(0) 推荐(0)
摘要: Python 3 写文件 UnicodeEncodeError: 'gbk' codec can't encode character 网页代码中存在“”<meta charset="gbk">“”,如果存为 utf-8,再用浏览器打开,会出现乱码。因此,必须存为 gbk。 解决方法: 在写入 st 阅读全文
posted @ 2021-12-04 22:24 emanlee 阅读(720) 评论(0) 推荐(0)
摘要: Python 3中的默认编码 Python3中默认是UTF-8 可查看Python3的默认编码。 >>> import sys >>> >>> sys.getdefaultencoding() 'utf-8' >>> 系统默认编码 指: 在python 3编译器读取.py文件时,若没有头文件编码声明 阅读全文
posted @ 2021-12-04 10:37 emanlee 阅读(1189) 评论(0) 推荐(0)
摘要: UnicodeEncodeError: 'gbk' codec can't encode character '\ue625' in position 324196: illegal multibyte sequence f = open("out.html","w",encoding='utf-8 阅读全文
posted @ 2021-12-03 22:07 emanlee 阅读(254) 评论(0) 推荐(0)
摘要: 用requests.get()之后得到的源代码跟浏览器里面的不一样 崔庆才的《python3网络爬虫开发实战》在2.3.3节: 我们用urllib或requests获取到的是HTML源代码,但是这个网页是用js渲染的,上面两个库不会像浏览器那样继续运行后面请求来的js模块,所以不一样。 Seleni 阅读全文
posted @ 2021-12-03 00:11 emanlee 阅读(2378) 评论(0) 推荐(0)
上一页 1 ··· 102 103 104 105 106 107 108 109 110 ··· 337 下一页