mdbrnowski / codeforces-toolbox

🧰 Codeforces CLI created to make writing contests more efficient.
MIT License
7 stars 2 forks source link

removed multiple logins #16

Closed rohanailoni closed 2 years ago

rohanailoni commented 2 years ago

In the commited code i have created 2 function load_session and dump_session which is used for loading and dumping the session object in ~/.codeforces-toolbox/session respectively and also created the check time function which will check the SESSION path session last modified time and compare with current time if that exceeds more than one day (codeforces cookies expire in one day if rememeber for a month is not activated while login)then it auto logins again.To remove excess code i have written login in seprate function

Also ran some tests image

please have a look :smile: