
python
禾火心白尤
这个作者很懒,什么都没留下…
展开
-
centos7中python2升级python3.8教程
1、查看Python版本python -V2、更新yum源yum update3、安装依赖yum install yum-utilsyum-builddep python4、下载pythonwget https://www.python.org/ftp/python/3.8.0/Python-3.8.0.tgz5、安装Python相关依赖yum -y install zlib-devel bzip2-devel openssl-devel ncursesdevelsqlite原创 2020-11-24 00:41:24 · 4499 阅读 · 3 评论 -
python转带汉字的时间戳
time.strftime('%Y{y}%m{m}%d{d}%H{h}%M{f}%S{s}').format(y='年', m='月', d='日', h='时', f='分', s='秒')原创 2020-10-31 16:54:40 · 539 阅读 · 0 评论 -
解决python存入json格式数据到数据库后汉字的unicode编码没有反斜杠的方法
python在数据库中存入json格式数据的时候,会遇到一个问题,汉字会转义为unicode,然后存入数据据库后\反斜杠没有了,最直接简单的方法,就是不让json.dumps进行转义。具体方法:想要不转义就给json.dumps添加参数 ,ensure_ascii=False...原创 2020-10-08 16:57:36 · 1157 阅读 · 0 评论 -
centos下安装chrome以及chromedriver
文章目录前言安装chrome安装chrome驱动(chromedriver)chrome卸载方法前言因为需要使用selenium打开网页并截图保存到服务器,需要安装selenium和chrom以及chromedriver,网上多次搜索整理一下内容并记录下来。安装chrome1、请确保身份为root,进入CentOS终端,然后依次输入:wget https://dl.google.com/linux/direct/google-chrome-stable_current_x86_64.rpmyu原创 2020-08-13 00:46:58 · 737 阅读 · 0 评论