From 2a2be145f33b98acad911d77b13ff0ce1ab735c9 Mon Sep 17 00:00:00 2001 From: Arash Date: Mon, 17 Jun 2024 10:14:09 +0200 Subject: [PATCH] Remove image check on error handling --- lib/galaxy_social.py | 8 -------- 1 file changed, 8 deletions(-) diff --git a/lib/galaxy_social.py b/lib/galaxy_social.py index 2c8d960..641d937 100644 --- a/lib/galaxy_social.py +++ b/lib/galaxy_social.py @@ -7,7 +7,6 @@ from importlib import import_module from typing import Any, Dict -import requests from jsonschema import validate from yaml import safe_load as yaml @@ -124,13 +123,6 @@ def parse_markdown_file(self, file_path): images = image_pattern.findall(text) plain_content = re.sub(image_pattern, "", text).strip() - for image in images: - try: - if requests.get(image[1]).status_code != 200: - errors += f"- Image `{image[1]}` not found.\n" - except: - errors += f"- Invalid Image url `{image[1]}`.\n" - metadata["images"] = [ {"url": image[1], "alt_text": image[0]} for image in images ]