Throwing error on `serpapi.search`
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 35/100
Research direction
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.
Written by the indexing model from the issue text.
Description
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.
- Dominant language
- Python
- Stars
- 183
- Forks
- 28
- Avg merge
- 8d 14h
- Merged PRs (30d)
- 1
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from serpapi/serpapi-python
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
serpapi/serpapi-python#54 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 55/100
serpapi/serpapi-python#53 ·
All issues in serpapi/serpapi-python
Similar issues
-
todo
Difficulty 1/5 Under an hour Newbie friendliness 72/100
tonybaloney/CSnakes#864 ·
-
infra
Difficulty 1/5 Under an hour Newbie friendliness 90/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
libre-embedded/svgen#72 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Genesis-Embodied-AI/genesis-world#3950 ·
Maintainers usually reply within 1 day
-
accessibility
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day