import time import random import json from Day1.tuozhan_all import post def md5_my(need_str): import hashlib # 创建md5对象 md5_o = hashlib.md5() # 需要有bytes, 作为参数 # 由str, 转换成 bytes encode-------str.encode('utf-8') # 由bytes转换成 str, decode---------bytes.decode('utf-8') sign_bytes = need_str.encode('utf-8') print(type(sign_bytes)) # 更新md5 object的值 md5_o.update(sign_bytes) sign_str = md5_o.hexdigest() return sign_str # url def translate(kw): url = 'http://fanyi.youdao.com/translate_o?smartresult=dict&smartresult=rule' headers = { 'Accept': 'application/json, text/javascript, */*; q=0.01', #'Accept-Encoding': 'gzip, deflate', 'Accept-Language': 'zh-CN,zh;q=0.9,en;q=0.8', 'Connection': 'keep-alive', #'Content-Length': '223', 'C
有道翻译 "salt" 加密方式破解爬取
最新推荐文章于 2024-06-25 10:47:04 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)