|
@@ -55,7 +55,6 @@ def video_position_recommend(mid, uid, app_type, videos):
|
|
|
|
|
|
return videos[:10]
|
|
return videos[:10]
|
|
|
|
|
|
-
|
|
|
|
def positon_duplicate(pos1_vids, pos2_vids, videos):
|
|
def positon_duplicate(pos1_vids, pos2_vids, videos):
|
|
s = set()
|
|
s = set()
|
|
if pos1_vids is not None and len(pos1_vids) >0:
|
|
if pos1_vids is not None and len(pos1_vids) >0:
|
|
@@ -64,12 +63,12 @@ def positon_duplicate(pos1_vids, pos2_vids, videos):
|
|
s.add(int(pos2_vids[0]))
|
|
s.add(int(pos2_vids[0]))
|
|
|
|
|
|
l = []
|
|
l = []
|
|
- for i in range(len(videos)):
|
|
|
|
- if videos[i]['videoId'] in s:
|
|
|
|
- l.append(i)
|
|
|
|
- for i in l:
|
|
|
|
- videos.pop(i)
|
|
|
|
- return videos
|
|
|
|
|
|
+ for item in videos:
|
|
|
|
+ if item['videoId'] in s:
|
|
|
|
+ continue
|
|
|
|
+ else:
|
|
|
|
+ l.append(item)
|
|
|
|
+ return l
|
|
|
|
|
|
def video_recommend(mid, uid, size, app_type, algo_type, client_info):
|
|
def video_recommend(mid, uid, size, app_type, algo_type, client_info):
|
|
"""
|
|
"""
|