y1ndan / genshinhelper2

A Python library for miHoYo bbs and HoYoLAB Community. genshin 原神签到小助手 树脂提醒 微博超话 米游社米游币 崩坏3
https://www.yindan.me
GNU General Public License v3.0
534 stars 238 forks source link

国际服今天签到失败 #70

Closed TheCGDF closed 1 year ago

TheCGDF commented 1 year ago

Telegram bot的报错:

Genshin Impact Helper ✔️ 0 · ✖️ 1

🏆 HoYoLAB Community
☁️ ✔️ 0 · ✖️ 1
🌈 No.1:
    HTTPSConnectionPool(host='hk4e-api-os.mihoyo.com', port=443): Max retries exceeded with url: /event/sol/info?lang=en-us&act_id=e202102251931481 (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7f5c82fa40a0>: Failed to establish a new connection: [Errno -2] Name or service not known'))

很奇怪国际服的域名怎么会是*.mihoyo.com,于是自己去hoyolab抓了下包

image

发现应该是*.hoyolab.com,不知为何(还没看代码)脚本访问的是*.mihoyo.com

y1ndan commented 1 year ago

之前的前端页面是 https://webstatic-sea.mihoyo.com/ys/event/signin-sea/index.html 来着,目前是跳转到 https://act.hoyolab.com/ys/event/signin-sea-v3/index.html

TheCGDF commented 1 year ago

之前的前端页面是 https://webstatic-sea.mihoyo.com/ys/event/signin-sea/index.html 来着,目前是跳转到 https://act.hoyolab.com/ys/event/signin-sea-v3/index.html

这个url是硬编码的吗?应该需要更新code才能继续签到?

y1ndan commented 1 year ago

还没时间看 如果接口变了需要更新的

hoey94 commented 1 year ago

现在电脑端的chrome 登录米游社貌似拿不到cookie了,document.cookie显示没有token _MHYUUID=3cefdccc-7806-42dd-8fc4-771b4fdf6469; _ga=GA1.1.1976349678.1670380058; UM_distinctid=184ea6911af93c-080ce8f9ffef2d-18525635-13c680-184ea6911b0fa7; _MHYUUID=3cefdccc-7806-42dd-8fc4-771b4fdf6469; DEVICEFP_SEED_ID=f514ca4ca30602dc; DEVICEFP_SEED_TIME=1670380065797; DEVICEFP=38d7ec44a926c; CNZZDATA1275023096=1158294587-1670377491-https%253A%252F%252Fwww.miyoushe.com%252F%7C1670487023; _ga_KS4J8TXSHQ=GS1.1.1670487181.5.1.1670488425.0.0.0; LOGIN_PLATFORM_SWITCH_STATUS={%22bll8iq97cem8%22:{%22sms_login_tab%22:true%2C%22pwd_login_tab%22:true%2C%22password_reset_entry%22:true}}

TheCGDF commented 1 year ago

https://github.com/y1ndan/genshinhelper2/pull/71