From 6e7461fae94360264700111b310037228e8fe53b Mon Sep 17 00:00:00 2001 From: Evil0ctal Date: Sun, 26 May 2024 18:29:07 -0700 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8:=20Fix=20endpoint=20`/api/tiktok/w?= =?UTF-8?q?eb/fetch=5Fuser=5Fprofile`=20parameters?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/api/endpoints/tiktok_web.py | 2 +- crawlers/tiktok/web/web_crawler.py | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/api/endpoints/tiktok_web.py b/app/api/endpoints/tiktok_web.py index ebd3c0b..ba5f69c 100644 --- a/app/api/endpoints/tiktok_web.py +++ b/app/api/endpoints/tiktok_web.py @@ -55,7 +55,7 @@ async def fetch_one_video(request: Request, response_model=ResponseModel, summary="获取用户的个人信息/Get user profile") async def fetch_user_profile(request: Request, - uniqueId: str = Query(example="tiktok", description="用户uniqueId/User uniqueId"), + uniqueId: str = Query(default="tiktok", description="用户uniqueId/User uniqueId"), secUid: str = Query(default="", description="用户secUid/User secUid"),): """ # [中文] diff --git a/crawlers/tiktok/web/web_crawler.py b/crawlers/tiktok/web/web_crawler.py index ce293a3..8fd2b37 100644 --- a/crawlers/tiktok/web/web_crawler.py +++ b/crawlers/tiktok/web/web_crawler.py @@ -348,10 +348,10 @@ class TikTokWebCrawler: # print(response) # 获取用户的个人信息 - secUid = "MS4wLjABAAAAfDPs6wbpBcMMb85xkvDGdyyyVAUS2YoVCT9P6WQ1bpuwEuPhL9eFtTmGvxw1lT2C" - uniqueId = "c4shjaz" - response = await self.fetch_user_profile(secUid, uniqueId) - print(response) + # secUid = "MS4wLjABAAAAfDPs6wbpBcMMb85xkvDGdyyyVAUS2YoVCT9P6WQ1bpuwEuPhL9eFtTmGvxw1lT2C" + # uniqueId = "c4shjaz" + # response = await self.fetch_user_profile(secUid, uniqueId) + # print(response) # 获取用户的作品列表 # secUid = "MS4wLjABAAAAfDPs6wbpBcMMb85xkvDGdyyyVAUS2YoVCT9P6WQ1bpuwEuPhL9eFtTmGvxw1lT2C"