- 博客(5)
- 收藏
- 关注
原创 使用pytesser实现简单的验证码识别
from PIL import Imageimport pytesseractclass 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 127
原创 使用selenium登录微博并发送一条图文微博
使用selenium登录微博并发送一条图文微博selenium 是一个用于Web应用程序测试的工具。在使用python登录微博时,其登录时的密码,用户名加密有些麻烦,可以使用selenium操作浏览器登录获取cookie。selenium安装直接pip就可以搞定: pip install selenium使用selenium驱动chrome浏览器需要下载chromedriver,而且...
2020-04-28 10:28:09 915 1
原创 requests关闭重定向
requests关闭重定向在requests请求当中可以添加参数 allow_redirects=False来关闭重定向但是在关闭重定向后悔产生一个warning可以添加以下代码关闭警告from requests.packages.urllib3.exceptions import InsecureRequestWarning# 禁用安全请求警告requests.packages.ur...
2020-04-22 22:54:58 1027
原创 在python中操作MongoDB数据库
在python中操作MongoDB数据库这里使用的库时pymongo基础使用的代码如下:from pymongo import MongoClientclient = MongoClient() # 创建MongoDB连接#可以使用 client = MongoClient('localhost','27017')#MongoDB的默认端口为27017db = client.db...
2020-04-18 23:32:44 241 2
原创 pymysql1064错误
@[TOC](pymysql插入数据时出现: pymysql.err.ProgrammingError: (1064, "You have an error in your SQL syntax; ))在使用爬虫取得数据后使用pymysql插入数据时出现如下错误pymysql.err.ProgrammingError: (1064, "You have an error in your ...
2020-04-18 23:27:36 866 2
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人