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)
但我發現了沒有正確的迴應。爲什麼?