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.
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.