| 11 | # Anything that is not HTML (e.g., a JPEG file) is passed to Crawler.fail(). |
| 12 | |
| 13 | class 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. |
no outgoing calls
no test coverage detected
searching dependent graphs…