diff --git a/base/base_crawler.py b/base/base_crawler.py index 656b924..2a5b69f 100644 --- a/base/base_crawler.py +++ b/base/base_crawler.py @@ -56,7 +56,6 @@ class AbstractStore(ABC): async def store_creator(self, creator: Dict): pass - class AbstractStoreImage(ABC): #TODO: support all platform # only weibo is supported diff --git a/store/xhs/xhs_store_impl.py b/store/xhs/xhs_store_impl.py index 026d527..f7a8bcf 100644 --- a/store/xhs/xhs_store_impl.py +++ b/store/xhs/xhs_store_impl.py @@ -142,7 +142,7 @@ class XhsDbStoreImplement(AbstractStore): await add_new_creator(creator) else: await update_creator_by_user_id(user_id, creator) - + class XhsJsonStoreImplement(AbstractStore): json_store_path: str = "data/xhs" @@ -213,5 +213,4 @@ class XhsJsonStoreImplement(AbstractStore): Returns: """ - await self.save_data_to_json(creator, "creator") - \ No newline at end of file + await self.save_data_to_json(creator, "creator") \ No newline at end of file diff --git a/store/xhs/xhs_store_sql.py b/store/xhs/xhs_store_sql.py index 28c0a2c..d6c4929 100644 --- a/store/xhs/xhs_store_sql.py +++ b/store/xhs/xhs_store_sql.py @@ -145,4 +145,4 @@ async def update_creator_by_user_id(user_id: str, creator_item: Dict) -> int: """ async_db_conn: AsyncMysqlDB = media_crawler_db_var.get() effect_row: int = await async_db_conn.update_table("xhs_creator", creator_item, "user_id", user_id) - return effect_row + return effect_row \ No newline at end of file