From 60db36ba99305dd7fb80acdd015108f8d729e1b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Omar=20S=C3=A1nchez=20Pizarro?= Date: Fri, 10 Oct 2025 11:40:32 +0200 Subject: [PATCH] fix remove notified MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Omar Sánchez Pizarro --- managers/queue_manager.py | 4 ---- managers/telegram_manager.py | 5 ++--- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/managers/queue_manager.py b/managers/queue_manager.py index 14f5985..82b5773 100644 --- a/managers/queue_manager.py +++ b/managers/queue_manager.py @@ -52,10 +52,6 @@ class QueueManager: # Procesar el artículo try: self._telegram_manager.send_telegram_article(search_name, article, thread_id) - - # Mantener solo los primeros NOTIFIED_ARTICLES_LIMIT artículos después de enviar - if len(self._notified_articles) > NOTIFIED_ARTICLES_LIMIT: - self._notified_articles = self._notified_articles[NOTIFIED_ARTICLES_LIMIT:] except Exception as e: self.logger.error(f"Error al enviar artículo a Telegram: {e}") diff --git a/managers/telegram_manager.py b/managers/telegram_manager.py index 6e1aa72..68b062f 100644 --- a/managers/telegram_manager.py +++ b/managers/telegram_manager.py @@ -21,8 +21,6 @@ ITEM_HTML = """ Modificado el: {modified_at} {price} {currency} - -Ir al anuncio """ FAVORITES_FILE = "favorites.json" @@ -112,7 +110,8 @@ class TelegramManager: # Crear botones inline para el primer mensaje del grupo keyboard = [ [ - InlineKeyboardButton("⭐ Añadir a favoritos", callback_data=f"fav_{article.get_id()}_{search_name}") + InlineKeyboardButton("⭐ Añadir a favoritos", callback_data=f"fav_{article.get_id()}_{search_name}"), + InlineKeyboardButton("Ir al anuncio", url=f"https://es.wallapop.com/item/{article.get_url()}") ] ] reply_markup = InlineKeyboardMarkup(keyboard)