backup-thrivecart-learn/thrivecart_utils.py
2023-06-17 00:41:32 -04:00

7 lines
204 B
Python

from urllib import parse
def extract_image_filename_thrivecart(url):
parsed_url = parse.urlparse(url)
filename = parse.unquote(parsed_url.path.split('/')[-1]).split('/')[-1]
return filename