Lxn-Chan!

(~ ̄▽ ̄)→))* ̄▽ ̄*)o

A站签到API和脚本大概逻辑详解

原理

模拟手机的ua然后进行签到

实现(已失效)

首先登录,获取到必要的token

1
2
3
4
curl 'https://id.app.acfun.cn/rest/app/login/signin' \
-H 'user-agent: acvideo core/6.48.0.1155' \
-H 'deviceType: 1' \
-d 'username=abc&password=abc'

username后面填写用户名/手机号/邮箱,password后面填写密码

返回值如下

1
{"mobile-check":1,"group-level":1,"acPassToken":"aaaaa","mobile":"bbbbb","avatar":"https://imgs.aixifan.com/avatar.jpg","auth_key":authkey,"userid":userid,"first_login":false,"token":"token","check_real":1,"result":0,"acSecurity":"--","check_password":0,"passCheck":true,"username":"username"}

提取其中的acPassTokenauth_keytoken参数,分别填入下面

1
2
3
4
5
curl 'https://api-new.acfunchina.com/rest/app/user/signIn' \
-H 'user-agent: acvideo core/6.48.0.1155' \
-H 'acPlatform: ANDROID_PHONE' \
-H 'Cookie: auth_key=;acPasstoken=' \
-d 'access_token='

返回值应该会有“签到成功,获得x蕉”,即为成功。

也可以把获取token写在脚本里面动态获取,暂不清楚token等其他参数多久换一次,清楚了,移动版的不会过期。

实现(新版)

参照上文获取acPassTokenauth_key两个参数填入下面即可

1
2
3
4
curl 'https://www.acfun.cn/rest/pc-direct/user/signIn' \
-H 'user-agent: AcFun/6.39.0 (iPhone; iOS 14.3; Scale/2.00)' \
-H 'accept: application/json, text/plain, */*' \
-H 'cookie: acPasstoken=; auth_key='

返回类似{"result":0,"msg":"签到已成功,领取x蕉","bananaDelta":x,"host-name":"nodename"}即为成功。

补充

cookie一个月过期。

移动版的cookie(token)不过期。

参考资料

 简单说两句



联系站长 | 服务状态 | 友情链接

备案号:辽ICP备19013963号

萌ICP备 20219421 号

中国互联网违法和不良信息举报中心

架构版本号:8.1.6 | 本站已全面支持IPv6

正在载入运行数据(1/2)请稍后...
正在载入运行数据(2/2)请稍后...

Copyright 2024 LingXuanNing, All rights reserved.