随笔分类 - python
摘要:首先安装插件 pip install pycryptodome 下面代码 import binascii import struct import base64 import json import os from Crypto.Cipher import AES def dump(file_pat
阅读全文
摘要:这里只放表格和一个控件基本属性 grid(**options) 属性-- 下方表格详细列举了各个选项的具体含义和用法: 选项 含义column 1. 指定组件插入的列(0 表示第 1 列)2. 默认值是 0columnspan 指定用多少列(跨列)显示该组件in_ 1. 将该组件放到该选项指定的组件
阅读全文
摘要:在将一个字典添加入json中时多加入一个参数就可以了 json.dumps(dict(item), ensure_ascii=False) 例子 with open('zh-cn.json','w', encoding='utf-8') as f: f.write(json.dumps(trans,
阅读全文
摘要:HTTPERROR_ALLOWED_CODES = [405] //这一条是忽略405错误退出进程,有可能跳到405页面,在parse注意判断,重新请求页面 爬虫里的设置 response.url //这一条在parse里是返回上一个请求链接 meta = {'dont_redirect': Tru
阅读全文
摘要:安装python3.7 wget https://www.python.org/ftp/python/3.7.0/Python-3.7.0.tgz 安装python3的依赖:yum -y groupinstall "Development tools"yum install openssl-deve
阅读全文
摘要:from elasticsearch import Elasticsearch from elasticsearch import helpers import pymysql import time # 连接ES es = Elasticsearch( ['127.0.0.1'], port=9200 ) # 连接MySQL print("Connect to mysql....
阅读全文
摘要:python的多进程,和线程池的理解,及使用!
阅读全文

浙公网安备 33010602011771号