From 77ba2a4426976a16116c16e9a8d9ab7dc685cd26 Mon Sep 17 00:00:00 2001 From: djib Date: Mon, 31 Aug 2026 21:05:51 +0200 Subject: [PATCH] Add image in description (some RSS readers do not support media enclosure) --- rss-generator.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/rss-generator.py b/rss-generator.py index 411a2f7..00a9786 100644 --- a/rss-generator.py +++ b/rss-generator.py @@ -95,19 +95,25 @@ def create_rss_feed(apps_data, feed_name, feed_description, output_file): if description is None: description = "" + # Append screenshot image to description if available + if 'screenshot_url' in app and app['screenshot_url']: + screenshot_url = str(app['screenshot_url']) + # Append image as HTML to description + description += f'

Screenshot' + # Create a feed entry fe = fg.add_entry() fe.id(str(app_id)) # Ensure ID is a string fe.title(str(app['title'])) # Ensure title is a string fe.link(href=f'https://repebblesearch.com/apps/{app_id}', rel='alternate') - # Only set description if it's not empty + # Set description (now includes image) if description: fe.description(description) else: fe.description("No description available") - # Add screenshot URL as a link with rel='enclosure' (for media) + # Add screenshot URL as a link with rel='enclosure' (for media) - backup for readers that support it if 'screenshot_url' in app and app['screenshot_url']: fe.link(href=str(app['screenshot_url']), rel='enclosure', type='image/png')