MCPcopy Create free account
hub / github.com/clips/pattern / SimpleCrawler1

Class SimpleCrawler1

examples/01-web/13-crawler.py:13–19  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

11# Anything that is not HTML (e.g., a JPEG file) is passed to Crawler.fail().
12
13class SimpleCrawler1(Crawler):
14
15 def visit(self, link, source=None):
16 print "visiting:", link.url, "from:", link.referrer
17
18 def fail(self, link):
19 print "failed:", link.url
20
21# Create a new crawler.
22# 1) The links parameter is a list of URL's to visit.

Callers 1

13-crawler.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…