示例#1
0
def tweet_by_pid(paras):
    """Crawling tweets by API search?place:
    """
    statuses = twitter_api.wrapped_search(q='place:' + paras[0], \
                        since_id=paras[1], \
                        rpp=100)
    logging.info('{0} tweets has been retrieved from place {1}'.\
            format(len(statuses), paras[0]))
    return {'list': statuses}
示例#2
0
def tweet_by_pid(paras):
    """Crawling tweets by API search?place:
    """
    statuses = twitter_api.wrapped_search(q='place:' + paras[0], \
                        since_id=paras[1], \
                        rpp=100)
    logging.info('{0} tweets has been retrieved from place {1}'.\
            format(len(statuses), paras[0]))
    return {'list': statuses}
示例#3
0
def tweet_by_geocode(paras):
    """Crawling tweets by API search?geocode=
    """
    statuses = twitter_api.wrapped_search(geocode=paras[0], \
                        since_id=paras[1], \
                        rpp=100, \
                        q='')
    logging.info('{0} tweets collected from geocode={1}'.\
            format(len(statuses), paras[0]))
    return {'list': statuses}
示例#4
0
def tweet_by_geocode(paras):
    """Crawling tweets by API search?geocode=
    """
    statuses = twitter_api.wrapped_search(geocode=paras[0], \
                        since_id=paras[1], \
                        rpp=100, \
                        q='')
    logging.info('{0} tweets collected from geocode={1}'.\
            format(len(statuses), paras[0]))
    return {'list': statuses}