Example #1
0
        void CmdBuscar_Click(object sender, EventArgs e)
        {
            IWebScrap scrapper  = new ScrapPelispedia();
            Movies    peliculas = new Movies();
            Series    series    = new Series();
            string    error     = string.Empty;

            //scrapper.scrapMovies(ref peliculas, ref error);
            scrapper.scrapSeries(ref series, ref error);


            //string    error    = "";
            //IWebScrap scrapper = new ScrapPelispedia();

            //Elements elementos = new Elements();

            //int peliculas = 0;
            //int series = 0;

            //scrapper.onError        += delegate (string texto) { MessageBox.Show(texto); };
            //scrapper.onMoviesLoad   += delegate (int count) { MessageBox.Show("Cantidad de peliculas indexadas: " + count.ToString()); peliculas = count; };
            //scrapper.onSeriesLoad   += delegate (int count) { MessageBox.Show("Cantidad de episodios indexados: " + count.ToString()); series = count; };
            //scrapper.onMovieLoad    += delegate (string nombre, int count) { MessageBox.Show(string.Format("{0}/{1} Pelicula: {2}", count, peliculas, nombre)); };
            //scrapper.onSerieLoad    += delegate (string nombre, int count) { MessageBox.Show(string.Format("{0}/{1} Episodio: {2}", count, series, nombre)); };

            //scrapper.screappear (ref elementos, ref error);

            //if (scrapper.dameCanal(ref canal_pelispedia, ref error))
            //{
            //    listBox1.Items.Clear();

            //    foreach (Channel canal in canal_pelispedia.canales)
            //        listBox1.Items.Add(canal);
            //}
        }
Example #2
0
        static void testearPelicula(string urlPelicula)
        {
            IWebScrapper scrapper = new ScrapPelispedia();

            scrapper.onLog += Scrapper_onLog;

            Sources sources = new Sources();

            scrapper.getMovieSources(urlPelicula, ref sources);

            foreach (Source s in sources)
            {
                Console.WriteLine("{0} {1}", s.name_server, s.url_source);
            }
        }
Example #3
0
        static void Main(string[] args)
        {
            // ---------------------------------------------------------------
            //testearBaseDeDatos();
            // ---------------------------------------------------------------

            // ---------------------------------------------------------------
            //testearPelicula ("https://www.pelispedia.tv/pelicula/ibiza/");
            //testearPelicula("https://www.pelispedia.tv/pelicula/entre-sombras/", "Entre Sombras");
            // ---------------------------------------------------------------

            // ---------------------------------------------------------------
            IWebScrapper scrapper = new ScrapPelispedia();

            scrapper.onLog   += Scrapper_onLog;
            scrapper.onMovie += Scrapper_onMovie;

            scrapper.scrapMovies();
            // ---------------------------------------------------------------

            Console.ReadKey();
        }