refac use comment_comments for comment count update
This commit is contained in:
parent
b04e3a935d
commit
2d40a340ea
|
|
@ -142,14 +142,13 @@ class Comments:
|
|||
|
||||
def upload_comments(self):
|
||||
"""upload comments to es"""
|
||||
if not self.is_activated:
|
||||
return
|
||||
|
||||
print(f"{self.youtube_id}: upload comments")
|
||||
_, _ = ElasticWrap(self.es_path).put(self.json_data)
|
||||
|
||||
vid_path = f"ta_video/_update/{self.youtube_id}"
|
||||
data = {"doc": {"comment_count": len(self.comments_format)}}
|
||||
data = {
|
||||
"doc": {"comment_count": len(self.json_data["comment_comments"])}
|
||||
}
|
||||
_, _ = ElasticWrap(vid_path).post(data=data)
|
||||
|
||||
def delete_comments(self):
|
||||
|
|
|
|||
Loading…
Reference in New Issue