
Python
Mtkgys
这个作者很懒,什么都没留下…
展开
-
python 抓取网页数据基于BeautifulSoup
使用BeautifulSoup 以抓取彩票往期数据为例导入模块安装模块 pip install bs4导入 from bs4 import BeautifulSoup# 获取页面内容data = requests.get('http://datachart.500.com/ssq/history/newinc/history.php?limit=200&sort=0')# 创建解析对象html = BeautifulSoup(data.text,'html.parser')原创 2021-04-12 17:56:50 · 227 阅读 · 0 评论 -
Python 所有类库
库名称简介Chardet 字符编码探测器,可以自动检测文本、网页、xml的编码colorama主要用来给文本添加各种颜色,并且非常简单易用Prettytable主要用于在终端或浏览器端构建格式化的输出。difflib,[Python]标准库,计算文本差异Levenshtein,快速计算字符串相似度。fuzzywuzzy,字符串模糊匹配。esmre,正则表达式的加速器。shortuuid,一组简洁URL/UUID函...转载 2021-03-22 14:26:27 · 1215 阅读 · 0 评论 -
python 打包Windows桌面程序
1.如果没有安装pycharm 请去官网安装2.废话不多说,直接上图,点击 + 号,创建两个模块name: 自己随便定义program: 是PyQt5_tools的路径,如果没有安装PyQt5,安装pip install PyQt5然后在Lib\site-packages\pyqt5_tools\找到designer.exe文件,添加到对应的选项内。working direct...原创 2019-05-30 20:01:58 · 1177 阅读 · 0 评论 -
TypeError: expected str, bytes or os.PathLike object, not NoneType
解决方法:在github这个页面上https://github.com/Loran425/pyinstaller/tree/14b6e65642e4b07a4358bab278019a48dedf7460下载所有文件,解压后找到文件夹PyInstaller\depend\里的bindepend.py文件,然后copy下来,替换虚拟环境里\venv\Lib\site-packages\PyI...原创 2019-05-31 09:09:21 · 5193 阅读 · 0 评论 -
centos7 上部署selenium 安装chrome驱动的爬虫项目
在无界面的CentOS7上安装Selenium+Chrome系统环境CentOS Linux 7安装Chrome使用下面命令即可安装yum install https://dl.google.com/linux/direct/google-chrome-stable_current_x86_64.rpmselenium 确保已安装安装chromedriver驱动我已上传到网盘,直...原创 2019-06-10 18:32:04 · 482 阅读 · 0 评论