Corregido error de variable duplicada
This commit is contained in:
@@ -81,7 +81,7 @@ class Worker:
|
|||||||
logging.info(requests.get(url).json())
|
logging.info(requests.get(url).json())
|
||||||
except:
|
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(".", "\.")
|
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)
|
requests.get(url)
|
||||||
time.sleep(1) # Avoid Telegram flood restriction
|
time.sleep(1) # Avoid Telegram flood restriction
|
||||||
list.insert(0, article['id'])
|
list.insert(0, article['id'])
|
||||||
|
|||||||
Reference in New Issue
Block a user