Skip to content

Commit

Permalink
Remove image check on error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
arash77 committed Jun 17, 2024
1 parent 0152c6f commit 2a2be14
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions lib/galaxy_social.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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
]
Expand Down

0 comments on commit 2a2be14

Please sign in to comment.