MCPcopy Index your code
hub / github.com/clips/pattern / normalize

Method normalize

pattern/web/__init__.py:3222–3228  ·  view source on GitHub ↗

Called from Crawler.crawl() to normalize URLs. For example: return url.split("?")[0]

(self, url)

Source from the content-addressed store, hash-verified

3220 return False
3221
3222 def normalize(self, url):
3223 """ Called from Crawler.crawl() to normalize URLs.
3224 For example: return url.split("?")[0]
3225 """
3226 # All links pass through here (visited or not).
3227 # This can be a place to count backlinks.
3228 return url
3229
3230 def follow(self, link):
3231 """ Called from Crawler.crawl() to determine if it should follow this link.

Callers 2

crawlMethod · 0.95
test_normalizeMethod · 0.45

Calls

no outgoing calls

Tested by 1

test_normalizeMethod · 0.36