From 6cabece01addccb4c99a6416e31d3467e264592f Mon Sep 17 00:00:00 2001 From: leantli Date: Fri, 12 Apr 2024 18:18:01 +0800 Subject: [PATCH] chore: remove redundant line breaks --- base/base_crawler.py | 1 - store/xhs/xhs_store_impl.py | 5 ++--- store/xhs/xhs_store_sql.py | 2 +- 3 files changed, 3 insertions(+), 5 deletions(-) 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