Throwing error on `serpapi.search`
まだ誰も着手していません。
評価
調査の方向性
Start by locating the Python implementation of serpapi.search and determine how HTTP errors, especially 429 responses, are currently handled. Use the reported try-catch example as the expected usage pattern, then update the README with error-handling guidance; done means search failures raise a proper error and the documented example explains rate limiting.
索引モデルが issue の本文から書いたものです。
説明
The developer team from a high-volume customer reached out that we should throw a proper error on the serpapi.search.
I've suggested using a try-catch exception to handle errors. For example:
try:
search = serpapi.search(q="CoffeeMilk", api_key="", engine="google", location="Austin, Texas", hl="en", gl="us")
print(search)
print("----------------")
except Exception as e:
if "429" in str(e):
print("You are being rate limited")
print(e)
else:
print("An error occurred")
sidenote: we should probably update our readme to show how to handle errors.
- 主要言語
- Python
- スター
- 183
- フォーク
- 28
- 平均マージ
- 8日 14時間
- マージ済み PR(30日)
- 1
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
serpapi/serpapi-python のほかの issue
-
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
serpapi/serpapi-python#54 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 55/100
serpapi/serpapi-python#53 ·
serpapi/serpapi-python の issue をすべて見る
似ている issue
-
todo
難易度 1/5 1時間未満 初心者へのやさしさ 72/100
tonybaloney/CSnakes#864 ·
-
infra
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
libre-embedded/svgen#72 · コメント 1 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
Genesis-Embodied-AI/genesis-world#3950 ·
メンテナーはふだん 1 日以内に返信
-
accessibility
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信