How to use the ruia.field.NothingMatchedError function in ruia

To help you get started, we’ve selected a few ruia examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github howie6879 / ruia / tests / test_field.py View on Github external
def test_text_field_not_exist():
    field = TextField(css_select="nothing matched")
    try:
        field.extract(html_etree=html_etree)
    except Exception as e:
        assert isinstance(e, NothingMatchedError)
github howie6879 / ruia / tests / test_field.py View on Github external
def test_attr_field_not_exist():
    field = TextField(css_select="nothing matched")
    try:
        field.extract(html_etree=html_etree)
    except Exception as e:
        assert isinstance(e, NothingMatchedError)