根据url获取图片md5和format

url = "https://app-s3.aifashion.com/sssdska45565646.jpg"


def get_hash_from_url(upload_url):

    format = upload_url.rsplit(".")[-1]
    s1 = upload_url.rsplit(".")[-2]
    md5 = s1.rsplit('/')[-1]
    
    return md5, upload_url, format

image_info = get_hash_from_url(url)

  

 

posted @ 2019-04-13 17:53  Adamanter  阅读(964)  评论(0编辑  收藏  举报