class documentation
class Twitter(object): (source)
Wrapper class with restricted functionality and fewer options.
Method | __init__ |
Undocumented |
Method | tweets |
Process some Tweets in a simple manner. |
Instance Variable | query |
Undocumented |
Instance Variable | streamer |
Undocumented |
Instance Variable | _oauth |
Undocumented |
def tweets(self, keywords='', follow='', to_screen=True, stream=True, limit=100, date_limit=None, lang='en', repeat=False, gzip_compress=False):
(source)
¶
Process some Tweets in a simple manner.
Note that, in the case of streaming, this is the maximum date, i.e. a date in the future; if not, it is the minimum date, i.e. a date in the past
handle
.
Parameters | |
keywords | Undocumented |
follow | Undocumented |
to | Undocumented |
stream | Undocumented |
limit | Undocumented |
date | Undocumented |
lang | Undocumented |
repeat | Undocumented |
gzip | if True , output files are compressed with gzip. |
str keywords | Keywords to use for searching or filtering |
list follow | UserIDs to use for filtering Tweets from the public stream |
bool to | If True , display the tweet texts on the screen, otherwise print to a file |
bool stream | If True , use the live public stream, otherwise search past public Tweets |
int limit | The number of data items to process in the current round of processing. |
tuple date | The date at which to stop collecting new data. This should be entered as a tuple which can serve as the argument to datetime.datetime . E.g. date_limit=(2015, 4, 1, 12, 40) for 12:30 pm on April 1 2015. |
str lang | language |
bool repeat | A flag to determine whether multiple files should be written. If True , the length of each file will be set by the value of limit . Use only if to_screen is False . See also |