0
我使用瓶装时出现问题。 根据其说明,我需要按照说明添加error_handler。 中的说明,我把这个函数:使用瓶装时出错
def error_handler(err):
ex = err['exception']
if isinstance(ex, HTTPError) and ex.code == 404:
time.sleep(random.expovariate(0.1))
return True
的例子在说明书上说使用这条线:
amazon = bottlenose.Amazon(ErrorHandler=error_handler)
我有这样的:
amazon = bottlenose.Amazon(AWSAccessKeyId=ACCESS_KEY_ID, AWSSecretAccessKey = SECRET_KEY,AssociateTag = ASSOC_TAG)
但我发现了没有正确的回应。为什么?