mirror of
https://github.com/NanmiCoder/MediaCrawler.git
synced 2026-06-06 09:57:25 +08:00
feat(database): add PostgreSQL support and fix Windows subprocess encoding
This commit is contained in:
@@ -109,7 +109,8 @@ class KuaishouDbStoreImplement(AbstractStore):
|
||||
session.add(new_content)
|
||||
else:
|
||||
for key, value in content_item.items():
|
||||
setattr(video_detail, key, value)
|
||||
if hasattr(video_detail, key):
|
||||
setattr(video_detail, key, value)
|
||||
await session.commit()
|
||||
|
||||
async def store_comment(self, comment_item: Dict):
|
||||
@@ -130,7 +131,8 @@ class KuaishouDbStoreImplement(AbstractStore):
|
||||
session.add(new_comment)
|
||||
else:
|
||||
for key, value in comment_item.items():
|
||||
setattr(comment_detail, key, value)
|
||||
if hasattr(comment_detail, key):
|
||||
setattr(comment_detail, key, value)
|
||||
await session.commit()
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user