Skip to content

Feature: Requests limit reached, try increasing throttling or wait before trying again #130

@ghost

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions