随笔分类 - python
随手写的python
摘要:利用websocket调用浏览器中的方法 js client //连接websocket服务端 var ws = new WebSocket('ws://localhost:8000/ws'); //连接成功时执行 ws.onopen = function () { console.log('bro
阅读全文
摘要:##启动 mitmdump -s http_proxy.py -p 9000 替换js代码 # -*- coding: utf-8 -*- import re main_url = 'http://match.yuanrenxue.com/match/9' # 9 js_url = 'http://
阅读全文
摘要:user_agent_list = [ "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; AcooBrowser; .NET CLR 1.1.4322; .NET CLR 2.0.50727)", "Mozilla/4.0 (compa
阅读全文
摘要:# -*- coding: UTF-8 -*- from Crypto.Util.Padding import pad from Crypto.Cipher import AES import base64 def aes_cipher(encrypt_key, plain): aes = AES.
阅读全文
摘要:代码如下: # -*- coding: utf-8 -*- import requests import re import os import base64 from Crypto.Cipher import AES from Crypto.Util.Padding import pad, unp
阅读全文
摘要:目的:将数据追加进excel def writeExcel(list, save_path,excel_header,excel_sheet_name): """ write to excel 需要导入的库: from openpyxl import Workbook from openpyxl i
阅读全文
摘要:def downloadFile(url, filepath): """ 下载文件并保存 :param url: :param filepath: :return: """ # 获取文件后缀 # file_extension = os.path.splitext(url)[1] # 判断文件是否存在
阅读全文
摘要:word ==> pdf def doc2pdf(file_path): """ word格式转换doc|docx ==> pdf :return: """ file_name, file_extension = os.path.splitext(file_path) # 获取文件名、文件扩展名 f
阅读全文

浙公网安备 33010602011771号