随笔分类 -  python库

摘要:# 端口扫描工具 TCP模式-socket 原理 目标主机的一个端口如果是监听状态(LISTENING或者LINSTEN),那么当我connect目标主机时就能成功,否则说明端口是关闭的。 优点: 编程简单,是需要一个API connect(),比较可靠,因为TCP是可靠协议,当丢包的时候,会重传 阅读全文
posted @ 2022-07-07 16:59 木捏牛 阅读(258) 评论(0) 推荐(0) 编辑
摘要:https://www.cnblogs.com/fengf233/p/10880782.html 阅读全文
posted @ 2021-01-11 22:11 木捏牛 阅读(52) 评论(0) 推荐(0) 编辑
摘要:python解析常用库的语法 xpath Beautifulsoup ''' html_doc = """ <html> <head> <title>The Dormouse's story</title> </head> <body> <p class="title aq"> <b> The Do 阅读全文
posted @ 2021-01-06 22:17 木捏牛 阅读(257) 评论(0) 推荐(0) 编辑
摘要:import os import time import shutil def del_file(filepath): """ 删除某一目录下的所有文件或文件夹 """ del_list = os.listdir(filepath) for f in del_list: file_path = os 阅读全文
posted @ 2020-12-25 22:38 木捏牛 阅读(171) 评论(0) 推荐(0) 编辑
摘要:GET参数实例 requests.get('http://www.dict.baidu.com/s', params={'wd': 'python'}) #或 url = 'http://www.baidu.com' payload = {'key1': 'value1', 'key2': 'val 阅读全文
posted @ 2020-12-15 15:21 木捏牛 阅读(84) 评论(0) 推荐(0) 编辑
摘要:安装 pip install fake-useragent 使用 from fake_useragent import UserAgent ua = UserAgent() #print(ua.chrome) headers= {'User-Agent':ua.random} r = request 阅读全文
posted @ 2020-12-15 15:14 木捏牛 阅读(92) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示