liqian 3 years ago
parent
commit
8aa895b7a6
1 changed files with 5 additions and 5 deletions
  1. 5 5
      video_recall.py

+ 5 - 5
video_recall.py

@@ -391,12 +391,12 @@ class PoolRecall(object):
                 log_.info('=== item === {}'.format(item))
                 video_id = int(item['videoId'])
                 # 判断 视频推荐区域与用户地址信息 是否匹配,市级别
-                video_area_list = item['area'].split(',')
-                if self.client_info.get('city') in video_area_list or config_.ALL_AREA_CODE in video_area_list:
-                    log_.info('===2=== {}, ===3=== video_id: {}, area: {}'.format(
-                        self.client_info.get('city'), video_id, video_area_list))
+                city_code_list = item['cityCode'].split(',')
+                if self.client_info.get('cityCode') in city_code_list or config_.ALL_AREA_CODE in city_code_list:
+                    log_.info('===2=== {}, ===3=== video_id: {}, cityCode: {}'.format(
+                        self.client_info.get('cityCode'), video_id, city_code_list))
                     video_ids.append(video_id)
-                    video_info[video_id] = {'score': item['score'], 'area': video_area_list}
+                    video_info[video_id] = {'score': item['score'], 'cityCode': city_code_list}
 
             # 过滤
             filter_ = FilterVideos(app_type=self.app_type, video_ids=video_ids, mid=self.mid, uid=self.uid)