Skip to content

Commit 978439e

Browse files
committed
Update readme
1 parent a01df21 commit 978439e

File tree

1 file changed

+23
-21
lines changed

1 file changed

+23
-21
lines changed

README.md

Lines changed: 23 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,23 @@ Solve LeetCode problems in Vim!
66

77
This Vim plugin is inspired by [skygragon/leetcode-cli][leetcode-cli].
88

9-
**Important Update! Please setup keyring for password safety:**
9+
**Attention:** Recently LeetCode used Google reCAPTCHA to enhance security,
10+
prohibiting automatic login through LeetCode API.
1011

11-
1. Install keyring with `pip3 install keyring --user`
12-
2. Remove `g:leetcode_password` from your configuration.
13-
3. The first time you sign in, **leetcode.vim** will prompt for the password
14-
and store it in keyring.
12+
The new login procedure needs you to **login in your browser first** so that
13+
**leetcode.vim** can read the LeetCode session cookie from the browser's cookie
14+
storage.
15+
16+
Supported browsers are: **Chrome**, **Firefox**. Safari is not supported
17+
yet.
18+
19+
The one-time setup:
20+
21+
1. Install keyring and browser-cookie3:
22+
```shell
23+
pip3 install keyring browser-cookie3 --user
24+
```
25+
2. Set `g:leetcode_browser` to `'chrome'` or `'firefox'`.
1526

1627
## Installation
1728

@@ -20,9 +31,9 @@ for Neovim:
2031
```sh
2132
pip3 install pynvim --user
2233
```
23-
2. Install **keyring**:
34+
2. Install **keyring** and **browser-cookie3**:
2435
```sh
25-
pip3 install keyring --user
36+
pip3 install keyring browser-cookie3 --user
2637
```
2738
3. Install the plugin:
2839
```vim
@@ -65,26 +76,17 @@ Values: `'cpp'`, `'java'`, `'python'`, `'python3'`, `'csharp'`, `'javascript'`,
6576

6677
Default value is `'cpp'`.
6778

68-
### `g:leetcode_username`
69-
70-
Set to the LeetCode username or email for auto login.
71-
72-
Default value is `''`.
73-
74-
### `g:leetcode_password`
75-
76-
**Deprecated in favor of keyring.** Set to the LeetCode password for auto login.
79+
### `g:leetcode_browser`
7780

78-
If you have installed keyring, then just leave this option blank.
79-
**leetcode.vim** will prompt for the password the first time you sign in, and
80-
store the password in keyring.
81+
Set to the browser that stores the LeetCode session cookie.
8182

82-
**WARNING: the password is stored in plain text.**
83+
Values: `'disabled'`, `'chrome'`, `'firefox'`
8384

84-
Default value is `''`.
85+
Default value is `'disabled'`.
8586

8687
## Updates
8788

89+
- 2019/12/20: Fix the login issue caused by reCAPTCHA.
8890
- 2019/08/01: Support custom test input
8991
- 2019/07/28: Support showing frequencies and sorting by columns
9092
- 2019/07/27:

0 commit comments

Comments
 (0)