python获取url路径文件的扩展名

python获取url路径文件的扩展名
返回python,url,扩展名,路径,获取常用代码示例代码片段
  1. #coding=utf-8
  2. import os
  3. url='https://rumenz.com/static/cimg/wx.jpg'
  4. (path,file_ext)=os.path.splitext(url)
  5. print("前面的路径:"+path)
  6. print("文件扩展名为:"+file)
  7. # 输出 .jpg
原文链接:https://rumenz.com/examples/python3/python-get-url-file-ext.html

【Linux常用命令速查手册】关注【入门小站】,后台回复 「1001」 自取。

点击下面标题即可获取对应PDF资料
↑回到顶部↑
入门小站 @2018