Ejemplo n.º 1
0
        public static void ScrappingData()
        {
            DataTable rssData    = new DataTable();
            BLLFeed   objBLLFeed = new BLLFeed();

            rssData = objBLLFeed.GetFeedUrls(0);
            if (rssData.Rows.Count > 0)
            {
                foreach (DataRow dataRow in rssData.Rows)
                {
                    ModelFeed modelFeed = new ModelFeed();
                    modelFeed.FeedURL       = dataRow["FeedURL"].ToString();
                    modelFeed.FeedTitlePath = dataRow["FeedTitlePath"].ToString();
                    modelFeed.FeedLastUpdateDateTimePath = dataRow["FeedLastUpdateDateTimePath"].ToString();
                    modelFeed.FeedCoverImagePath         = dataRow["FeedCoverImagePath"].ToString();
                    modelFeed.FeedItemsPath           = dataRow["FeedItemsPath"].ToString();
                    modelFeed.FeedShortDescPath       = dataRow["FeedShortDescPath"].ToString();
                    modelFeed.FeedDetailPageURLPath   = dataRow["FeedDetailPageURLPath"].ToString();
                    modelFeed.FeedPubDatePath         = dataRow["FeedPubDatePath"].ToString();
                    modelFeed.FeedImagePath           = dataRow["FeedImagePath"].ToString();
                    modelFeed.FeedDetailPageImagePath = dataRow["FeedDetailPageImagePath"].ToString();
                    modelFeed.FeedPostDetailsPath     = dataRow["FeedPostDetailsPath"].ToString();
                    modelFeed.FeedCategoryPath        = dataRow["FeedCategoryPath"].ToString();
                    modelFeed.FeedPostDetailsPath     = dataRow["FeedSubCategoryPath"].ToString();


                    modelFeed.FeedURL = "http://www.espncricinfo.com/rss/content/story/feeds/6.xml";
                    //List<ModelFeedsData> feedsDetailList = StartScrapper(modelFeed);
                    GetRSSFeeds(modelFeed.FeedURL);
                }
            }
        }
Ejemplo n.º 2
0
        public static void ScrappingData()
        {
            DataTable rssData    = new DataTable();
            BLLFeed   objBLLFeed = new BLLFeed();

            rssData = objBLLFeed.GetFeedUrls(2);
            if (rssData.Rows.Count > 0)
            {
                foreach (DataRow dataRow in rssData.Rows)
                {
                    ModelFeed modelFeed = new ModelFeed();
                    modelFeed.FeedURL       = dataRow["FeedURL"].ToString();
                    modelFeed.FeedTitlePath = dataRow["FeedTitlePath"].ToString();
                    modelFeed.FeedLastUpdateDateTimePath = dataRow["FeedLastUpdateDateTimePath"].ToString();
                    modelFeed.FeedCoverImagePath         = dataRow["FeedCoverImagePath"].ToString();
                    modelFeed.FeedItemsPath           = dataRow["FeedItemsPath"].ToString();
                    modelFeed.FeedShortDescPath       = dataRow["FeedShortDescPath"].ToString();
                    modelFeed.FeedDetailPageURLPath   = dataRow["FeedDetailPageURLPath"].ToString();
                    modelFeed.FeedPubDatePath         = dataRow["FeedPubDatePath"].ToString();
                    modelFeed.FeedImagePath           = dataRow["FeedImagePath"].ToString();
                    modelFeed.FeedDetailPageImagePath = dataRow["FeedDetailPageImagePath"].ToString();
                    modelFeed.FeedPostDetailsPath     = dataRow["FeedPostDetailsPath"].ToString();
                    modelFeed.FeedCategoryPath        = dataRow["FeedCategoryPath"].ToString();
                    modelFeed.FeedPostDetailsPath     = dataRow["FeedSubCategoryPath"].ToString();

                    List <ModelFeedsData> feedsDetailList = StartScrapper(modelFeed);
                }
            }
        }