mirror of
https://github.com/zhayujie/chatgpt-on-wechat.git
synced 2026-02-12 18:29:21 +08:00
9 lines
172 B
Python
9 lines
172 B
Python
from urllib.parse import urlparse
|
|
import os
|
|
|
|
|
|
# 获取url后缀
|
|
def get_path_suffix(path):
|
|
path = urlparse(path).path
|
|
return os.path.splitext(path)[-1].lstrip('.')
|