@@ -130,7 +130,7 @@ def get_channel_by_id(self, ch_id: str) -> Tuple:
130130 ch_id (str): The channel ID
131131 """
132132
133- where_statement = f"id ='{ ch_id } '"
133+ where_statement = f"channel_id ='{ ch_id } '"
134134 result = self .select_from_table (table = self .CHANNEL_TABLE , where = where_statement )
135135 if len (result ) > 1 :
136136 logger .warning ("Duplicate channel retrieved from SELECT statement:{result}" )
@@ -160,7 +160,7 @@ def remove_channel_by_id(self, ch_id: str) -> None:
160160 ch_id (str): The channel ID
161161 """
162162
163- where_statement = f"id ='{ ch_id } '"
163+ where_statement = f"channel_id ='{ ch_id } '"
164164 self .delete_from_table (table = self .CHANNEL_TABLE , where = where_statement )
165165
166166 def remove_channel_by_username (self , ch_username : str ) -> None :
@@ -275,7 +275,8 @@ def get_comments(self, comment_cols: List[str], channel_cols: List[str] = None,
275275
276276 def update_comment (self , video_link : str , comment_id : str = None ,
277277 like_cnt : int = None , reply_cnt : int = None ,
278- upload_time : str = None , video_title : str = None ) -> None :
278+ upload_time : str = None , video_title : str = None ,
279+ comment_time : str = None ) -> None :
279280 """
280281 Populate a comment entry with additional information.
281282 Args:
@@ -285,6 +286,7 @@ def update_comment(self, video_link: str, comment_id: str = None,
285286 reply_cnt:
286287 upload_time:
287288 video_title:
289+ comment_time:
288290 """
289291
290292 # Get video id
@@ -302,6 +304,8 @@ def update_comment(self, video_link: str, comment_id: str = None,
302304 set_data ['like_count' ] = like_cnt
303305 if reply_cnt is not None :
304306 set_data ['reply_count' ] = reply_cnt
307+ if comment_time is not None :
308+ set_data ['comment_time' ] = comment_time
305309 if upload_time is not None :
306310 set_data ['upload_time' ] = upload_time
307311 if video_title is not None :
0 commit comments