public_talks/2016_02_26_columbia/get_tweets.py
def search_twitter(twitter_session, query, count=100, status='popular'):
    """Submit query to Twitter API via twitter package."""

    status_options = ['mixed', 'recent', 'popular']
    assert status in status_options, "'status' must be in {}.".format(status_options)

    query = twitter_session.search.tweets(q=query,
                                          lang='en',
                                          result=status,
                                          count=count,
                                          retry=True)

    return query
Submit query to Twitter API via twitter package.
Submit query to Twitter API via twitter package.
Submit query to Twitter API via twitter package .
def search_twitter(twitter_session, query, count=100, status='popular'):
    status_options = ['mixed', 'recent', 'popular']
    assert status in status_options, "'status' must be in {}.".format(status_options)
    query = twitter_session.search.tweets(q=query,
                                          lang='en',
                                          result=status,
                                          count=count,
                                          retry=True)
    return query
def search_twitter ( twitter_session , query , count = 100 , status = 'popular' ) : status_options = [ 'mixed' , 'recent' , 'popular' ] assert status in status_options , "'status' must be in {}." . format ( status_options ) query = twitter_session . search . tweets ( q = query , lang = 'en' , result = status , count = count , retry = True ) return query
Submit query to Twitter API via twitter package.
Submit query to Twitter API via twitter package .
"""Submit query to Twitter API via twitter package."""
twitter_session
query
count
status