Skip to content

Fix skip-existing infinite loop and add --debug flag - #47

Open
WesleyBlancoYuan wants to merge 1 commit into
Pyreko:mainfrom
WesleyBlancoYuan:main
Open

Fix skip-existing infinite loop and add --debug flag#47
WesleyBlancoYuan wants to merge 1 commit into
Pyreko:mainfrom
WesleyBlancoYuan:main

Conversation

@WesleyBlancoYuan

Copy link
Copy Markdown
Contributor

When using --skip-existing, skipped post URLs were never added to self.seen, causing find_posts() to return the same URL repeatedly and the archiver to stall instead of advancing to new posts.

Also adds a --debug CLI flag that enables detailed logging for post processing, comment collection, tab management, and scroll detection to aid future troubleshooting.

@WesleyBlancoYuan

WesleyBlancoYuan commented Mar 27, 2026

Copy link
Copy Markdown
Contributor Author

Sorry for the urgent commit again(really sorry!), as midnight of 2026.3.28 is approaching (~4h left at the moment when I am writing this), and Kanata membership will end soon.
I am detecting some new errors while new tabs for each post is not opening in WSL. It always work in Mac it seems, but it's broken in WSL 2 + Chrome(with wslg support). Now testing again on WSL 2 it seems fine now. I tried to fix them, this time with help of Copilot.
Also I add a --debug flag to show some debug info.

It is still somehow fragile, but is better than before.

When using --skip-existing, skipped post URLs were never added to
self.seen, causing find_posts() to return the same URL repeatedly
and the archiver to stall instead of advancing to new posts.

Also adds a --debug CLI flag that enables detailed logging for
post processing, comment collection, tab management, and scroll
detection to aid future troubleshooting.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@WesleyBlancoYuan

Copy link
Copy Markdown
Contributor Author

@Pyreko you can separate this to 2 commits or do whatever you want with it. The fix itself is one line, the rest is adding debug flag to everywhere. I am working on a non-usual PC so I cannot do it properly and sorry for that.

@Pyreko

Pyreko commented Apr 5, 2026

Copy link
Copy Markdown
Owner

All good, I'll probably remove the debug stuff as there's a better way of doing it.

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

Successfully merging this pull request may close these issues.

2 participants