This commit is contained in:
jxxghp 2024-05-17 07:46:27 +08:00
parent 92cdd67f3a
commit 278835c5d4
2 changed files with 3 additions and 2 deletions

View File

@ -228,7 +228,7 @@ class DoubanApi(metaclass=Singleton):
ua=settings.USER_AGENT,
session=self._session,
).post_res(url=req_url, data=params)
if resp.status_code == 400 and "rate_limit" in resp.text:
if resp is not None and resp.status_code == 400 and "rate_limit" in resp.text:
return resp.json()
return resp.json() if resp else {}

View File

@ -131,10 +131,11 @@ class _PluginBase(metaclass=ABCMeta):
{
"refresh": 10, // 自动刷新时间单位秒
"border": True, // 是否显示边框默认True为False时取消组件边框和边距由插件自行控制
"subtitle": "子标题", // 组件子标题缺省时不展示子标题
}
3页面配置使用Vuetify组件拼装参考https://vuetifyjs.com/
输入参数中user_agent浏览器UA
kwargs参数可获取的值1user_agent浏览器UA
"""
pass