You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

9 lines
172B

  1. from urllib.parse import urlparse
  2. import os
  3. # 获取url后缀
  4. def get_path_suffix(path):
  5. path = urlparse(path).path
  6. return os.path.splitext(path)[-1].lstrip('.')