コード例 #1
0
        /**************************************************************/
        #endregion



        private void btnCrawlWebsites_Click(object sender, EventArgs e)
        {
            #region If there are alphabeticly ordered sub-pages...
            /**********************************************************************************************************/
            //string appPath = Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location);
            //string wikipediaCategoryURLPath = string.Concat(appPath, @"\Movie URL's\US-Filme.txt");

            //// https://de.wikipedia.org/w/index.php?title=Kategorie:US-amerikanischer_Film&pagefrom=Bi";
            //string[] wikipediaCategoryURLs = File.ReadAllLines(wikipediaCategoryURLPath);

            //foreach (var wikipediaCategoryURL in wikipediaCategoryURLs)
            //{
            //    var mediaWikiMovieUrls = Crawler.ConstructMediaWikiURLs(wikipediaCategoryURL);
            //    foreach (var mediaWikiMovieUrl in mediaWikiMovieUrls)
            //    {
            //        Crawler.PersistMovieWebsite(mediaWikiMovieUrl, PathOfMovieSites);
            //    }
            //}
            /**********************************************************************************************************/
            #endregion



            #region A single movie page, for instance: https://de.wikipedia.org/wiki/Kategorie:Israelischer_Film
            /**********************************************************************************************************/
            var mediaWikiMovieUrls = Crawler.ConstructMediaWikiURLs(comboCategoryMoviesByCountry.Text);
            foreach (var mediaWikiMovieUrl in mediaWikiMovieUrls)
            {
                Crawler.PersistMovieWebsite(mediaWikiMovieUrl, PathOfMovieSites);
            }
            /**********************************************************************************************************/
            #endregion
        }