1 Star 0 Fork 25

yyy/懒人原神AI

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
jianchaupdate.py 1.56 KB
一键复制 编辑 原始数据 按行查看 历史
老大哥 提交于 2024-07-22 21:42 . 1.78开源
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/WEB96c82d6b37c9fd60f8b1d146731080d6?method=convert&shareToken=f3fb8b827c2fbcd651073cf7b55a6b3e&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/WEB9b9f3f25e3921ae407edf8ba9537b847?method=convert&shareToken=8b937504aee5dcb1f8c62678d7fffdad&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())
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Python
1
https://gitee.com/Erlang_YYY/lanren-genshin-impact-ai.git
git@gitee.com:Erlang_YYY/lanren-genshin-impact-ai.git
Erlang_YYY
lanren-genshin-impact-ai
懒人原神AI
master

搜索帮助