Beispiel #1
0
        public List <int> ExtractUrlRank(SearchEngine engine, SearchParameter parameter)
        {
            List <int> result = new List <int>();

            if (engine != null)
            {
                //loop through all pages
                foreach (var currentUrl in engine.searchPages)
                {
                    var html      = HTMLLoader.LoadUrl(currentUrl);
                    var tempRanks = ExtractURLRankOnCurrentPage(html, parameter, engine);
                    //for all ranks returned in that page
                    foreach (var rank in tempRanks)
                    {
                        if (rank > 0 && rank <= 50)
                        {
                            result.Add(rank);
                        }
                    }
                }
            }
            return(result);;
        }
Beispiel #2
0
        public void InValidHTMLPageLoaderTest()
        {
            var result = HTMLLoader.LoadUrl(_generator.GenerateInvalidURL());

            Assert.IsNull(result);
        }