Merge branch 'fix-error-when-no-amazon-links-are-found' into 'main'
Return a controlled value when the link is invalid (not an amazon link) See merge request jocaru/amazon-telegram!4
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -4,3 +4,4 @@
|
|||||||
/data/images/last_iteration/*.png
|
/data/images/last_iteration/*.png
|
||||||
venv
|
venv
|
||||||
.DS_Store
|
.DS_Store
|
||||||
|
.idea/*
|
||||||
@@ -67,6 +67,9 @@ def extract_amazon_url_with_referer(text: str):
|
|||||||
|
|
||||||
return helpers.new_refer_url(product_code, extra_params), original_message
|
return helpers.new_refer_url(product_code, extra_params), original_message
|
||||||
|
|
||||||
|
# we return here the original message without modification and None for the URL marking that the url is not valid
|
||||||
|
return None, text
|
||||||
|
|
||||||
|
|
||||||
def resolve_captcha(driver: webdriver):
|
def resolve_captcha(driver: webdriver):
|
||||||
logging.info("Trying to resolve captcha")
|
logging.info("Trying to resolve captcha")
|
||||||
|
|||||||
Reference in New Issue
Block a user