Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Some questions about the code #3

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
aaaahern opened this issue Sep 3, 2016 · 2 comments
Closed

Some questions about the code #3

aaaahern opened this issue Sep 3, 2016 · 2 comments
Labels

Comments

@aaaahern
Copy link

aaaahern commented Sep 3, 2016

Hi, I found this tool on 1point3acres and I'm interested in improving it.

Since leetcode change their URL for problem list, your PROBLEM_URL is not working now. I figured out the new API URL and made some change.

Besides, I have two questions about your implementation:

  1. Why do you need to store the password as plain text in local file? Since we have the session id and other information which can keep login, it that still necessary?
  2. I notice that you cache all the problems in local file including the status of each problem. Once you store it, it will never be updated, include the status.
@aaaahern
Copy link
Author

aaaahern commented Sep 3, 2016

oh I see when you update the cache

@skygragon
Copy link
Owner

Thanks again man! Now the 'list' is fixed to support this new leetcode api. Later will release it out.

As the password thing, in the very beginning I was thinking of supporting auto re-login when the session expired, thus the password is needed. You see leetcode will expire the previous session if new one is created. For example when you login on web page, the cli session will get expired immediately. That's why re-login is needed otherwise 403 forbidden will occur as #2 issue said.

While now I'm more preferring another option that to NOT save password in file for the sake of security, instead we can prompt login again in case of session expired. Please let me your idea about this.

skygragon added a commit that referenced this issue Sep 4, 2016
refs #3

Signed-off-by: Eric Wang <skygragon@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants