https://github.com/jdneo/vscode-leetcode/issues/478
https://github.com/jdneo/vscode-leetcode/issues/478#issuecomment-564757098
Spent an hour and figured it out. Here are the step by step instructions by people newbie like me.
Make sure Node.js 8+ is installed. Instructions can be found on the official page
Install leetcode-cli from OS terminal or the terminal within vscode. Installation guide. Note the "From Github" section links to an older version.
# to remove the old version
npm uninstall -g leetcode-cli
# to install the up-to-date version(2.6.17+)
npm install -g leetcode-tools/leetcode-cli
Type leetcode version
in terminal to make sure you installed version 2.6.17+.
Log into leetcode.com in a browser. In Chrome, right click and select "Inspect". Switch to tab "Network", "XHR". Then click any button on leetcode.com(now should be on the left split screen). Now you should be able to see the cookie as @yihong0618 showed in the pic. Copy the entire cookie string starting from "__cfduid" and ending with "_gat=1"
Type leetcode user -c
from terminal within vscode. Follow the prompt and type in your username and cookie you copied above.
따라해보니깐 위 3번에서 쿠키를 쉽게 발견하려면
leetcode 로그아웃 후 로그인하면 찾기 쉽다.
그리고 러스트로 leetcode cli 만드는 프로젝트도 있던데,
https://leetcode.com/discuss/interview-question/480110/wrote-a-leetcode-cli-in-rust-welcome-to-pr
https://github.com/clearloop/leetcode-cli
현재 cargo 빌드는 깨지는 상태이지만 쿠키 로그인에 대한 설명은 참고할 만하다.
chrome://settings/cookies/detail?site=leetcode.com
|
크롬에서 여기 들어가면 쿠키 정보를 쉽게 볼 수 있다.