先在vs code 安裝套件

image

 

 

打開終端機(ctrl+~)

分別執行以下指令

# 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

 

接著輸入

leetcode user -c

依序輸入 帳號(就是網頁版的帳號) 、cookie

image

cookie取得方法

先登入網頁版按F12 (或對著網頁按右鍵 --> 檢查)

找到cookie,並複製 開頭("__cfduid")到結尾("_gat=1")所有內容  

image

輸入完就完成了。

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

文章標籤
全站熱搜
創作者介紹
創作者 TsouKing 的頭像
TsouKing

TsouKing's Space