From 1fa8ab65c9f409ef709a62340f4fc9b68581ae9e Mon Sep 17 00:00:00 2001 From: Simon Date: Fri, 3 Jan 2025 22:07:04 +0700 Subject: [PATCH] comment scrape sleep --- backend/video/src/comments.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/backend/video/src/comments.py b/backend/video/src/comments.py index c9074e05..5e3df655 100644 --- a/backend/video/src/comments.py +++ b/backend/video/src/comments.py @@ -6,9 +6,11 @@ Functionality: """ from datetime import datetime +from time import sleep from appsettings.src.config import AppConfig from common.src.es_connect import ElasticWrap +from common.src.helper import get_sleep from common.src.ta_redis import RedisQueue from download.src.yt_dlp_base import YtWrap @@ -219,6 +221,8 @@ class CommentList: if comment.json_data: comment.upload_comments() + sleep(get_sleep(self.config)) + def notify(self, idx, total_videos): """send notification on task""" message = [f"Add comments for new videos {idx}/{total_videos}"]