4 ms·
This sounds interesting, but it also sounds like something that requires the full firehose of all tweets unless Twitter's API lets you filter based on regexes.
by fencepost 10y ago
This sounds interesting, but it also sounds like something that requires the full firehose of all tweets unless Twitter's API lets you filter based on regexes. Does Twitter let you get that without some kind of paid plan? Particularly now as they try desperately to find a way to remain viable.
Edit: Looking at the options, you could put together a list of a few strings that would match (almost?) any IP address without too many false positives - just getting all 100 combinations of digit.digit would do the trick, and you could do better filtering once you had that smaller stream. The API limit is 400 strings.
- jameshart 10y agoHow about all 256 (valid in an IPv4 address) combinations of \.\d\d\d\.?
- fencepost 10y agoI thought about that, but the docs don't mention anything about regexes and you may end up with some edge cases with leading 0s in each section. That would leave you with 256+100+20 (256 non-padded, 100 2-digit numbers with leading 0, 10 digits with leading 0, 10 digits with 2 leading 0) which would fit. My immediate thought was that you'd catch a lot of invalid numbers as well, but simply having the "." prefix and suffix would mean you'd catch all possible middle octets which would do the trick while missing most of the phone number collision space (some people separate phone #s wtih ., but most of those probably don't start with 0-2).
- transitorykris 10y agoClever! One class of tweets this misses are the paranoid styles of security researchers wrapping .'s in IPs like (.) and [.] IPv6 is also tricky