-
Notifications
You must be signed in to change notification settings - Fork 47
Description
try:
stock_availability = False
amazon = AmazonApi(key, secret, tag, 'IN',throttling=9)
item = amazon.get_items('B0BYHX2XGP')[0]
time.sleep(10)
if hasattr(item, 'offers') and hasattr(item.offers, 'listings'):
listings = item.offers.listings
if listings:
availability = listings[0].availability
if hasattr(availability, 'message'):
message = availability.message
count +=1
print('count increse',count)
if message and message.lower() == 'in stock':
stock_availability = True
else:
stock_availability = False
else:
stock_availability = False
else:
stock_availability = False
else:
stock_availability = False
except Exception as e:
time.sleep(10)
While running the above for stock availability, the program gets failed in the try block and in expect block it gets printed for the error as 'Requests limit reached, try increasing throttling or wait before trying again' , even tried to increase the throttling time for several times still the same error occurs everytime.
Previously the above code was working fine, but since last few days code start getting failed.