Browse Source

Merge pull request #1904 from fatwang2/master

新增url解析逻辑,解决itchat中分享卡片无法解析的问题
master
zhayujie GitHub 7 months ago
parent
commit
d38e4eed5b
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      plugins/linkai/summary.py

+ 2
- 0
plugins/linkai/summary.py View File

@@ -2,6 +2,7 @@ import requests
from config import conf from config import conf
from common.log import logger from common.log import logger
import os import os
import html




class LinkSummary: class LinkSummary:
@@ -18,6 +19,7 @@ class LinkSummary:
return self._parse_summary_res(res) return self._parse_summary_res(res)


def summary_url(self, url: str): def summary_url(self, url: str):
url = html.unescape(url)
body = { body = {
"url": url "url": url
} }


Loading…
Cancel
Save