Beispiel #1
0
def get_interaction_from_crawl(tweet, args):

    user = User(tweet["username"])
    user.set_tweets([tweet])
    get_info_user(user, args)
    retrieve_tweet_actors(user, args)
    elastic.store_user(user.user_info)
    elastic.store_interactions(user.interactions)
Beispiel #2
0
def retrieve_tweet_actors(user, args):
    tweet_users = user.extract_tweet_interaction()
    i = 1
    for tweet_user in tweet_users:
        tweet_user = User(tweet_user)
        get_info_user(tweet_user, args)
        user.add_actor_info(tweet_user.user_info)
        print("Processed", i, "/", len(tweet_users), "tweet actors")
        i += 1
Beispiel #3
0
def get_info_from_user(username, args):
    reset_data()
    user = User(username)

    get_info_user(user, args)
    elastic.store_crawled(user.user_info)
    elastic.store_user(user.user_info)

    get_user_interaction(args, user)
Beispiel #4
0
def get_following_user(user, args):
    config = init_follow_retrieval(user, args)
    twint.run.Following(config)
    i = 1
    limit = config.Limit
    for username in twint.output.follows_list:
        following = User(username)
        get_info_user(following, args)
        user.set_follow(following.user_info, user.user_info.id,
                        following.user_info.id)
        print("Processed", i, "/", limit, "following")
        i += 1