Beispiel #1
0
        public async Task <string> Get(CrawlWiproFormModel model)
        {
            var crawler = new Crawler(model.url, model.depth);
            var result  = await crawler.GetAllPageLinksAsync(model.url, true);

            var json = JsonConvert.SerializeObject(result);

            return(json);
        }
Beispiel #2
0
        public async Task <ActionResult> CrawlWiproAsync(CrawlWiproFormModel model)
        {
            //default to wiprodigital.com
            if (string.IsNullOrEmpty(model.url))
            {
                model.url = "https://wiprodigital.com";
            }

            //start crawler
            var crawler = new Crawler(model.url, model.depth);
            var result  = await crawler.GetAllPageLinksAsync(model.url, true);

            return(View(result.ToList()));
        }
Beispiel #3
0
        public IActionResult CrawlWipro(CrawlWiproFormModel model)
        {
            //default to wiprodigital.com
            if (string.IsNullOrEmpty(model.url))
            {
                model.url = "https://wiprodigital.com";
            }

            //start crawler
            var crawler = new Crawler(model.url, model.depth);
            var result  = crawler.ExtractAll(model.url, true).ToList();

            return(View(result));
        }