Make `async: True` batch searches work out of the box
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 55/100
Línea de trabajo
Start by reading the implementations of Client.search and Client.search_archive, then check the README examples. Decide whether the contribution will add a helper that submits, polls, and re-queues searches or document that workflow. Done means bulk async searches can be handled with less setup, and archive polling does not reuse the initial search parameters such as q.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Moved from the deprecated google-search-results-python package: https://github.com/serpapi/google-search-results-python/issues/51 (originally reported by dimitryzub).
Original request
From a user perspective, the less setup required the better. [...] The user has to just add an
async: Trueand don't bother tinkering/figuring out stuff for another ~hour about howQueueor something else works.
Today, running async searches in bulk means submitting each search with async: True, keeping the search IDs in a queue, polling the Search Archive API, and re-queueing searches that aren't finished (status other than Cached or Success).
Applies to serpapi-python: Client.search and Client.search_archive expose the building blocks, but the queue and polling logic is left to the user and the README has no helper or example for it.
Proposal: a helper that does this under the hood. The original issue suggested an API along these lines (adapted to the new client):
import serpapi
client = serpapi.Client(api_key="...")
# hypothetical API
results = client.async_search(
queries=["burly", "creator", "doubtful", "minecraft"],
engine="youtube",
device="desktop",
)
Alternatively, a documented README example of the submit, poll and re-queue loop would already help.
One thing to keep in mind from the original thread: when polling the archive, don't reuse the params from the initial search, because passing q to the Search Archive API returns an error.
- Lenguaje dominante
- Python
- Estrellas
- 183
- Forks
- 28
- Merge medio
- 8 d 14 h
- PR fusionados (30 d)
- 1
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de serpapi/serpapi-python
-
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
serpapi/serpapi-python#54 ·
-
improvement
Dificultad 3/5 1-2 días Aptitud para principiantes 35/100
serpapi/serpapi-python#17 · 2 comentarios · 1 reacción ·
Todos los issues de serpapi/serpapi-python
Issues similares
-
todo
Dificultad 1/5 Menos de una hora Aptitud para principiantes 72/100
tonybaloney/CSnakes#864 ·
-
infra
Dificultad 1/5 Menos de una hora Aptitud para principiantes 90/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
libre-embedded/svgen#72 · 1 comentario ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Genesis-Embodied-AI/genesis-world#3950 ·
Los mantenedores suelen responder en 1 día
-
accessibility
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día