-
Notifications
You must be signed in to change notification settings - Fork 79
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
Can't get session when use windows subsystem(wsl2.0) #88
Comments
Were you able to get it up and running? I've tried the follwing with WSL2 Ubuntu 20.04.2 LTS: Emacs 27.2 (doom-emacs) (FAIL)
Windows 10 ver 20H2: Emacs27.2 (vanilla) (FAIL)
"Ubuntu 21.04" (In VirtualBox) : Emacs 27.1 (doom-emacs)
|
Upgrade Python to 3.9 on
Any pointers are welcome. |
Try to override the function and looked at the cookies manually from your browser. (defun leetcode--login ()
(leetcode--loading-mode t)
;; (ignore-errors (url-cookie-delete-cookies leetcode--domain))
;; (leetcode--csrf-token) ;knock knock, whisper me the mysterious information
;; (let* ((my-cookies (executable-find "my_cookies"))
;; (my-cookies-output (shell-command-to-string my-cookies))
;; (cookies-list (seq-filter
;; (lambda (s) (not (string-empty-p s)))
;; (split-string my-cookies-output "\n")))
;; (cookies-pairs (seq-map
;; (lambda (s) (split-string s))
;; cookies-list))
;; (leetcode-session (cadr (assoc "LEETCODE_SESSION" cookies-pairs)))
;; (leetcode-csrftoken (cadr (assoc "csrftoken" cookies-pairs))))
;; ;; (leetcode--debug "login session: %s" leetcode-session)
;; ;; (leetcode--debug "login csrftoken: %s" leetcode-csrftoken)
;; ;; (url-cookie-store "LEETCODE_SESSION" leetcode-session nil leetcode--domain "/" t)
;; ;; (url-cookie-store "csrftoken" leetcode-csrftoken nil leetcode--domain "/" t)
;; )
(url-cookie-store "LEETCODE_SESSION" (read-string "Cookie for LEETCODE_SESSION:") nil leetcode--domain "/" t)
(url-cookie-store "csrftoken" (read-string "Cookie for csrftoken:") nil leetcode--domain "/" t)
(leetcode--loading-mode -1)) |
I had the same problem on NixOS; even manually creating a Nix package for my_cookies so I could install it, my_cookies still didn't work. So I used the override code in the @tongjie-chen 's comment above. |
when execute
my_cookies
on wsl get below logget cookie from Chrome failed
get cookie from Firefox failed
Maybe we can add interactive func like 'leetcode-seesion' update session manually.
The text was updated successfully, but these errors were encountered: