def crawl(links=[], domains=[], delay=20.0, parse=HTMLLinkParser().parse, sort=FIFO, method=DEPTH, **kwargs):
 crawler = Crawler(links, domains, delay, parse, sort)
 bind(crawler, 'visit', (lambda crawler, link, source=None: setattr(crawler, 'crawled', (link, source))))
 while (not crawler.done):
  crawler.crawled = (None, None)
  crawler.crawl(method, **kwargs)
  (yield crawler.crawled)

def crawl ( links = [ ] , domains = [ ] , delay = 20.0 , parse = HTMLLinkParser ( ) . parse , sort = FIFO , method = DEPTH , ** kwargs ) : crawler = Crawler ( links , domains , delay , parse , sort ) bind ( crawler , 'visit' , ( lambda crawler , link , source = None : setattr ( crawler , 'crawled' , ( link , source ) ) ) ) while ( not crawler . done ) : crawler . crawled = ( None , None ) crawler . crawl ( method , ** kwargs ) ( yield crawler . crawled )
returns a generator that yields -tuples of visited pages .