上一页 1 ··· 7 8 9 10 11 12 13 14 15 ··· 17 下一页
摘要: 1.导入模块 >>> import logging 2.五种日志级别 #输出时默认只显示警告级别以上的信息,可以使用basicConfig的level参数更改 >>> logging.basicConfig(level=logging.DEBUG) ... logging.debug('调试') . 阅读全文
posted @ 2019-09-17 13:53 ForLivetoLearn 阅读(186) 评论(0) 推荐(0)
摘要: 比urllib.request更方便的爬虫工具 官方中文文档:http://cn.python-requests.org/zh_CN/latest/ 安装 pip install requests # 或者用pycharm点点点 导入模块 >>> import requests 网页的基本用法,GE 阅读全文
posted @ 2019-09-06 10:38 ForLivetoLearn 阅读(201) 评论(0) 推荐(0)
摘要: 官方文档:https://www.crummy.com/software/BeautifulSoup/bs4/doc.zh/ 使用前需要先安装模块,并安装解析器 pip install beautifulsoup4 pip install lxml pip install html5lib 安装完成 阅读全文
posted @ 2019-08-13 17:05 ForLivetoLearn 阅读(195) 评论(0) 推荐(0)
摘要: python使用正则表达式之前需要先倒入re模块 import re 可选标志位 re.A ASCII,使得 \w,\W,\b,\B,\s 和 \S 只匹配 ASCII 字符,而不匹配完整的 Unicode 字符。这个标志仅对 Unicode 模式有意义,并忽略字节模式。 re.I IGNORECA 阅读全文
posted @ 2019-08-12 16:58 ForLivetoLearn 阅读(1304) 评论(0) 推荐(0)
摘要: python使用代理的方法有两种 1. 2. 示例代码: 阅读全文
posted @ 2019-08-06 14:35 ForLivetoLearn 阅读(10506) 评论(0) 推荐(0)
摘要: 添加头部信息有两种方法 1.通过添加urllib.request.Request中的headers参数 2.通过urllib.request.Request的add_header方法添加 360翻译示例代码: 阅读全文
posted @ 2019-08-06 11:35 ForLivetoLearn 阅读(8842) 评论(0) 推荐(0)
摘要: 老男孩的https://www.jianshu.com/p/2f93bb771469 Redis配置文件 #masterauth aaaa #slave连上master时用的密码 #requirepass aaaa #连上数据库后,使用auth认证密码后才能使用 bind 192.168.1.236 阅读全文
posted @ 2019-04-18 16:54 ForLivetoLearn 阅读(197) 评论(0) 推荐(0)
摘要: docker安装 1.安装docker所需的软件 yum install -y yum-utils device-mapper-persistent-data lvm2 2.添加docker源 yum-config-manager --add-repo http://mirrors.aliyun.c 阅读全文
posted @ 2019-02-14 21:07 ForLivetoLearn 阅读(251) 评论(0) 推荐(0)
摘要: LVS调度算法参考 RR:轮询 WRR :加权轮询 DH :目标地址哈希 SH:源地址hash LC:最少连接 WLC:加权最少连接,默认 SED:最少期望延迟 NQ:从不排队调度方法 LBLC:基于本地的最少连接 LBLCR:带复制的基于本地的最少连接 ipvsadm命令参考 ipvsadm -A 阅读全文
posted @ 2018-11-22 22:04 ForLivetoLearn 阅读(213) 评论(0) 推荐(0)
摘要: 修改主目录wordpress下的wp-config.php文件,在最结尾加上 更改wp-content的权限为777 阅读全文
posted @ 2018-11-08 14:48 ForLivetoLearn 阅读(1647) 评论(0) 推荐(0)
上一页 1 ··· 7 8 9 10 11 12 13 14 15 ··· 17 下一页