![](https://img-blog.csdnimg.cn/20201014180756738.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
基础操作
怜火
这个作者很懒,什么都没留下…
展开
-
使用pytesser实现简单的验证码识别
from PIL import Image import pytesseract class Verification(): def __init__(self,path): self.image = Image.open(path) self.w, self.h = self.image.size self.num = 0 d...原创 2020-04-29 11:02:27 · 126 阅读 · 0 评论 -
使用selenium登录微博并发送一条图文微博
使用selenium登录微博并发送一条图文微博 selenium 是一个用于Web应用程序测试的工具。在使用python登录微博时,其登录时的密码,用户名加密有些麻烦,可以使用selenium操作浏览器登录获取cookie。 selenium安装 直接pip就可以搞定: pip install selenium 使用selenium驱动chrome浏览器需要下载chromedriver,而且...原创 2020-04-28 10:28:09 · 906 阅读 · 1 评论 -
requests关闭重定向
requests关闭重定向 在requests请求当中可以添加参数 allow_redirects=False来关闭重定向 但是在关闭重定向后悔产生一个warning 可以添加以下代码关闭警告 from requests.packages.urllib3.exceptions import InsecureRequestWarning # 禁用安全请求警告 requests.packages.ur...原创 2020-04-22 22:54:58 · 1025 阅读 · 0 评论 -
在python中操作MongoDB数据库
在python中操作MongoDB数据库 这里使用的库时pymongo 基础使用的代码如下: from pymongo import MongoClient client = MongoClient() # 创建MongoDB连接 #可以使用 client = MongoClient('localhost','27017') #MongoDB的默认端口为27017 db = client.db...原创 2020-04-18 23:32:44 · 237 阅读 · 2 评论