MCPcopy Create free account
hub / github.com/NanmiCoder/MediaCrawler / store_comment

Method store_comment

store/excel_store_base.py:259–277  ·  view source on GitHub ↗

Store comment data to Excel Args: comment_item: Comment data dictionary

(self, comment_item: Dict)

Source from the content-addressed store, hash-verified

257 utils.logger.info(f"[ExcelStoreBase] Stored content to Excel: {content_id}")
258
259 async def store_comment(self, comment_item: Dict):
260 """
261 Store comment data to Excel
262
263 Args:
264 comment_item: Comment data dictionary
265 """
266 # Define headers
267 headers = list(comment_item.keys())
268
269 # Write headers if first time
270 if not self.comments_headers_written:
271 self._write_headers(self.comments_sheet, headers)
272 self.comments_headers_written = True
273
274 # Write data row
275 self._write_row(self.comments_sheet, comment_item, headers)
276
277 utils.logger.info(f"[ExcelStoreBase] Stored comment to Excel: {comment_item.get('comment_id', 'N/A')}")
278
279 async def store_creator(self, creator: Dict):
280 """

Callers

nothing calls this directly

Calls 4

_write_headersMethod · 0.95
_write_rowMethod · 0.95
keysMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected