Anyone have a example to deploy a web crawler ??
this is correct ?? : form pattern.web import Spider
???
Please give a minimal example to do this, Thank You!!!! :D
This is the code I found:
from pattern.web import Spider
class Spiderling(Spider):
def visit(self, link, source=None):
print 'visited:', repr(link.url), 'from:', link.referrer
def fail(self, link):
print 'failed:', repr(link.url)
s = Spiderling(links=['
http://www.clips.ua.ac.be/'], delay=5,
queue=True)
while not s.done:
s.crawl(method=DEPTH, cached=False, throttle=5)