|
@@ -699,7 +699,7 @@ class FilterVideos(object):
|
|
|
|
|
|
|
|
|
|
|
|
- def filter_videos_status(self, pool_type='rov', region_code=None, shield_config=None):
|
|
|
+ def filter_videos_status(self, pool_type='rov', region_code=None, shield_config=None):
|
|
|
"""视频过滤"""
|
|
|
# todo: 添加app和region的风险过滤。
|
|
|
videos_filtered = self.filter_videos_with_risk_video(self.video_ids, self.app_type, region_code)
|
|
@@ -824,26 +824,19 @@ class FilterVideos(object):
|
|
|
app_region_filtered = {
|
|
|
0: [110000]
|
|
|
}
|
|
|
- # 初始化为:展示,不过滤。
|
|
|
+ # 初始化为:展示,不过滤。todo 测试时使用 True
|
|
|
if_filtered = False
|
|
|
+ if_filtered = True
|
|
|
if app_type in app_region_filtered.keys() and region_code in app_region_filtered[app_type]:
|
|
|
if_filtered = True
|
|
|
if not if_filtered:
|
|
|
- return copy.deepcopy(video_ids)
|
|
|
+ return copy.deepcopy(video_ids[0: min(20, len(video_ids))])
|
|
|
# 2 确认过滤,获取风险video列表
|
|
|
- videos_with_risk = []
|
|
|
+ videos_with_risk = [i for i in range(1000)]
|
|
|
+ videos_with_risk.append(7536230)
|
|
|
# 3 过滤 返回结果
|
|
|
video_ids_new = [id for id in video_ids if id not in videos_with_risk]
|
|
|
- return video_ids_new
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
+ return video_ids_new[0: min(20, len(video_ids_new))]
|
|
|
|
|
|
if __name__ == '__main__':
|
|
|
user = [
|