タグ付けされた質問 「http-status-code-429」

5
HTTPエラー429(リクエストが多すぎる)Pythonを回避する方法
Pythonを使用してWebサイトにログインし、いくつかのWebページから情報を収集しようとすると、次のエラーが発生します。 Traceback (most recent call last): File "extract_test.py", line 43, in <module> response=br.open(v) File "/usr/local/lib/python2.7/dist-packages/mechanize/_mechanize.py", line 203, in open return self._mech_open(url, data, timeout=timeout) File "/usr/local/lib/python2.7/dist-packages/mechanize/_mechanize.py", line 255, in _mech_open raise response mechanize._response.httperror_seek_wrapper: HTTP Error 429: Unknown Response Code 私は使用time.sleep()しましたが機能しますが、インテリジェントで信頼性が低いようですが、このエラーを回避する他の方法はありますか? これが私のコードです: import mechanize import cookielib import re first=("example.com/page1") second=("example.com/page2") third=("example.com/page3") fourth=("example.com/page4") …

弊社のサイトを使用することにより、あなたは弊社のクッキーポリシーおよびプライバシーポリシーを読み、理解したものとみなされます。
Licensed under cc by-sa 3.0 with attribution required.