Skip to content
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

Truncation of comment body and changes to matching of comic numbers #26

Closed
wants to merge 1 commit into from
Closed

Truncation of comment body and changes to matching of comic numbers #26

wants to merge 1 commit into from

Conversation

stefanosporiazis
Copy link
Contributor

@stefanosporiazis stefanosporiazis commented Apr 20, 2020

As discussed in #1, the bot should only handle up to a certain amount of characters to prevent any kind of overload.

Also, since as of today the number of xkcd comics is less than 2500, the regex shouldn't match any ridiculously large numbers as that could cause issues for no reason.

So in order to address these two issues, I truncated the body's length to 5000 and I changed the regex so it will only match numbers up to 6 digits long. Which should be more than enough and it's also a fairly small number for Python to handle.

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.

1 participant