From 34c81458fc719da1b0319625c6227aedf77b65d5 Mon Sep 17 00:00:00 2001 From: Audionut Date: Sat, 7 Sep 2024 18:04:30 +1000 Subject: [PATCH] Handle edge case description PTP --- src/bbcode.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bbcode.py b/src/bbcode.py index 6509d594e..755cea4ca 100644 --- a/src/bbcode.py +++ b/src/bbcode.py @@ -123,7 +123,7 @@ def clean_ptp_description(self, desc, is_disc): desc = re.sub(r"\[img=[\s\S]*?\]", "", desc, flags=re.IGNORECASE) # Extract loose images and add to imagelist as dictionaries - loose_images = re.findall(r"(https?:\/\/.*\.(?:png|jpg))", nocomp, flags=re.IGNORECASE) + loose_images = re.findall(r"(https?:\/\/[^\s\[\]]+\.(?:png|jpg))", nocomp, flags=re.IGNORECASE) if loose_images: for img_url in loose_images: image_dict = {