diff --git a/main.py b/main.py index 7f25009..2bc62cf 100644 --- a/main.py +++ b/main.py @@ -18,7 +18,7 @@ def convert_ghost_to_discord(ghost_payload): return { "embeds": [{ "title": post.get("title"), - "description": post.get("excerpt")[:200] + "...", + "description": post.get("excerpt", "")[:200] + "...", "url": f"https://torrtle.co/{post.get('slug')}", "color": "0x00ff00", "thumbnail": { @@ -27,7 +27,7 @@ def convert_ghost_to_discord(ghost_payload): "fields": [ { "name": "Author", - "value": post.get("primary_author").get("name"), + "value": post.get("primary_author", {}).get("name","simbob"), "inline": True }, {