mirror of
https://github.com/NanmiCoder/MediaCrawler.git
synced 2026-06-09 11:27:26 +08:00
fix(store): 修复'crawler_type_var'的不当使用导致csv/json保存文件名异常的bug
This commit is contained in:
@@ -50,7 +50,7 @@ def calculate_number_of_files(file_store_path: str) -> int:
|
||||
class KuaishouCsvStoreImplement(AbstractStore):
|
||||
def __init__(self, **kwargs):
|
||||
super().__init__(**kwargs)
|
||||
self.writer = AsyncFileWriter(platform="kuaishou", crawler_type=kwargs.get("crawler_type"))
|
||||
self.writer = AsyncFileWriter(platform="kuaishou", crawler_type=crawler_type_var.get())
|
||||
|
||||
async def store_content(self, content_item: Dict):
|
||||
"""
|
||||
@@ -127,7 +127,7 @@ class KuaishouDbStoreImplement(AbstractStore):
|
||||
class KuaishouJsonStoreImplement(AbstractStore):
|
||||
def __init__(self, **kwargs):
|
||||
super().__init__(**kwargs)
|
||||
self.writer = AsyncFileWriter(platform="kuaishou", crawler_type=kwargs.get("crawler_type"))
|
||||
self.writer = AsyncFileWriter(platform="kuaishou", crawler_type=crawler_type_var.get())
|
||||
|
||||
async def store_content(self, content_item: Dict):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user