1 Star 0 Fork 21

柳州长虹/MingChaoAI

forked from LanRenZhiNeng/MingChaoAI 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
jianchaupdate.py 1.56 KB
一键复制 编辑 原始数据 按行查看 历史
老大哥 提交于 2024-08-13 12:30 . 修复合并异常
import html
import requests
def get_var_data():
try:
headers = {
'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8',
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.0.0 Safari/537.36 Edg/117.0.2045.47"
}
res=requests.get("https://note.youdao.com/yws/api/personal/preview/WEB15a585cfb3af4b2d86513c5133f4ef48?method=convert&shareToken=1653de571028410b28bbcdecd832ddb7&engine=nyozo",headers=headers)
if res.status_code==200:
return html.unescape(res.text).split("<pre>")[-1].split("</pre>")[0].split("\n")[:-1]
else:
return False
except:
print("请不要开梯子")
return False
def get_updatetxt():
try:
headers = {
'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8',
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.0.0 Safari/537.36 Edg/117.0.2045.47"
}
res = requests.get("https://note.youdao.com/yws/api/personal/preview/WEB92747c54218c44bab63937b63572a775?method=convert&shareToken=1855fc5b0693136825d4f6363dc38df1&engine=nyozo",headers=headers)
if res.status_code == 200:
return html.unescape(res.text).split("<pre>")[-1].split("</pre>")[0][:-1]
else:
return ""
except:
print("无法获取更新日志,请不要开梯子!")
return ""
if __name__ == '__main__':
print(get_var_data())
print(get_updatetxt())
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/liuzhou_changhong/ming-chao-ai.git
[email protected]:liuzhou_changhong/ming-chao-ai.git
liuzhou_changhong
ming-chao-ai
MingChaoAI
master

搜索帮助