Skip to content

[autofix] douban/whoami: AUTH_REQUIRED #2235

Description

@44fun

@

Summary

OpenCLI autofix repaired this adapter locally, and the retry passed.

Adapter

  • Site: douban
  • Command: whoami
  • OpenCLI version: 1.8.5

Original failure

  • Error code: AUTH_REQUIRED
Douban user_id parse failed: href=https://accounts.douban.com/passport/setting/

Local fix summary

豆瓣改版后,顶部导航 .bn-more 链接的 href 从 /people/<uid>/ 改成了
/passport/setting/(账号设置页),verifyDoubanIdentity 因此解析不到 user_id,
把已登录状态误报为 AUTH_REQUIRED(用户 cookie 实际有效,页面显示已登录)。

修复方案:不再依赖 .bn-more 的 href,改为访问 /mine/(该地址 302 跳转到
https://www.douban.com/people/<uid>/),从最终 URL 提取 user_id;
同时保留导航 href 解析和 dbcl2 cookie(格式 uid:xxxx)作为回退来源。
修复后 opencli douban whoami 正常返回 user_id 和 name。

Issue filed by OpenCLI autofix after a verified local repair.
@

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions