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')