Leetcode Problem Opener
Program that helps you browse and open problems in leetcode.com. Problems are indexed from easiest to hardest with respect to elo rating calulated by @zerotrac in https://github.com/zerotrac/leetcode_problem_rating
To use "Show accomplished" feature, paste your cookie header to /data/cookie.txt. Tutorial:
- Go to https://leetcode.com/api/problems/algorithms/ while being logged in.
- Click combination of: "Ctrl + Shift + C" (works for both Opera and Chrome), or right click anywhere on the text filled page and choose "Inspect element".
- Go to "Network" tab.
- Reload the page (e.g. by clicking F5).
- You will see number (for me is 3) of requests call made to API, left click on "algorithms/"
- Go to "Headers" tab.
- Look for "Request Headers".
- Copy contents of "Cookie" under "Request Headers" to /data/cookie.txt.
!!! Be extra mindful of the trailing endline while copying - remove it. !!!
Your cookie should look something like (mine look like this):
"_gcl_au=<some_numbers>
ga(...)=(...)
ga(...)=(...)
(...)"
legend: (...) - any amount of characters - Run "api_leet.py" after copying your cookie to "/data/cookie.txt".
In future commits I will explore possibility to scrap it out without making this call to API (I have idea).
Libraries in use:
- pandas
Methods and libraries included in python:
- tkinter
- webbrowser
- os.getcwd()
- json