fix(store): 修复'crawler_type_var'的不当使用导致csv/json保存文件名异常的bug

This commit is contained in:
persist-1
2025-09-10 23:47:05 +08:00
parent d3bebd039e
commit 0d0af57a01
5 changed files with 11 additions and 11 deletions

View File

@@ -51,7 +51,7 @@ def calculate_number_of_files(file_store_path: str) -> int:
class WeiboCsvStoreImplement(AbstractStore):
def __init__(self, **kwargs):
super().__init__(**kwargs)
self.writer = AsyncFileWriter(platform="weibo", crawler_type=kwargs.get("crawler_type"))
self.writer = AsyncFileWriter(platform="weibo", crawler_type=crawler_type_var.get())
async def store_content(self, content_item: Dict):
"""
@@ -171,7 +171,7 @@ class WeiboDbStoreImplement(AbstractStore):
class WeiboJsonStoreImplement(AbstractStore):
def __init__(self, **kwargs):
super().__init__(**kwargs)
self.writer = AsyncFileWriter(platform="weibo", crawler_type=kwargs.get("crawler_type"))
self.writer = AsyncFileWriter(platform="weibo", crawler_type=crawler_type_var.get())
async def store_content(self, content_item: Dict):
"""