@ -250,14 +250,16 @@ class MessageChain(ChainBase):
|
||||
cache_list: list = cache_data.get('items')
|
||||
total = len(cache_list)
|
||||
# 加一页
|
||||
self._current_page += 1
|
||||
cache_list = cache_list[self._current_page * self._page_size:(self._current_page + 1) * self._page_size]
|
||||
cache_list = cache_list[
|
||||
(self._current_page + 1) * self._page_size:(self._current_page + 2) * self._page_size]
|
||||
if not cache_list:
|
||||
# 没有数据
|
||||
self.post_message(Notification(
|
||||
channel=channel, title="已经是最后一页了!", userid=userid))
|
||||
return
|
||||
else:
|
||||
# 加一页
|
||||
self._current_page += 1
|
||||
if cache_type == "Torrent":
|
||||
# 发送种子数据
|
||||
self.__post_torrents_message(channel=channel,
|
||||
|
@ -70,7 +70,7 @@ class Settings(BaseSettings):
|
||||
# WeChat应用ID
|
||||
WECHAT_APP_ID: str = None
|
||||
# WeChat代理服务器
|
||||
WECHAT_PROXY: str = None
|
||||
WECHAT_PROXY: str = "https://qyapi.weixin.qq.com"
|
||||
# WeChat Token
|
||||
WECHAT_TOKEN: str = None
|
||||
# WeChat EncodingAESKey
|
||||
|
@ -16,7 +16,6 @@ lock = threading.Lock()
|
||||
|
||||
|
||||
class WeChat(metaclass=Singleton):
|
||||
|
||||
# 企业微信Token
|
||||
_access_token = None
|
||||
# 企业微信Token过期时间
|
||||
@ -29,11 +28,11 @@ class WeChat(metaclass=Singleton):
|
||||
_appsecret = None
|
||||
# 企业微信AppID
|
||||
_appid = None
|
||||
|
||||
|
||||
# 企业微信发送消息URL
|
||||
_send_msg_url = "https://qyapi.weixin.qq.com/cgi-bin/message/send?access_token=%s"
|
||||
_send_msg_url = f"{settings.WECHAT_PROXY}/cgi-bin/message/send?access_token=%s"
|
||||
# 企业微信获取TokenURL
|
||||
_token_url = "https://qyapi.weixin.qq.com/cgi-bin/gettoken?corpid=%s&corpsecret=%s"
|
||||
_token_url = f"{settings.WECHAT_PROXY}/cgi-bin/gettoken?corpid=%s&corpsecret=%s"
|
||||
|
||||
def __init__(self):
|
||||
"""
|
||||
|
Reference in New Issue
Block a user