File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -3,10 +3,34 @@ Leetcode Problem Opener
3
3
Program that helps you browse and open problems in leetcode.com.
4
4
Problems are indexed from easiest to hardest with respect to elo rating calulated by @zerotrac in https://github.com/zerotrac/leetcode_problem_rating
5
5
6
+ To use "Show accomplished" feature, paste your cookie header to /data/cookie.txt.
7
+ Tutorial:
8
+ 1 ) Go to https://leetcode.com/api/problems/algorithms/ while being logged in.
9
+ 2 ) Click combination of: "Ctrl + Shift + C" (works for both Opera and Chrome),
10
+ or right click anywhere on the text filled page and choose "Inspect element".
11
+ 3 ) Go to "Network" tab.
12
+ 4 ) Reload the page (e.g. by clicking F5).
13
+ 5 ) You will see number (for me is 3) of requests call made to API, left click on "algorithms/"
14
+ 6 ) Go to "Headers" tab.
15
+ 7 ) Look for "Request Headers".
16
+ 8 ) Copy contents of "Cookie" under "Request Headers" to /data/cookie.txt.
17
+ !!! Be extra mindful of the trailing endline while copying - remove it. !!!
18
+ Your cookie should look something like (mine look like this):
19
+ "_ gcl_au=<some_numbers>
20
+ _ ga_ (...)=(...)
21
+ _ ga_ (...)=(...)
22
+ (...)"
23
+ legend: (...) - any amount of characters
24
+ 9 ) Run "api_leet.py" after copying your cookie to "/data/cookie.txt".
25
+
26
+ In future commits I will explore possibility to scrap it out without making this call to API (I have idea).
27
+
28
+
6
29
Libraries in use:
7
30
- pandas
8
31
9
32
Methods and libraries included in python:
10
33
- tkinter
11
34
- webbrowser
12
35
- os.getcwd()
36
+ - json
You can’t perform that action at this time.
0 commit comments