Skip to content

[BUG] CSS selector parse error message is cryptic #1265

@eureka0928

Description

@eureka0928

Project

cortex

Description

When using an invalid CSS selector with --selector, the error message includes internal parser error types.

Error Message

Error: Invalid CSS selector: UnexpectedSelectorParseError(NoQualifiedNameInAttributeSelector(SquareBracketBlock))

Debug Logs

System Information

Windows 10/11
Version Tested: v0.1.1

Screenshots

No response

Steps to Reproduce

  1. Run cortex scrape --selector "invalid[[[" https://example.com

Expected Behavior

Error: Invalid CSS selector syntax: unclosed bracket in "invalid[[["

Actual Behavior

Error: Invalid CSS selector: UnexpectedSelectorParseError(NoQualifiedNameInAttributeSelector(SquareBracketBlock))

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    validValid issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions