Corregido error de variable duplicada

This commit is contained in:
Joan Cano
2023-03-02 10:22:05 +01:00
parent 7c2e2f0698
commit b6c8c6bd24

View File

@@ -81,7 +81,7 @@ class Worker:
logging.info(requests.get(url).json())
except:
text = f"*Artículo*: {article['title']}\n*Descripción*: {article['description']}\n*Precio*: {article['price']} {article['currency']}\n[Ir al anuncio](https://es.wallapop.com/item/{article['web_slug']})".replace(".", "\.")
url = f"https://api.telegram.org/bot{TELEGRAM_TOKEN}/sendMessage?chat_id={TELEGRAM_CHANNEL_ID}&text={helpers.telegram_escape_characters(text)text}&parse_mode=MarkdownV2"
url = f"https://api.telegram.org/bot{TELEGRAM_TOKEN}/sendMessage?chat_id={TELEGRAM_CHANNEL_ID}&text={helpers.telegram_escape_characters(text)}&parse_mode=MarkdownV2"
requests.get(url)
time.sleep(1) # Avoid Telegram flood restriction
list.insert(0, article['id'])