削除フラグが誤って付与されるバグ修正(#20) #21
+10
-9
@@ -358,18 +358,19 @@ def search_nico_by_tags (
|
|||||||
if video.code in result_by_video_code:
|
if video.code in result_by_video_code:
|
||||||
continue
|
continue
|
||||||
try:
|
try:
|
||||||
video_data = fetch_video_data (video.code)['data']
|
tracked_video = video
|
||||||
owner = video_data.get ('owner') or { }
|
video_data = fetch_video_data (tracked_video.code)['data']
|
||||||
video = video_data['video']
|
owner = video_data.get ('owner') or {}
|
||||||
result_by_video_code[video.code] = {
|
video_info = video_data['video']
|
||||||
'contentId': video.code,
|
result_by_video_code[tracked_video.code] = {
|
||||||
|
'contentId': tracked_video.code,
|
||||||
'userId': owner.get ('id'),
|
'userId': owner.get ('id'),
|
||||||
'title': video['title'],
|
'title': video_info['title'],
|
||||||
'tags': ' '.join (map (lambda t: t['name'],
|
'tags': ' '.join (map (lambda t: t['name'],
|
||||||
video_data['tag']['items'])),
|
video_data['tag']['items'])),
|
||||||
'description': video['description'],
|
'description': video_info['description'],
|
||||||
'viewCounter': video['count']['view'],
|
'viewCounter': video_info['count']['view'],
|
||||||
'startTime': video['registeredAt'] }
|
'startTime': video_info['registeredAt'] }
|
||||||
except (KeyError,
|
except (KeyError,
|
||||||
TypeError,
|
TypeError,
|
||||||
ValueError,
|
ValueError,
|
||||||
|
|||||||
新しい課題から参照
ユーザをブロックする