Review of Algorithm I PROCEDURE SPIDER (G) 重复搜集, Let ROOT :any URL from G 遇到回路会无限循环 Initia1 ize STACK<stack dataG如果不连通呢? Let STACK push (ROOT,STA G如果大到STACK容纳不下呢? Initialize COLLECTION <big •要控制搜集G的一部分呢? While STACK is not empty, URLeurr :pop (STACK) PAGE :look-up(URLeurr) STORE(<URLCUEE,PAGE>,COLLECTION) For every URLi in PAGE, push (URLi,STACK) Return COLLECTION Review of Algorithm I PROCEDURE SPIDER1(G) Let ROOT := any URL from G Initialize STACK <stack data structure> Let STACK := push(ROOT, STACK) Initialize COLLECTION <big file of URL-page pairs> While STACK is not empty, URLcurr := pop(STACK) PAGE := look-up(URLcurr) STORE(<URLcurr, PAGE>, COLLECTION) For every URLi in PAGE, push(URLi, STACK) Return COLLECTION •重复搜集, •遇到回路会无限循环 •G如果不连通呢? •G如果大到STACK容纳不下呢? •要控制搜集G的一部分呢?