Source

psilib / test_spider.py

Full commit
import spider
from pprint import pprint

if __name__ == '__main__':
    a = spider.ftpurls('ftp://localhost/')
    print 1; pprint(a)
    a = spider.ftppaths('ftp://localhost')
    print 2; pprint(a)
    a = spider.weburls('http://localhost/')
    print 3; pprint(a)
    a = spider.weburls('http://localhost/', 200, 5, 3)
    print 4; pprint(a)
    spider.ftpmirror('e:\\ftp\\', 14, 'ftp://localhost/')
    a = spider.ftpspider('ftp://localhost/')
    print 5; pprint(a)
    a = spider.webpaths('http://localhost/')
    print 6; pprint(a)
    spider.webreport('e:\\web1.txt', 'http://localhost/')
    spider.webmirror('e:\\web\\', 18, 'http://localhost/')
    a = spider.webspider('http://localhost/')
    print 7; pprint(a)
    spider.urlreport('e:\\web2.txt', 'http://localhost/',)
    spider.badurlreport('e:\\web3.txt', 'http://localhost/')
    spider.badhtmreport('e:\\web4.txt', 'http://localhost/')
    spider.redireport('e:\\web5.txt', 'http://localhost/')
    spider.outreport('e:\\web6.txt', 'http://localhost')
    spider.othereport('e:\\web7.txt', 'http://localhost/')
    a = spider.Spider('ftp://localhost/', 200, 16)
    a.ftppaths()
    print 1; pprint(a.paths)
    a.ftpurls()
    print 2; pprint(a.urls)
    a.ftpspider()
    print 3; pprint(a.urls); pprint(a.paths)
    a.ftpmirror('e:\\ftp\\', 7)
    a = spider.Spider('http://localhost/', 200, 16)
    a.weburls()
    print 4; pprint(a.urls)
    a.webpaths()
    print 5; pprint(a.paths)
    a.webspider()
    print 6; pprint(a.urls); pprint(a.paths)
    a.webmirror('e:\\web\\', 18)
    a.webreport('e:\\web1.txt')
    a.urlreport('e:\\web2.txt')
    a.badurlreport('e:\\web3.txt')
    a.badhtmreport('e:\\web4.txt')
    a.redireport('e:\\web5.txt')
    a.outreport('e:\\web6.txt')
    a.othereport('e:\\web7.txt')