aboutsummaryrefslogtreecommitdiffstats
path: root/rasis.py
diff options
context:
space:
mode:
authorPinapelz <yukais@pinapelz.com>2025-04-17 18:36:06 -0700
committerPinapelz <yukais@pinapelz.com>2025-04-17 18:36:06 -0700
commitccddc4541c69dff0445edbcc56b07a7835c4e2de (patch)
treef7db6fae583020fc511bbb43fdc665219e38b1d6 /rasis.py
parent1d488dcb140affb7d14b5f936a98bbf0349ee2ad (diff)
skip posts if the identifier is unknown
Diffstat (limited to 'rasis.py')
-rw-r--r--rasis.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/rasis.py b/rasis.py
index c5bcba4..ad206f7 100644
--- a/rasis.py
+++ b/rasis.py
@@ -90,6 +90,8 @@ def generate_post_content(post_data: dict) -> str:
post_data['headline'] = None
game = "O.N.G.E.K.I (JPN)"
tags = "#ongeki"
+ else:
+ return None
content = f"📰 {game} - {post_data['date']}\n\n"
if post_data["type"] is not None:
content = content + f"[{post_data['type']}] "
@@ -132,5 +134,7 @@ if __name__ == "__main__":
queued_posts = generate_queued_posts()
for post in queued_posts:
content = generate_post_content(post)
+ if content is None:
+ continue
cleaned = content.encode("utf-8", "replace").decode("utf-8")
post_on_fedi(cleaned)
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage