ta.TwitterDB.set_bot_flag_based_on_arr

TwitterDB.set_bot_flag_based_on_arr(bots_list_id_str, inc=10000)[source]

Method to update MongoDb collection with a flag identifieng is a user is a bot or not. It updates the records based on a given list of user_ids.

Parameters
  • bots_list_id_str – and array with a list of Twitter user ids that are bots

  • inc ((Optional)) – how many tweets we want to update at the time for field is_bot_connection. Default=10000 (High number might take too long to run)

Examples

>>> arr_bots = ['123456', '1231654']
>>> set_bot_flag_based_on_arr(arr_bots, 20000)