web crawler robots.txt: fix bug
web crawler robots.txt: fix bug: a task in smol-software-harbor (Harbor dataset). The crawler skips pages it is allowed to fetch: allowed() in robots.py obeys the first matching rule, while robots.txt semantics (see its docstring) are: the longest matching prefix wins, Allow wins a tie, and an…
The task
The crawler skips pages it is allowed to fetch: `allowed()` in `robots.py` obeys the first matching rule, while robots.txt semantics (see its docstring) are: the longest matching prefix wins, Allow wins a tie, and an empty `Disallow:` blocks nothing. Fix it and run `python3 -m pytest -q`.
Part of efederici/smol-software-harbor.