Beispiel #1
0
        public void CrawlMarketLinks()
        {
            CrawlAllMarketsData crawl     = new CrawlAllMarketsData();
            CrawlEachMarketData crawldata = new CrawlEachMarketData();
            DataTable           dt        = crawl.GetBettingMarkets();

            for (int i = 0; i < dt.Rows.Count; i++)
            {
                XmlDocument   xmldoc          = new XmlDocument();
                string        link            = dt.Rows[i]["bettinglink"].ToString();
                long          bettingmarketid = Convert.ToInt32(dt.Rows[i]["id"].ToString());
                long          matchid         = Convert.ToInt32(dt.Rows[i]["matchid"].ToString());
                List <Market> market          = CrawlMarkets(link); //, id, matchid);
                xmldoc = GenerateXml(market);
                crawldata.InsertEachMarket(xmldoc, bettingmarketid, matchid);
            }
        }
Beispiel #2
0
 public void CrawlMarkets(string bettinglink, long id, long matchid)
 {
     try
     {
         CrawlEachMarketData crawldata  = new CrawlEachMarketData();
         XmlDocument         xmldoc     = new XmlDocument();
         List <Market>       marketlist = new List <Market>();
         marketlist = GetMarketList(bettinglink, id, matchid);
         //return marketlist;
         xmldoc = GenerateXml2(marketlist);
         //crawldata.GetMarket(xmldoc,id,matchid,
         crawldata.InsertEachMarket(xmldoc);
         //return links;
     }
     catch (Exception ex)
     {
         string msg = ex.Message;
     }
 }