diff options
| author | Pinapelz <yukais@pinapelz.com> | 2025-04-17 18:36:06 -0700 |
|---|---|---|
| committer | Pinapelz <yukais@pinapelz.com> | 2025-04-17 18:36:06 -0700 |
| commit | ccddc4541c69dff0445edbcc56b07a7835c4e2de (patch) | |
| tree | f7db6fae583020fc511bbb43fdc665219e38b1d6 /rasis.py | |
| parent | 1d488dcb140affb7d14b5f936a98bbf0349ee2ad (diff) | |
skip posts if the identifier is unknown
Diffstat (limited to 'rasis.py')
| -rw-r--r-- | rasis.py | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -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) |
