一个原神尘歌壶工具,通过洞天摹数获取摆件列表和相关信息,保存到 Excel。
-
获取cookie的方法很多,这里推荐直接从胡桃工具箱复制,这也是我最常用的工具,是一个 Windows 平台的开源的原神工具箱。
Excel 的布局和取色参考了这位大佬的赠礼套装工具表,用法大致相同。
-
本项目开源,您的数据全部保存在本地,不存在主动泄露的风险。
-
首次运行后会得到另外两个文件,config.ini 是程序的配置文件,明文保存您的cookie信息;17286543532.xlsx 是以洞天摹数命名的 Excel 文件。
-
摆设的默认排序规则是先根据星级升序、再根据所需数量升序、最后根据ID升序。
程序流程比较简单,甚至不需要画图。先从配置文件获取 cookie,若无则提示用户输入并保存到配置文件;用户输入需要获取的洞天摹数;构造get请求,若 cookie 失效则重复第一步;解析json数据;将数据填入 Excel 并设置格式;程序结束。
整个程序关键的只有构造请求这一步,经过测试,接口信息可能如下。
URL: https://api-takumi.mihoyo.com/event/e20200928calculate/v1/furniture/blueprint
key | value | 说明 |
---|---|---|
region | cn_gf01 | 可能是服务器 |
share_code | 10或11位数字 | 洞天摹数 |
cookie_token 和 account_id,经测试只需要这两个cookie对应,但需要注意 cookie_token 的过期时间。