Store content data to Excel Args: content_item: Content data dictionary
(self, content_item: Dict)
| 235 | ) |
| 236 | |
| 237 | async def store_content(self, content_item: Dict): |
| 238 | """ |
| 239 | Store content data to Excel |
| 240 | |
| 241 | Args: |
| 242 | content_item: Content data dictionary |
| 243 | """ |
| 244 | # Define headers (customize based on platform) |
| 245 | headers = list(content_item.keys()) |
| 246 | |
| 247 | # Write headers if first time |
| 248 | if not self.contents_headers_written: |
| 249 | self._write_headers(self.contents_sheet, headers) |
| 250 | self.contents_headers_written = True |
| 251 | |
| 252 | # Write data row |
| 253 | self._write_row(self.contents_sheet, content_item, headers) |
| 254 | |
| 255 | # Get ID from various possible field names |
| 256 | content_id = content_item.get('note_id') or content_item.get('aweme_id') or content_item.get('video_id') or content_item.get('content_id') or 'N/A' |
| 257 | utils.logger.info(f"[ExcelStoreBase] Stored content to Excel: {content_id}") |
| 258 | |
| 259 | async def store_comment(self, comment_item: Dict): |
| 260 | """ |
nothing calls this directly
no test coverage detected