--> -->

11 2022 档案

摘要:import argparse # (1) 声明一个parser parser = argparse.ArgumentParser() # (2) 添加参数 parser.add_argument("parg") # 位置参数,这里表示第一个出现的参数赋值给parg parser.add_argum 阅读全文
posted @ 2022-11-21 11:39 柠鸢 阅读(38) 评论(0) 推荐(1) 编辑
摘要:提供两种定时任务的方式 1.BlockingScheduler from apscheduler.schedulers.blocking import BlockingScheduler sched = BlockingScheduler() #每隔300秒执行一次任务 sched.add_job( 阅读全文
posted @ 2022-11-21 11:26 柠鸢 阅读(96) 评论(0) 推荐(0) 编辑
摘要:爬虫程序会遇到各色各样的验证码,整理一下解决方法。 1.使用均值哈希算法进行图像识别 原理是根据像素平均值对比,来得到一串01010001这样的字符串,通过比较相同位置上是否相同。 统计出来的数量作为相似度凭据。 适用于不规则,难以识别文字或字母时的图像对比,适用面不广,但思路可以借鉴。 代码如下: 阅读全文
posted @ 2022-11-04 10:06 柠鸢 阅读(120) 评论(0) 推荐(0) 编辑