Moved logging to only show if link is found

This commit is contained in:
Joan
2023-09-22 13:04:40 +02:00
parent 3c713b4a5d
commit 6dcd7af4e1
2 changed files with 2 additions and 2 deletions

View File

@@ -98,11 +98,11 @@ def find_amazon_link(update: Update, context: CallbackContext) -> None:
return
user, chat, chat_id, message_id = update.message.from_user, update.message.chat, update.message.chat_id, update.message.message_id
logging.info(f"Link sent by {user} - {msg}")
amazon_url_with_referer = extract_amazon_url_with_referer(msg)
if amazon_url_with_referer:
logging.info(f"Link sent by {user} - {msg}")
with create_selenium_driver(get_chrome_options()) as chrome_driver:
logging.info("Loading page for scraping information")
page_html = load_page(url=amazon_url_with_referer, driver=chrome_driver)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 62 KiB