8000 [Bug]: crwl -b fail · Issue #1088 · unclecode/crawl4ai · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

[Bug]: crwl -b fail #1088

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
lisuwei opened this issue May 9, 2025 · 2 comments
Open

[Bug]: crwl -b fail #1088

lisuwei opened this issue May 9, 2025 · 2 comments
Labels
💪 - Beginner Difficulty level - Beginners 🥸 - Medium Priority - Medium 🐞 Bug Something isn't working 📌 Root caused identified the root cause of bug

Comments

@lisuwei
Copy link
lisuwei commented May 9, 2025

crawl4ai version

0.6.1

Expected Behavior

Crawl4AI CLI work using -b parameter

Current Behavior

Image

Image

Is this reproducible?

Yes

Inputs Causing the Bug

Steps to Reproduce

Code snippets

OS

windows

Python version

Python 3.12.6

Browser

No response

Browser version

No response

Error logs & Screenshots (if applicable)

No response

@lisuwei lisuwei added 🐞 Bug Something isn't working 🩺 Needs Triage Needs attention of maintainers labels May 9, 2025
@aravindkarnam
Copy link
Collaborator

Root cause

Looking at the code, there are two options both using -b as their shorthand:

@click.option("--browser", "-b", ...)
@click.option("--bypass-cache", "-b", is_flag=True, ...)

When Click sees -b, it can't tell which one you mean. Since --bypass-cache is a flag that doesn't take a value, it treats everything after -b as an unexpected argument.

Suggestions

Change one of the shorthands to something else:

# Either this:
@click.option("--bypass-cache", "-bc", is_flag=True, ...)

# Or this:
@click.option("--browser", "-br", ...)

@aravindkarnam
Copy link
Collaborator

@lisuwei As you can see the error is result of a conflicting shorthand "-b" between "--browser" and "--bypass-cache". We'll fix it in the next release. In the meantime use the full form.

crwl https://example.com --browser "headless=true,viewport_width=1280,user_agent_mode=random"

@aravindkarnam aravindkarnam added 💪 - Beginner Difficulty level - Beginners 📌 Root caused identified the root cause of bug 🥸 - Medium Priority - Medium and removed 🩺 Needs Triage Needs attention of maintainers labels May 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💪 - Beginner Difficulty level - Beginners 🥸 - Medium Priority - Medium 🐞 Bug Something isn't working 📌 Root caused identified the root cause of bug
Projects
None yet
Development

No branches or pull requests

2 participants
0