#quit() #### Process Facebook comments and tweets for one company. # company_id = 48 # new_dir = os.path.abspath(d_exporter.file_paths['output_dir'] + '/sel_com') # d_exporter.change_output_dir(new_dir) # # for (n_price_type, n_delay, n_boundary) in params_combinations: # print("===Company %d: %s, %s, %s===") % (company_id, n_price_type, str(n_delay), str(n_boundary)) # #d_exporter.process_documents_for_company('tweet', company_id, from_date, n_delay, n_price_type, n_boundary, False) # print(d_exporter.process_documents_for_company('fb_comment', company_id, from_date, n_delay, n_price_type, n_boundary, False)) #### Process Facebook comments and tweets for multiple companies. # Define companies comp_ids_tw = [44, 202, 233, 300, 193, 58] nonsearch_cids = [48, 217, 458, 479] total_tw_ids = comp_ids_tw + nonsearch_cids # Dates from_date = datetime(2015, 8, 2).date() to_date = datetime(2016, 4, 2).date() # Set correct output directory. # new_dir = os.path.abspath(d_exporter.file_paths['output_dir'] + '/fb_comment') # d_exporter.change_output_dir(new_dir) # Process all parameters and companies. for (n_price_type, n_delay, n_boundary) in params_combinations: print("===%s, %s, %s===") % (n_price_type, str(n_delay), str(n_boundary)) d_exporter.process_documents_for_selected_companies( total_tw_ids, 'tweet', from_date, to_date, n_delay, n_price_type, n_boundary, False, 1000000, False, nonsearch_cids) # d_exporter.process_companies_by_source('all-fb-40pd', 'fb_comment', from_date, to_date, n_delay, n_price_type, # n_boundary, False, 1000000)