bilibili自动签到

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

原理

对着找cookie值填进去就行,也可以@cookie.txt这种

ua随便填,我这找了一个IE的

脚本

# 主站签到
curl 'https://api.bilibili.com/x/web-interface/nav/stat' \
  -H 'authority: api.bilibili.com' \
  -H 'accept: application/json, text/plain, */*' \
  -H 'user-agent: Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; rv:11.0) like Gecko' \
  -H 'origin: https://www.bilibili.com' \
  -H 'referer: https://www.bilibili.com/' \
  -H 'cookie: _uuid=; buvid3=; bfe_id=; fingerprint=; buvid_fp=; buvid_fp_plain=; sid=; DedeUserID=; DedeUserID__ckMd5=; SESSDATA=; bili_jct='

# 直播签到
curl 'https://api.live.bilibili.com/sign/doSign' \
  -H 'authority: api.live.bilibili.com' \
  -H 'accept: application/json, text/plain, */*' \
  -H 'user-agent: Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; rv:11.0) like Gecko' \
  -H 'origin: https://live.bilibili.com' \
  -H 'referer: https://live.bilibili.com/' \
  -H 'cookie: _uuid=; buvid3=; fingerprint=; buvid_fp=; buvid_fp_plain=; sid=; DedeUserID=; DedeUserID__ckMd5=; SESSDATA=; bili_jct=; PVID=; LIVE_BUVID='

# b漫签到
curl -X POST 'https://manga.bilibili.com/twirp/activity.v1.Activity/ClockIn?platform=ios' \
  -H 'accept: application/json, text/plain, */*' \
  -H 'user-agent: Mozilla/5.0 (iPhone; CPU iPhone OS 8_3 like Mac OS X) AppleWebKit/600.1.4 (KHTML, like Gecko) Version/8.0 Mobile/12F70 Safari/600.1.4' \
  -H 'origin: https://live.bilibili.com' \
  -H 'referer: https://live.bilibili.com/' \
  -H 'cookie: _uuid=; buvid3=; fingerprint=; buvid_fp=; buvid_fp_plain=; sid=; DedeUserID=; DedeUserID__ckMd5=; SESSDATA=; bili_jct=; PVID=; LIVE_BUVID='

补充

b站的cookie是一年过期

参考资料

其他说明

本人文章截至2021年5月22日仅在本人博客博客园简书平台发布,其他平台均为未授权发布。

posted @ 2021-07-08 21:05  泠泫凝  阅读(552)  评论(0编辑  收藏  举报