fix remove notified
Signed-off-by: Omar Sánchez Pizarro <omar.sanchez@pistacero.net>
This commit is contained in:
@@ -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}")
|
||||
|
||||
@@ -21,8 +21,6 @@ ITEM_HTML = """
|
||||
<b>Modificado el:</b> {modified_at}
|
||||
|
||||
<b>{price} {currency}</b>
|
||||
|
||||
<a href="https://es.wallapop.com/item/{url}">Ir al anuncio</a>
|
||||
"""
|
||||
|
||||
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)
|
||||
|
||||
Reference in New Issue
Block a user