Skip to content

Fix crawler crash when UserID cookie is missing#26

Open
Jisevind wants to merge 2 commits into
FLZ101:masterfrom
Jisevind:fix/bug-fixes
Open

Fix crawler crash when UserID cookie is missing#26
Jisevind wants to merge 2 commits into
FLZ101:masterfrom
Jisevind:fix/bug-fixes

Conversation

@Jisevind
Copy link
Copy Markdown

This PR fixes a crash in the crawler when the UserID cookie is missing.
Instead of throwing an exception, the crawler now safely ignores the
missing value and continues execution.

Also includes filename sanitization to avoid invalid characters.

Tested locally.

Add _sanitize_filename function to replace invalid filename characters with underscores when gathering assets. This prevents filesystem errors when downloading files with names containing special characters like <, >, :, ", /, \, |, ?, or *.
…ception

The UserID check was causing failures when cookies didn't contain the UID, but this value appears to be unused in the crawling process. Changed to log a warning instead of raising an exception to allow crawling to continue.
@FLZ101
Copy link
Copy Markdown
Owner

FLZ101 commented Jan 6, 2026

Thanks. I may have time to test it this week.

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