Ver código fonte

fix: remove mini-program url

master
zhayujie 1 ano atrás
pai
commit
f3de4dcc5f
2 arquivos alterados com 7 adições e 2 exclusões
  1. +1
    -1
      plugins/linkai/linkai.py
  2. +6
    -1
      plugins/linkai/summary.py

+ 1
- 1
plugins/linkai/linkai.py Ver arquivo

@@ -31,7 +31,7 @@ class LinkAI(Plugin):
self.sum_config = {}
if self.config:
self.sum_config = self.config.get("summary")
logger.info("[LinkAI] inited")
logger.info(f"[LinkAI] inited, config={self.config}")


def on_handle_context(self, e_context: EventContext):


+ 6
- 1
plugins/linkai/summary.py Ver arquivo

@@ -82,8 +82,13 @@ class LinkSummary:
if not url:
return False
support_list = ["http://mp.weixin.qq.com", "https://mp.weixin.qq.com"]
black_support_list = ["https://mp.weixin.qq.com/mp/waerrpage"]
for black_url_prefix in black_support_list:
if url.strip().startswith(black_url_prefix):
logger.warn(f"[LinkSum] unsupported url, no need to process, url={url}")
return False
for support_url in support_list:
if url.strip().startswith(support_url):
return True
logger.debug("[LinkSum] unsupported url, no need to process")
logger.warn(f"[LinkSum] unsupported url, no need to process, url={url}")
return False

Carregando…
Cancelar
Salvar