예제 #1
0
        public ActionResult TourResultFromFile(ParseUrlModel model)
        {
            string text = System.IO.File.ReadAllText(model.Url);

            new ForecastParser(QueryFactory, log, UnitOfWorkFactory).ParseHtml(text);
            return(new EmptyResult());
        }
예제 #2
0
        public ActionResult ParseTourFromUrl(ParseUrlModel model)
        {
            selenium = new DefaultSelenium("localhost", 4444, "*firefox", "http://localhost");
            selenium.Start();
            selenium.SetTimeout("120000");
            selenium.Open(model.Url);
            selenium.WaitForPageToLoad("60000");
            var html = selenium.GetHtmlSource();

            selenium.Stop();
            //            string html = HtmlDownloader.GetHtml(model.Url);

            string s = new ForecastParser(QueryFactory, log, UnitOfWorkFactory).ParseHtml(html, model.Url);

            return(View(new ParseUrlModel {
                Result = s
            }));
        }