摘要: ele = detail_html.xpath('//*[@id="content"]/article/section/div/div')[0] print(ele) from xml.etree import ElementTree xml_str = ElementTree.tostring(e 阅读全文
posted @ 2021-11-25 17:47 167 阅读(2127) 评论(0) 推荐(0)
摘要: import xmltodict import json import dicttoxml """ XML转化为JSON格式 安装xmltodict pip install xmltodict """ def xmlTojson(): with open('11.xml', 'r', encodin 阅读全文
posted @ 2021-11-25 17:46 167 阅读(951) 评论(0) 推荐(0)
摘要: (1)阿里云 http://mirrors.aliyun.com/pypi/simple/ (2)豆瓣 http://pypi.douban.com/simple/ (3)清华大学 https://pypi.tuna.tsinghua.edu.cn/simple/ (4)中国科学技术大学 http: 阅读全文
posted @ 2021-11-25 17:45 167 阅读(30) 评论(0) 推荐(0)
摘要: import sys # 实现从程序外部向程序传递参数。 # print(sys.argv) # 程序中间的退出,arg=0为正常退出。 # print(sys.exit(['0'])) # 获取系统当前编码,一般默认为ascii。 print(sys.getdefaultencoding()) # 阅读全文
posted @ 2021-11-25 17:44 167 阅读(86) 评论(0) 推荐(0)
摘要: 一、安装 AES加密方式有五种:ECB, CBC, CTR, CFB, OFB 从安全性角度推荐CBC加密方法,本文介绍了CBC,ECB两种加密方法的python实现 python 在 Windows下使用AES时要安装的是pycryptodome 模块 pip install pycryptodo 阅读全文
posted @ 2021-11-25 17:37 167 阅读(524) 评论(0) 推荐(0)