joshcai / leetcode-sync

GitHub Action for syncing LeetCode submissions to GitHub
293 stars 59 forks source link

The script only sync latest session #48

Closed hucancode closed 11 months ago

hucancode commented 11 months ago

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 commented 11 months ago

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 https://github.com/joshcai/leetcode-sync/issues/17)

Abhiram716 commented 9 months ago

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 commented 9 months ago

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