leonkansh / shopping-web-scraper

2 stars 1 forks source link

auto try-again & runtime exception #7

Open leonkansh opened 4 years ago

leonkansh commented 4 years ago

issues

Some issues are solved by calling the website again or running the entire program again.

Temporary solution

leonkansh commented 4 years ago

Able to catch AttributeError

while amazon_result is False:
    try:
        amazon_price, URL = searchAmazon(search, requests, BeautifulSoup, driver)
        amazon_result = True
    except (AttributeError):
        print("counter an attribute error")
        print("loading...")