Add some more features

This commit is contained in:
2024-11-21 00:57:43 -04:00
parent 1ab4e8a813
commit 107e71189c
6 changed files with 55 additions and 17 deletions

View File

@ -25,7 +25,8 @@ class Unsplash(Provider):
image_slug = matches.group(1)
logging.debug(f"Image slug: {image_slug}")
image_id = image_slug.split("-")[-1]
# Last 11 characters are the image ID
image_id = image_slug[-11:]
logging.debug(f"Image ID: {image_id}")
title = image_slug.replace("-", " ").replace(image_id, "").strip().title()