Catrong / phi-plugin

适用于 Yunzai-Bot V3 的 phigros 辅助插件,支持查询分数信息等功能,以及猜曲目等小游戏
95 stars 10 forks source link

[Enhancement] 接入taptap實現一鍵登錄 #130

Closed yt6983138 closed 3 weeks ago

yt6983138 commented 4 months ago

見標題, 想請問作者有沒有打算接入taptap api來達成一鍵登錄(找token對小白不友好), 最近研究出來如何接入taptap api 了, 奈何不會寫js, 沒辦法開pull request(

具體的實現在這裏, 語言是c#, 大概流程:

  1. 獲取QRCode
  2. 等待用戶登入, 在這期間需要每隔幾秒發送請求直到用戶登入完畢
  3. 獲取登入資料以及用戶profile
  4. 在phigros 的lc 服務器登入
  5. 拿到token 后同/bind指令後續
KeluIsAfkeru commented 4 months ago

这个方式好像大陆地区内无法使用?) image f2846583bc711f6b12c36a87b9f8353a

yt6983138 commented 4 months ago

这个方式好像大陆地区内无法使用?)

我測試是可以欸, 我用大陸的注冊, 在 RequestLoginQrCode()那一行, 有一個可選parameter useChinaEndpoint 設爲true 則使用大陸的api登入

KeluIsAfkeru commented 4 months ago

这个方式好像大陆地区内无法使用?)

我測試是可以欸, 我用大陸的注冊, 在 RequestLoginQrCode()那一行, 有一個可選parameter useChinaEndpoint 設爲true 則使用大陸的api登入

好的谢谢你,我去试试qwq

yt6983138 commented 4 months ago

順帶一提, 有些method也會有useChinaEndpoint這個parameter, 要注意一下

KeluIsAfkeru commented 4 months ago

順帶一提, 有些method也會有useChinaEndpoint這個parameter, 要注意一下

成功了,很棒很有意义,现在就算是小白也能轻松无障碍拿到token啦,期待作者早日适配 image

Dnyo666 commented 2 months ago

废酱可能高考完了得等一段时间弄这个吧

yt6983138 commented 2 months ago

順帶一提哈 部分api有更新 useChinaEndpoint已經全部移除

yt6983138 commented 1 month ago

目前我想到的方法(不手動翻譯的情況下)是將我的庫編譯成wasm文件然後在node js裡invoke, 但是得再研究研究

Catrong commented 3 weeks ago

已实现,感谢!