twitter-text-python
twitter-text-python copied to clipboard
A pathless url followed by a lot of hyphens will hang the parser indefinitely
Super edge case-y behaviour, but a Tweet that looks like this: http://somesite.com-------------------------------- (which is a valid Tweet), will hang the parser indefinitely or at least for a very long time.
Here's a complete example:
from ttp import ttp
parser = ttp.Parser()
parser.parse('http://somesite.com--------------------------------')
You'll note that it never completes. Smells a lot like catastrophic backtracking.