From fa96dfd36deec71e3d07db37316a7f5c92d71242 Mon Sep 17 00:00:00 2001 From: Eloi Torrents Date: Fri, 5 Sep 2025 09:35:59 +0200 Subject: [PATCH] detect images --- src/rss.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/rss.py b/src/rss.py index c10aa32..ab126dd 100644 --- a/src/rss.py +++ b/src/rss.py @@ -34,6 +34,10 @@ def line2words(lines, limit): output.append("...") return output +def _is_image_token(token: str, extensions): + parts = token.rsplit('.', 1) + return len(parts) == 2 and parts[1] in extensions + # this is similar to the markup function in microblog def enrich_msg(lines, is_atom=True): if not is_atom: