摘要: Linux firewall 常用命令 linux firewall防火墙放行端口 firewall-cmd --zone=public --add-port=xxxx/tcp --permanent --zone 作用域 --permanent 永久生效,没有此参数重启后失效 firewalld刷新生效 firewall-cmd --r 阅读全文
posted @ 2022-04-13 13:56 luckywhat 阅读(298) 评论(0) 推荐(0)
摘要: python 多线程 多线程流程 导入模块 import threading 通过线程类型创建线程对象 线程对象 = threading.Thread(target = '待执行函数',name = (线程命名)) 启动线程执行任务 线程对象.start() 启动线程 创建子线程 sing_thre 阅读全文
posted @ 2021-01-18 14:56 luckywhat 阅读(110) 评论(0) 推荐(0)
摘要: 安装方法 pip(3) install fake-useragent 使用方法如下: import requests from fake_useragent import UserAgent ua = UserAgent() headers = {'User-Agent': ua.random} u 阅读全文
posted @ 2021-01-17 17:32 luckywhat 阅读(310) 评论(0) 推荐(0)
摘要: 常用表达式 单字符: . : 除换行以外所有字符 [] :[aoe] [a-w] 匹配集合中任意一个字符 \d :数字 [0-9] \D : 非数字 \w :数字、字母、下划线、中文 \W : 非\w \s :所有的空白字符包,括空格、制表符、换页符等等。等价于 [ \f\n\r\t\v]。 \S 阅读全文
posted @ 2020-11-20 23:32 luckywhat 阅读(65) 评论(0) 推荐(0)
摘要: ##临时使用 ###可以在使用pip的时候加参数 -i https://pypi.tuna.tsinghua.edu.cn/simple ##设为默认 pip install pip -U -i https://pypi.tuna.tsinghua.edu.cn/simple pip config 阅读全文
posted @ 2020-10-21 15:51 luckywhat 阅读(64) 评论(0) 推荐(0)