Skip to content

Commit dd8f2e2

Browse files
Update Cookie tutorial to README.md
Updated README.md file by Tutorial on how to copy Cookie header to /data/cookie.txt and make use of "Show accomplished" feature.
1 parent c529bb2 commit dd8f2e2

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

README.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,34 @@ Leetcode Problem Opener
33
Program that helps you browse and open problems in leetcode.com.
44
Problems are indexed from easiest to hardest with respect to elo rating calulated by @zerotrac in https://github.com/zerotrac/leetcode_problem_rating
55

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+
629
Libraries in use:
730
- pandas
831

932
Methods and libraries included in python:
1033
- tkinter
1134
- webbrowser
1235
- os.getcwd()
36+
- json

0 commit comments

Comments
 (0)