瀏覽代碼

调用人群预估覆盖接口,修改为动态的account_id

liyuyi@c-top.com.cn 4 年之前
父節點
當前提交
5e78acf366
共有 1 個文件被更改,包括 1 次插入2 次删除
  1. 1 2
      BayesCombine.py

+ 1 - 2
BayesCombine.py

@@ -176,7 +176,6 @@ class BayesCombine(object):
             out_dict['sample_size'] = self.sample_size
 
             try:
-                # TODO 调用人群预估覆盖接口,得到该组合的人群覆盖数 修改advertiser_id 的值 为 account_id
                 # 获取该项目下在投的账号
                 get_acc_sql = """select account_id from ctop_user_allocation where project_id = %s and account_status=0 limit 1""" % \
                               self.project_id
@@ -185,7 +184,7 @@ class BayesCombine(object):
                 request_data = {'region': city_code_transform(out_dict.get('city')),
                                 'ages_range': age_code_transform(out_dict.get('age')),
                                 'gender': gender_code_transform(out_dict.get('gender')),
-                                'advertiser_id': 9774238}
+                                'advertiser_id': account_id}
 
                 request = requests.post(url=estimate_people_number_url,
                                         headers=headers,