码迷,mamicode.com
首页 >  
搜索关键字:decode    ( 2985个结果
查看压缩文件的信息
import zipfile with zipfile.ZipFile(r'E:/Python爬虫精进.zip','r') as f: for 文件名 in f.namelist(): 信息=f.getinfo(文件名) 文件名=文件名.encode('cp437').decode('gbk') p ...
分类:其他好文   时间:2020-07-11 12:28:20    阅读次数:76
记一次解密的坑
做项目遇到请求对方页面,对方返回的参数串直接拼接到我的URL上,是一个加密串. 因为忘记了之前有URLEncoder这个步骤, 解密的时候没有使用URLDecoder进行解密, 直接使用AES解密遇到报错, Input length must be multiple of 16 when decry ...
分类:其他好文   时间:2020-07-10 12:57:16    阅读次数:103
爬取素材库直接存入mysql数据库
爬取素材库。直接存入mysql数据库。 包含html源码直接存入数据库需要的转义函数。 替换掉源码中的html注释语句 import re import requests import random import time from bs4 import BeautifulSoup import p ...
分类:数据库   时间:2020-07-08 23:04:25    阅读次数:80
创建多个redis
不同的应用如果都需要redis,,可以创建多个 pool = redis.ConnectionPool(host='127.0.0.1', port=6379, decode_responses=True,db=1)r1 = redis.Redis(connection_pool=pool)r1.f ...
分类:其他好文   时间:2020-07-08 15:43:04    阅读次数:65
下载AOSP源码
如果硬盘空间够大,下载最新的版本。 由于所有代码都是从隐藏的 .repo 目录中 checkout 出来的,下载后解压 再 repo sync 一遍即可得到完整的目录。 使用方法如下: wget -c https://mirrors.tuna.tsinghua.edu.cn/aosp-monthly ...
分类:其他好文   时间:2020-07-08 15:36:30    阅读次数:84
url中特殊字符被转义成编码后如何处理
做加密时,传到后台出现%20 %3D等,导致解密错误,原因是特殊字符被转义编码,解决方案: try { ciphertext = URLDecoder.decode(ciphertext,"UTF-8"); } catch (UnsupportedEncodingException e) { e.p ...
分类:Web程序   时间:2020-07-07 15:28:32    阅读次数:97
如何在FastAdmin中使用Ajax发送请求?
html页面: js文件里添加以下代码:{field: 'uid', title: __('解绑'), table: table, buttons: [ { name: 'ajax', text: __('解绑'), title: __('解绑'), classname: 'btn btn-xs b ...
分类:Web程序   时间:2020-07-06 17:58:26    阅读次数:387
小程序07-text组件
文本组件,只能嵌套自身 --在小程序中只有这个标签 长按文字时可以复制,需要为text标签添加selectable属性 <text selectable>长按文字,复制这一段话</text> --可以对空格 回车 进行编码,需要为text标签添加decode属性 如果不为text设置decode属性 ...
分类:微信   时间:2020-07-05 22:51:34    阅读次数:107
JSONDecodeError: Expecting value: line 1 column 1 (char 0)
问题: 执行代码过程中抛出异常:JSONDecodeError: Expecting value: line 1 column 1 (char 0) 原因: 需要转换为json格式的参数不符合json格式 json格式中,键值必须用单引号或双引号引起来,而传递的参数键值没有使用引号引起来,在转换为j ...
分类:Web程序   时间:2020-07-05 21:27:42    阅读次数:69
python的encode()和decode()函数
decode()函数的作用是用作解码,encode()函数是用作编码。 decode函数以encoding指定的编码格式解码字符串,默认是字符串编码。 语法是: str.decode(encoding='utf-8') encode函数以encoding指定的编码格式编码字符串。 语法是: str. ...
分类:编程语言   时间:2020-07-05 00:52:12    阅读次数:72
2985条   上一页 1 ... 6 7 8 9 10 ... 299 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!