Simple web crawler in C#

前端 未结 4 768
囚心锁ツ
囚心锁ツ 2020-12-04 18:55

I have created a simple web crawler but i want to add the recursion function so that every page that is opened i can get the urls in this page,but i have no idea how i can d

4条回答
  •  离开以前
    2020-12-04 19:04

    i have created something similar using Reactive Extension.

    https://github.com/Misterhex/WebCrawler

    i hope it can help you.

    Crawler crawler = new Crawler();
    
    IObservable observable = crawler.Crawl(new Uri("http://www.codinghorror.com/"));
    
    observable.Subscribe(onNext: Console.WriteLine, 
    onCompleted: () => Console.WriteLine("Crawling completed"));
    

提交回复
热议问题