Bläddra i källkod

添加channelType字段

syh 4 år sedan
förälder
incheckning
4fe24dca40
2 ändrade filer med 3 tillägg och 6 borttagningar
  1. 2 5
      ai_time_task_creative_handler.py
  2. 1 1
      utils/CommonFunction.py

+ 2 - 5
ai_time_task_creative_handler.py

@@ -919,11 +919,8 @@ class AiProgramCreativeNewMaterial(tornado.web.RequestHandler):
                 video_list = get_history_video_info(channel_type=channel_type,
                                                     account_id=account_id,
                                                     url=get_history_video_url,
-                                                    start_time=(datetime.datetime.now() + datetime.timedelta(days=-7)).
-                                                    strftime("%Y-%m-%d %H:%M:%S"),
-                                                    end_time=datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S")
-                                                    if test_video_cnt else
-                                                    (datetime.datetime.now() + datetime.timedelta(days=-1)).strftime("%Y-%m-%d %H:%M:%S"),
+                                                    start_time=(datetime.datetime.now() + datetime.timedelta(days=-7)).strftime("%Y-%m-%d %H:%M:%S"),
+                                                    end_time=datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S")if test_video_cnt else(datetime.datetime.now() + datetime.timedelta(days=-1)).strftime("%Y-%m-%d %H:%M:%S"),
                                                     video_cnt=test_video_cnt if test_video_cnt else multi_app_id_programme_new_video_cnt,
                                                     related_creative_max_cnt=related_creative_max_cnt)
 

+ 1 - 1
utils/CommonFunction.py

@@ -138,7 +138,7 @@ def get_top_video_info(channel_type,account_id, cnt, start_time, end_time, url,
     request_data = {"accountId": account_id, "num": cnt, "startTime": start_time, "endTime": end_time}
     if app_version:
         request_data['appVersion'] = app_version
-    if channel_type!=2:
+    if channel_type != 2:
         request_data['channelType'] = channel_type
     try:
         logger.info("getHistoryTopVideoList the request_data is %s" % request_data)