mirror of
https://github.com/TeamWiseFlow/wiseflow.git
synced 2025-02-02 18:28:46 +08:00
support weixin url card info
This commit is contained in:
parent
7c84fbba60
commit
a320aca071
@ -137,7 +137,17 @@ async def message_manager(_input: dict):
|
||||
|
||||
elif _input['type'] == 'url':
|
||||
# this is remained for wechat shared mp_article_card
|
||||
# todo will do it in project awada (need finish the generalMsg api first)
|
||||
return
|
||||
item = re.search(r'<shareUrlOpen>(.*?);chksm=', _input["content"], re.DOTALL)
|
||||
if not item:
|
||||
logger.debug("shareUrlOpen not find")
|
||||
item = re.search(r'<shareUrlOriginal>(.*?);chksm=', _input["content"], re.DOTALL)
|
||||
if not item:
|
||||
logger.debug("shareUrlOriginal not find")
|
||||
item = re.search(r'<url>(.*?);chksm=', _input["content"], re.DOTALL)
|
||||
if not item:
|
||||
logger.warning(f"cannot find url in \n{_input['content']}")
|
||||
return
|
||||
extract_url = item.group(1)
|
||||
await pipeline(extract_url)
|
||||
else:
|
||||
return
|
||||
|
Loading…
Reference in New Issue
Block a user