Skip to content

CLI: --fetch-mode curl is advertised but rejected for place scraping #58

Description

@MozzamShahid

File / lines: src/gmaps_scraper/cli.py, lines 98-106 and 265-270

Problem: The parser accepts --fetch-mode curl and the help text presents it as a normal choice:

--fetch-mode {auto,curl,browser}
Fetch mode: auto (curl_cffi with browser fallback), curl, or browser.

But for --kind place, main() exits with an error:

if args.collection_mode == "curl":
    parser.error("Place scraping currently requires browser mode. Use `--fetch-mode browser`.")

Users discover this only after invocation.

Suggested fix:

  • Option A: Use argparse subparsers (gmaps-scraper list ... and gmaps-scraper place ...) so each subcommand exposes only valid options.
  • Option B (minimal): Update the help string for --fetch-mode to note that curl is ignored for --kind place, and reject it earlier with a clearer message.

Difficulty: medium
Impact: Medium — reduces user confusion and CLI friction.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions