登录失败(报错信息)
Failed to log in with a leetcode.com account
✔ solution.discuss 2019.02.03 Plugin to fetch most voted solution in discussions.
✔ company 2017.12.18 Plugin to query by company for free user.
✔ cache default Plugin to provide local cache.
✔ retry default Plugin to retry last failed request if autologin.enable is on.
✘ leetcode.cn 2018.11.25 Plugin to talk with leetcode-cn APIs.
✔ leetcode default Plugin to talk with leetcode APIs.
[ERROR] You are not login yet?
login: pass: [ERROR] Login failed. Please make sure the credential is correct.
login: pass: [ERROR] Login failed. Please make sure the credential is correct.
login: pass: [ERROR] Login failed. Please make sure the credential is correct.
环境
system: Windows 10
leetcode version: 2.6.22
node version: v10.15.3
安装leetcode-cli
如果你没有按照leetcode-cli或者其版本低于2.6.17,则需要重新装高版本的leetcode-cli。操作如下示:
删除旧的leetcode-cli
npm uninstall -g leetcode-cli
安装leetcode-cli
npm install -g leetcode-tools/leetcode-cli
查看leetcode-cli版本
leetcode version
获取cookie
用你的账号在浏览器上登录leetcode.com网站 > 按F12 > 选择network > F5 刷新网页 > 找到graphql这个文件 > 点击后查看 Headers > 下滑找到cookie字段 > 复制cookie: 后的字符(不要 把 cookie:
也带上了)
选择US或者CN版
选择Cookie登录。输入用户名和复制的cookie后即可登录成功。