Python script does not allow you to enter additional commands after logging in
zhiyi-zhang-duke opened this issue · 4 comments
Hi Huzecong,
After installing everything and logging in, I do not see a way for the script to relinquish control or allow for more commands to be run.
Below is the command line when I login:
C:\Leetcode\leetcode-contest-helper>python main.py login Logging in using account ''. Please enter your password in the browser window. DevTools listening on ws://127.0.0.1:12822/devtools/browser/672808a5-07f3-4c19-8a88-1a9eb7014c0c [30572:42480:0215/212149.426:ERROR:device_event_log_impl.cc(211)] [21:21:49.425] USB: usb_device_handle_win.cc:1049 Failed to read descriptor from node connection: A device attached to the system is not functioning. (0x1F) [30572:42480:0215/212149.430:ERROR:device_event_log_impl.cc(211)] [21:21:49.430] USB: usb_device_handle_win.cc:1049 Failed to read descriptor from node connection: A device attached to the system is not functioning. (0x1F) [30572:42480:0215/212149.436:ERROR:device_event_log_impl.cc(211)] [21:21:49.436] Bluetooth: bluetooth_adapter_winrt.cc:1072 Getting Default Adapter failed.
Hi, thanks for filing an issue! Unfortunately I can't figure out what problem you were having from your description. Could you answer the following questions?
- It seems that you did not enter a username. The login command should be:
where
python main.py login <username>
<username>is replaced with your username on Leetcode. - Did you see a browser window open up after running the command? The output seems to indicate errors, but I'm not sure what's wrong.
- Were you able to successfully login? You can check so by inspecting the
cookiesfolder and see if a new cookie is stored in the folder. - If you have successfully logged in, were you able to run
python main.py get ...commands?
- Sorry forgot to include that output:
C:\Leetcode\leetcode-contest-helper>python main.py login -redacted-
Logging in using account '-redacted-'. Please enter your password in the browser window.
DevTools listening on ws://127.0.0.1:7417/devtools/browser/ca7d96b1-6265-44cd-820e-5a7786c058ac
[21940:23448:0217/000443.883:ERROR:device_event_log_impl.cc(211)] [00:04:43.883] USB: usb_device_handle_win.cc:1049 Failed to read descriptor from node connection: A device attached to the system is not functioning. (0x1F)
[21940:23448:0217/000443.890:ERROR:device_event_log_impl.cc(211)] [00:04:43.890] Bluetooth: bluetooth_adapter_winrt.cc:1072 Getting Default Adapter failed.
2. I did see a browser window open up where I entered my credentials but after logging in, nothing seems to happen
3. Yes, see 2.
4. So that's the problem. I don't see a way to enter the python main.py get command?
The terminal where I ran the main.py login command is still "running". If I open a new terminal, and try with that. It also asks me to login. The chrome window with leetcode is logged in but I'm guessing the get commands needs to come from commandline.
It seems that LeetCode made some changes to its webpage. I've just pushed a new commit that should resolve the problem, could you try it out?
Closing issue due to lack of activity – I'll assume that the issue was addressed.