新增对微博博客内照片获取的支持 文件存放路径data/weibo/images

This commit is contained in:
Er_Meng
2024-04-09 17:21:52 +08:00
parent 5c409c6f0c
commit 16413c3074
6 changed files with 114 additions and 3 deletions

View File

@@ -8,13 +8,14 @@ from typing import List
import config
from .weibo_store_impl import *
from .weibo_store_image import *
class WeibostoreFactory:
STORES = {
"csv": WeiboCsvStoreImplement,
"db": WeiboDbStoreImplement,
"json": WeiboJsonStoreImplement
"json": WeiboJsonStoreImplement,
}
@staticmethod
@@ -86,3 +87,6 @@ async def update_weibo_note_comment(note_id: str, comment_item: Dict):
utils.logger.info(
f"[store.weibo.update_weibo_note_comment] Weibo note comment: {comment_id}, content: {save_comment_item.get('content', '')[:24]} ...")
await WeibostoreFactory.create_store().store_comment(comment_item=save_comment_item)
async def update_weibo_note_image(picid: str, pic_content, extension_file_name):
await WeiboStoreImage().store_image({"pic_id": picid, "pic_content": pic_content, "extension_file_name": extension_file_name})