Skip to content

The script only sync latest session #48

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
hucancode opened this issue Sep 22, 2023 · 3 comments
Closed

The script only sync latest session #48

hucancode opened this issue Sep 22, 2023 · 3 comments

Comments

@hucancode
Copy link

hucancode commented Sep 22, 2023

Hello, I have 3 sessions in my account, and after running the script. Only the latest session get synced.
By session, I mean Leetcode's session. On the right hand side of the problems page, you can see it
image
Currently I have solved 90 Qs in this session. Previously I have solved 200+ and 400+ in older sessions
image
But only 90 Qs in the latest session get synced.
I have tried switching session, and then copy LEETCODE_SESSION and csrftoken then run the script. But seems like it doesn't work.

[Fri, 22 Sep 2023 03:42:43 GMT] Getting submission from LeetCode, offset 0
[Fri, 22 Sep 2023 03:42:44 GMT] Default branch for hucancode/lc: master
[Fri, 22 Sep 2023 03:42:44 GMT] Syncing 0 submissions...
[Fri, 22 Sep 2023 03:42:44 GMT] Done syncing all submissions.
@hucancode
Copy link
Author

hucancode commented Sep 22, 2023

I think I have found the cause. First time I ran the script, 90 newest problems got synced, the lastTimestamp point to the latest submission. After that all submission that come before that timestamp got ignored.
Work around for this is to sync submissions by chronological order if possible.

(Closed as a duplication of #17)

@Abhiram716
Copy link

I think I have found the cause. First time I ran the script, 90 newest problems got synced, the lastTimestamp point to the latest submission. After that all submission that come before that timestamp got ignored. Work around for this is to sync submissions by chronological order if possible.

(Closed as a duplication of #17)

@hucancode Hey buddy, can allobrate the workaround please, I have 3 sessions in my leetcode too. I didn't understand sync submissions by chronological order if possible

@hucancode
Copy link
Author

hucancode commented Nov 27, 2023

@Abhiram716 hi, let's say you have 2 sessions:

  • Round 1
    • switch leetcode session on the website to session 1
    • make a new branch git branch session-1
    • run the action for branch session-1
  • Round 2
    • switch leetcode session on the website to session 2
    • make a new branch git branch session-2
    • run the action for branch session-2
  • Now you have 2 new branches, each containing all submission for its session. You can repeat if you have more than 2 sessions
  • Merge session-1 and session-2 to your main git branch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants