diff --git a/utils/feishu.py b/utils/feishu.py index 368aa31..5db577d 100644 --- a/utils/feishu.py +++ b/utils/feishu.py @@ -221,7 +221,7 @@ class Feishu: def generate_direct_link(self, material_token: str) -> str: """ - 生成直链 + 根据素材标识生成直链 :param material_token: 素材标识 :return: 直链 """ @@ -254,7 +254,7 @@ class Feishu: # 解析素材名称 if not matched: raise RuntimeError("解析素材名称失败") - # 解码素材名称 + # 解析素材名称并解码 material_name = unquote( string=matched.group("material_name"), encoding=matched.group("encoding"), @@ -270,10 +270,3 @@ class Feishu: ) -a = Feishu() - -print( - a.generate_direct_link( - material_token="DsG4bY3iKo0n6Bx6O5fcKAbnnCh", - ) -)