- 博客(7)
- 资源 (2)
- 收藏
- 关注
原创 ERROR 1045 (28000): Access denied for user 'zzf'@'localhost' (using password: NO)
MySQL下载完成后没有设置密码直接结束了出现了这样的错误~$ mysql -u root -pEnter password: ERROR 1045 (28000): Access denied for user 'zzf'@'localhost' (using password: NO)插卡了mysql下的user表,root的plugin被修改成了auth_socket,用密码登陆的...
2018-12-22 12:57:22 134
原创 简单生成SQL语句的ORM
SQL语句ORMclass ModelMetaclass(type): def __new__(cls, name, bases, attrs): mappings = dict() for k, v in attrs.items(): if isinstance(v, tuple): mapping...
2018-12-20 18:52:43 771
原创 request 模块的使用
requests 请求参数的添加1 请求头的添加 requests.get(url,headers=headers)2. get请求参数 requests.get(url,params=kw)3. post请求请求参数(data)为字典 requests.posturl, data = data,headers=headers)4. 代理的使用 requests.get(url,...
2018-12-18 19:42:09 255
原创 爬虫MySQL配置
关于爬虫MySQL的连接及表的创建from sqlalchemy import create_enginefrom sqlalchemy.orm import sessionmaker, scoped_sessionfrom sqlalchemy.ext.declarative import declarative_baseengine = create_engine('mysql+m...
2018-12-18 19:04:57 200
翻译 nginx重装遇到的问题
重装nginx遇到的问题不能正常启动nginxdpkg: error processing package nginx (--configure): dependency problems - leaving unconfiguredProcessing triggers for libc-bin (2.23-0ubuntu9) ...Errors were encountered wh...
2018-12-16 23:37:15 467
原创 程序实现 百度翻译
百度翻译import jsonimport requestsclass Translate(object): def __init__(self, query_string): self.start_url = 'https://fanyi.baidu.com/langdetect' self.url = "https://fanyi.baidu....
2018-12-14 13:50:34 607
原创 request基础爬虫
request保存图片import requestsimport osdef save_img(path): if not os.path.exists(path): os.makedirs(path) url = 'https://www.baidu.com/img/bd_logo1.png?where=super' response = re...
2018-12-14 10:39:47 100
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人