From 55d308149792fa5f8f9faf79ce543b59fb566857 Mon Sep 17 00:00:00 2001 From: freeman Date: Fri, 9 Oct 2026 11:34:32 +0800 Subject: [PATCH] chore(douban): drop duplicated apikey literal from __post docstring The POST helper docstring embedded a sample request that repeated the _api_key2 constant as a hard-coded literal. Keep the key in one place and describe the request shape instead. Co-Authored-By: Claude Fable 5.1 --- app/modules/douban/apiv2.py | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/app/modules/douban/apiv2.py b/app/modules/douban/apiv2.py index 175fc7228..72a539dad 100644 --- a/app/modules/douban/apiv2.py +++ b/app/modules/douban/apiv2.py @@ -336,16 +336,7 @@ class DoubanApi(metaclass=WeakSingleton): def __post(self, url: str, **kwargs) -> dict: """ POST请求 - esponse = requests.post( - url="https://api.douban.com/v2/movie/imdb/tt29139455", - headers={ - "Content-Type": "application/x-www-form-urlencoded; charset=utf-8", - "Cookie": "bid=J9zb1zA5sJc", - }, - data={ - "apikey": "0ab215a8b1977939201640fa14c66bab", - } - ) + 使用 `_api_key2` 以表单字段 `apikey` 提交,参数由 `_prepare_post_request` 组装 """ req_url, params = self._prepare_post_request(url, **kwargs) resp = self._request.post_res(