Skip to content

✨ Use fnmatch

Compare
Choose a tag to compare
@roniemartinez roniemartinez released this 29 Mar 19:23
· 390 commits to master since this release
0.14.0
3f76a0f

What's Changed

Other

fnmatch: URL pattern matcher now uses Unix style wildcards (fnmatch) instead of regex

See: https://docs.python.org/3/library/fnmatch.html

Wildcards are easier to understand and simpler to use compared to regular expressions

- @select(css=".title", url=r".*\.com")
+ @select(css=".title", url="*.com/*")
def result_title(element):
    return {"title": element.text_content()}

Full Changelog: 0.13.0...0.14.0