Want a perl or python script written that will crawl twitter for phrases as specified in an input file
./[url removed, login to view] [url removed, login to view] would take the search terms in [url removed, login to view], search Twitter for all results, then display them both on screen and in a file if the -o parameter is passed. so ./[url removed, login to view] [url removed, login to view] -o [url removed, login to view] would crawl twitter for all the phrases in [url removed, login to view] and output them to the file [url removed, login to view]
Format of input file would be basic boolean operators
"" (search for exact phrase)
If a search term is enclosed in square brackets , that phrase is optional. So the line:
my [new] house
would search twitter for both "my house" and "my new house"
So an input file could look like:
(my|our|their) [new] house
arrive[d] (so|very|really) (late|delayed)
this is (my|the|our) "best solution ever"
Output must show the poster's twitter handle, name, geolocation if possible, tweet url beside each found tweet, with each field separated by a | or comma.
The script must connect to Twitter via the API, not crawl Twitter unauthenticated. API key will be contained in the variable twitterApi.
Re: operators, forgot to include & as an AND operator.
Also output file could contain
"we( " "|'re| are) & ([almost] (there OR here))
Also allow for escaped chars.
For example \& would search for the & char instead of interpreting it as an AND)