MCPcopy
hub / github.com/scrapy/scrapy / rel_has_nofollow

Function rel_has_nofollow

scrapy/utils/misc.py:163–165  ·  view source on GitHub ↗

Return True if link rel attribute has nofollow type

(rel: str | None)

Source from the content-addressed store, hash-verified

161
162
163def rel_has_nofollow(rel: str | None) -> bool:
164 """Return True if link rel attribute has nofollow type"""
165 return rel is not None and "nofollow" in rel.replace(",", " ").split()
166
167
168class SupportsFromCrawler(Protocol[_T_co, _P]):

Callers 2

_extract_linksMethod · 0.90
test_rel_has_nofollowMethod · 0.90

Calls 1

replaceMethod · 0.45

Tested by 1

test_rel_has_nofollowMethod · 0.72

Used in the wild real call sites across dependent graphs

searching dependent graphs…