[Feature]: Crawl4aiDockerClient has no public option for the API token the 0.9 server requires
Los mantenedores suelen responder en 2 días
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 77/100
Línea de trabajo
Empieza por localizar la definición de Crawl4aiDockerClient y seguir cómo envía solicitudes, incluido get_schema(); comprueba si ya existen pruebas del cliente. La tarea estará completada cuando quienes lo invoquen puedan proporcionar api_token durante la inicialización y el token Bearer se envíe en cada solicitud, con pruebas que cubran tanto el rastreo como el acceso al esquema.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
crawl4ai version
0.9.5 (also on develop; since 0.9.0)
Expected Behavior
The SDK client can talk to a 0.9 server, which requires CRAWL4AI_API_TOKEN on every request.
Current Behavior
Crawl4aiDockerClient has no token option, and every request returns:
401 Authentication required
client.authenticate(email) does not help: it posts only {"email": ...} to /token, but since 0.9.0 /token also requires api_token in the body, so it returns 401 (or 403 when no token is configured).
The only working way is to set a private attribute, as deploy/docker/README.md does today:
client._token = os.environ["CRAWL4AI_API_TOKEN"]
# or
client._http_client.headers["Authorization"] = "Bearer <token>"
Is this reproducible?
Yes
Code snippets
from crawl4ai.docker_client import Crawl4aiDockerClient
async with Crawl4aiDockerClient(base_url="http://localhost:11235") as client:
await client.crawl(["https://example.com"])
# RequestError: Server error 401: Authentication required
Proposed fix
Add api_token: Optional[str] = None to Crawl4aiDockerClient.__init__ and send it as Authorization: Bearer <token> on every request. With the private _token workaround the header is set only inside crawl(), so get_schema() still returns 401. I'll open a PR.
The broken authenticate() is left for a separate change.
OS
macOS 26.6 (platform-independent)
Python version
3.13
- Lenguaje dominante
- Python
- Estrellas
- 86.8k
- Forks
- 9k
- Merge medio
- 2 d 3 h
- PR fusionados (30 d)
- 26
Preparar el entorno
- Incluye un Dockerfile o un 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 unclecode/crawl4ai
-
[Bug]: Hardened docker-compose (read_only) keeps full Chromium from starting: crashpad needs a writable ~/.configPosiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
Los mantenedores suelen responder en 2 días
-
⚙ Done 🐞 Bug 📌 Root caused
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 2 días
-
[Bug]: PDF images saved with save_images_locally=True come back with an empty src in result.mediaPosiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abierto🐞 Bug 🩺 Needs Triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 2 días
-
🐞 Bug 🩺 Needs Triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
unclecode/crawl4ai#2416 · 2 comentarios ·
Los mantenedores suelen responder en 2 días
-
⚙ Done 🐞 Bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
unclecode/crawl4ai#2382 · 2 comentarios ·
Los mantenedores suelen responder en 2 días
Todos los issues de unclecode/crawl4ai
Issues similares
-
bug ready-for-dev
Dificultad 1/5 1-3 horas Aptitud para principiantes 92/100
OpenHands/extensions#897 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
tensorflow/datasets#11253 ·
Los mantenedores suelen responder en 1 día
-
fix(core): a config section with all keys commented out crashes startupPosiblemente ocupada @Aryanbhargava18 la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
kubeflow/mcp-server#512 ·
Los mantenedores suelen responder en 1 día
-
Stop trusting the compromised eMudhra CA certificatesPosiblemente ocupada @anth-volk la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
PolicyEngine/uk-triple-lock#54 ·
Los mantenedores suelen responder en 1 día
-
DBFS append mode silently overwrites existing filesPosiblemente ocupada @IlyaKhalafi la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 77/100
fsspec/filesystem_spec#2429 ·
Los mantenedores suelen responder en 1 día