Пример #1
0
        static string ObtenerEmbed(string url)
        {
            if (url.IndexOf("..") > -1)
            {
                url = url.Replace("..", "http://www.cinetube.es");
            }
            string codigo = MiembrosEstaticos.DescargarCadena(new Uri(url), null), referencia = null;

            if (codigo.IndexOf("http://www.megavideo.com/?v") > -1)
            {
                referencia = MiembrosEstaticos.Extraer(codigo, "http://www.megavideo.com/?v=", "&", 0);
            }
            else if (codigo.IndexOf("http://www.megavideo.com/?d") > -1)
            {
                referencia = MiembrosEstaticos.Extraer(codigo, "http://www.megavideo.com/?d=", "&", 0);
            }
            //src="http://www.megavideo.com/v/5OV0FH592bc4aa85291ad53c2f82b7f9e94b104c" type=
            else if (codigo.IndexOf("http://www.megavideo.com/v") > -1)
            {
                referencia = MiembrosEstaticos.Extraer(codigo, "http://www.megavideo.com/v/", "\"", 0);
            }
            //http://www.megavideo.com/?s=cinetube.es&v=5OV0FH59&k
            else if (codigo.IndexOf("megavideo.com/?s") > -1)
            {
                referencia = MiembrosEstaticos.Extraer(codigo, "megavideo.com/?s=cinetube.es&v=", "&", 0);
            }

            Console.WriteLine("referencia:" + referencia);
            return("http://www.megavideo.com/v/" + referencia);
        }
Пример #2
0
        private void button2_Click(object sender, EventArgs e)
        {
            string texto = textBox1.Text.Replace("ñ", "n").Replace("´", "a").Replace("¡", "").Replace(" ", "").Replace("´", "").Replace(";s", "").Replace("¡", "").Replace("½", "").Replace("¿", "").Replace("’", "").Replace(";&", "").Replace("p;", "").Replace("l;", "").Replace("s);", "s").Replace("):", "");
            int    i     = 0;

            while (true)
            {
                try
                {
                    i++;
                    string s = MiembrosEstaticos.Extraer(texto, "INSERT", "');", i);
                    string x = "INSERT" + s + "')";
                    x = x.Replace(";", "");
                    string strConexion = "Provider=Microsoft.Jet.OLEDB.4.0;" +
                                         "Data Source=./Pelis.mdb";
                    OleDbConnection conexion = new OleDbConnection(strConexion);
                    conexion.Open();
                    OleDbDataAdapter adaptador = new OleDbDataAdapter();
                    adaptador.SelectCommand = new OleDbCommand(x, conexion);
                    DataSet conjunto = new DataSet();
                    adaptador.Fill(conjunto);
                    conexion.Close();
                }
                catch
                {
                    continue;
                }
            }
        }
Пример #3
0
        static string ObtenerWuapi(string url)
        {
            if (url.IndexOf("..") > -1)
            {
                url = url.Replace("..", "http://www.cinetube.es");
            }
            string codigo = MiembrosEstaticos.DescargarCadena(new Uri(url), null);
            string enl    = MiembrosEstaticos.Extraer(codigo, "enlce\" --><a href=\"", "\" target=\"_blank\" class=\"more_link\">pincha aqu", 0);

            Console.WriteLine("enlace Wuapi: " + enl);
            return(enl);
        }
Пример #4
0
        static string ObtenerVeoh(string url)
        {
            if (url.IndexOf("..") > -1)
            {
                url = url.Replace("..", "http://www.cinetube.es");
            }
            string codigo = MiembrosEstaticos.DescargarCadena(new Uri(url), null);
            string embed2 = null;

            if (codigo.ToLower().IndexOf("parte 1") > -1)
            {
                string cod = MiembrosEstaticos.Extraer(codigo, "videodetailsembedded&amp;videoAutoPlay=0&amp;type=v&amp;permalinkId=", "&amp;id", 1);
                embed2 = "http://www.veoh.com/browse/videos/category/educational/watch/" + cod;
                Console.WriteLine("Parte 1: " + cod);
            }
            if (codigo.ToLower().IndexOf("parte 2") > -1)
            {
                string cod = MiembrosEstaticos.Extraer(codigo, "videodetailsembedded&amp;videoAutoPlay=0&amp;type=v&amp;permalinkId=", "&amp;id", 2);
                embed2 += "http://www.veoh.com/browse/videos/category/educational/watch/" + cod + ",";
                Console.WriteLine("parte 2: " + cod);
            }
            if (codigo.ToLower().IndexOf("parte 3") > -1)
            {
                string cod = MiembrosEstaticos.Extraer(codigo, "videodetailsembedded&amp;videoAutoPlay=0&amp;type=v&amp;permalinkId=", "&amp;id", 3);
                embed2 += "http://www.veoh.com/browse/videos/category/educational/watch/" + cod + ",";
                Console.WriteLine("parte 3: " + cod);
            }
            if (codigo.ToLower().IndexOf("parte 4") > -1)
            {
                string cod = MiembrosEstaticos.Extraer(codigo, "videodetailsembedded&amp;videoAutoPlay=0&amp;type=v&amp;permalinkId=", "&amp;id", 4);
                embed2 += "http://www.veoh.com/browse/videos/category/educational/watch/" + cod + ",";
                Console.WriteLine("parte 4: " + cod);
            }
            if (codigo.ToLower().IndexOf("parte 5") > -1)
            {
                string cod = MiembrosEstaticos.Extraer(codigo, "videodetailsembedded&amp;videoAutoPlay=0&amp;type=v&amp;permalinkId=", "&amp;id", 5);
                embed2 += "http://www.veoh.com/browse/videos/category/educational/watch/" + cod + ",";
                Console.WriteLine("parte 5: " + cod);
            }
            if (codigo.ToLower().IndexOf("parte 6") > -1)
            {
                string cod = MiembrosEstaticos.Extraer(codigo, "videodetailsembedded&amp;videoAutoPlay=0&amp;type=v&amp;permalinkId=", "&amp;id", 6);
                embed2 += "http://www.veoh.com/browse/videos/category/educational/watch/" + cod;
                Console.WriteLine("parte 6: " + cod);
            }
            return(embed2);
        }
Пример #5
0
        static string ObtnerIndice(string url)
        {
            string subEmbed = null;
            string enlace   = url.Substring(url.LastIndexOf("/") + 1);

            //../subindices/i60segundos.html
            enlace = "http://www.cinetube.es/subindices/i" + enlace;
            string codigo = MiembrosEstaticos.DescargarCadena(new Uri(enlace), null);
            int    i      = 1;

            while (true)
            {
                enlace = MiembrosEstaticos.Extraer(codigo, "<a href=\"", "\" target=", i);
                string servidor = MiembrosEstaticos.Extraer(codigo, "Estilo17 Estilo16\">", "</a>", i++);
                if (servidor == null)
                {
                    break;
                }
                Console.WriteLine("Servidor: " + servidor);
                Console.WriteLine("Enlace: " + enlace);
                servidor = servidor.Substring(servidor.IndexOf("("));
                if (servidor.IndexOf("megavideo") > -1)
                {
                    subEmbed += ObtenerEmbed(enlace) + ",";
                    Servidor  = "1";
                }
                else if (servidor.IndexOf("veoh") > -1)
                {
                    subEmbed += ObtenerVeoh(enlace) + ",";
                    Servidor  = "2";
                }
                else if (servidor.ToLower().IndexOf("wuapi") > -1)
                {
                    subEmbed += ObtenerWuapi(enlace) + ",f";
                    Servidor  = "2";
                }
            }

            return(subEmbed);
        }
Пример #6
0
        static string[] Embed(string url)
        {
            string[] x      = new String[2];
            string   codigo = MiembrosEstaticos.DescargarCadena(new Uri(url), null);

            if ((codigo.ToLower().IndexOf("megavdeo") > -1) || (codigo.ToLower().IndexOf("megavideo-logo") > -1) || (codigo.ToLower().IndexOf("http://www.megavideo.com") > -1))
            {
                string cod = MiembrosEstaticos.Extraer(codigo, "src=\"http://www.megavideo.com/v/", "\" type=", 0);
                x[0] = "<object width=\"425\" height=\"350\"><param name=\"movie\" value=\"http://www.megavideo.com/v/" + cod + "\"></param><param name=\"allowFullScreen\" value=\"true\"></param><embed src=\"http://www.megavideo.com/v/" + cod + "\" type=\"application/x-shockwave-flash\" allowfullscreen=\"true\" width=\"425\" height=\"350\"></embed></object>";
                x[1] = "1";
                return(x);
            }
            else if (codigo.ToLower().IndexOf("<br /><br /><embed src=\"http://www.veoh.com/veohplayer.swf?permalinkid=") > -1)
            {
                string cod = MiembrosEstaticos.Extraer(codigo, "<br /><br /><embed src=\"http://www.veoh.com/veohplayer.swf?permalinkid=", "&id=anonymous", 0);
                x[0] = "<embed src=\"http://www.veoh.com/veohplayer.swf?permalinkId=" + cod + "&id=anonymous&player=videodetailsembedded&videoAutoPlay=0\" allowFullScreen=\"true\" width=\"425\" height=\"350\" bgcolor=\"#FFFFFF\" type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\"></embed>";
                x[1] = "2";
                return(x);
            }
            else if (codigo.ToLower().IndexOf("http://www.newcineonline.com/veoh-logo.jpg") > -1)
            {
                if (codigo.IndexOf("PARTE 1<br />") > -1)
                {
                    string cod = MiembrosEstaticos.Extraer(codigo, "PARTE 1<br /><embed src=\"http://www.veoh.com/veohplayer.swf?player=videodetailsembedded&videoAutoPlay=0&type=v&permalinkId=", "&id=", 0);
                    x[0] = "<embed src=\"http://www.veoh.com/veohplayer.swf?permalinkId=" + cod + "&id=anonymous&player=videodetailsembedded&videoAutoPlay=0\" allowFullScreen=\"true\" width=\"425\" height=\"350\" bgcolor=\"#FFFFFF\" type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\"></embed>";
                    x[1] = "2";
                }
                if (codigo.IndexOf("PARTE 2<br />") > -1)
                {
                    string cod = MiembrosEstaticos.Extraer(codigo, "PARTE 2<br /><embed src=\"http://www.veoh.com/veohplayer.swf?player=videodetailsembedded&videoAutoPlay=0&type=v&permalinkId=", "&id=", 0);
                    x[0] += "<br><br><embed src=\"http://www.veoh.com/veohplayer.swf?permalinkId=" + cod + "&id=anonymous&player=videodetailsembedded&videoAutoPlay=0\" allowFullScreen=\"true\" width=\"425\" height=\"350\" bgcolor=\"#FFFFFF\" type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\"></embed>";
                }
                if (codigo.IndexOf("PARTE 3<br />") > -1)
                {
                    string cod = MiembrosEstaticos.Extraer(codigo, "PARTE 3<br /><embed src=\"http://www.veoh.com/veohplayer.swf?player=videodetailsembedded&videoAutoPlay=0&type=v&permalinkId=", "&id=", 0);
                    x[0] += "<br><br><embed src=\"http://www.veoh.com/veohplayer.swf?permalinkId=" + cod + "&id=anonymous&player=videodetailsembedded&videoAutoPlay=0\" allowFullScreen=\"true\" width=\"425\" height=\"350\" bgcolor=\"#FFFFFF\" type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\"></embed>";
                }
                if (codigo.IndexOf("PARTE 4<br />") > -1)
                {
                    string cod = MiembrosEstaticos.Extraer(codigo, "PARTE 4<br /><embed src=\"http://www.veoh.com/veohplayer.swf?player=videodetailsembedded&videoAutoPlay=0&type=v&permalinkId=", "&id=", 0);
                    x[0] += "<br><br><embed src=\"http://www.veoh.com/veohplayer.swf?permalinkId=" + cod + "&id=anonymous&player=videodetailsembedded&videoAutoPlay=0\" allowFullScreen=\"true\" width=\"425\" height=\"350\" bgcolor=\"#FFFFFF\" type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\"></embed>";
                }
                if (codigo.IndexOf("PARTE 5<br />") > -1)
                {
                    string cod = MiembrosEstaticos.Extraer(codigo, "PARTE 53<br /><embed src=\"http://www.veoh.com/veohplayer.swf?player=videodetailsembedded&videoAutoPlay=0&type=v&permalinkId=", "&id=", 0);
                    x[0] += "<br><br><embed src=\"http://www.veoh.com/veohplayer.swf?permalinkId=" + cod + "&id=anonymous&player=videodetailsembedded&videoAutoPlay=0\" allowFullScreen=\"true\" width=\"425\" height=\"350\" bgcolor=\"#FFFFFF\" type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\"></embed>";
                }
                if (x[0] != null)
                {
                    return(x);
                }
            }
            else if (codigo.IndexOf("wuapi-logo.jpg") > -1)
            {
                x[0] = "false";
                x[1] = "";
                return(x);
            }
            else if (codigo.IndexOf("http://stagevu.com/video") > -1)
            {
                //http://stagevu.com/video/fjdqvridcume
                string enlace = codigo.Substring(codigo.IndexOf("http://stagevu.com/video/") + "http://stagevu.com/video/".Length, 12);
                x[0] = "<a href=http://stagevu.com/video/" + enlace + ">Ver online</a>";
                x[1] = "2";
                return(x);
            }
            else if (codigo.IndexOf("http://www.zshare.net/video/") > -1)
            {
                //http://www.zshare.net/video/5637331209c2cf02/
                string enlace = codigo.Substring(codigo.IndexOf("http://www.zshare.net/video/") + "http://www.zshare.net/video/".Length, 16);
                x[0] = "<a href=http://www.zshare.net/video/" + enlace + ">Ver online</a>";
                x[1] = "2";
                return(x);
            }
            //http://www.tu.tv/
            else if (codigo.IndexOf("http://www.tu.tv/tutvweb.swf") > -1)
            {
                //value="http://www.tu.tv/tutvweb.swf?kpt=aHR0cDovL3d3dy50dS50di92aWRlb3Njb2RpL24vYS9uYXppcy11bi1hdmlzby1kZS1sYS1oaXN0b3JpYS0xLTYtbGEtbC5mbHY=&amp
                string enlace = codigo.Substring(codigo.IndexOf("http://www.tu.tv/tutvweb.swf?kpt=") + "http://www.tu.tv/tutvweb.swf?kpt=".Length, "aHR0cDovL3d3dy50dS50di92aWRlb3Njb2RpL24vYS9uYXppcy11bi1hdmlzby1kZS1sYS1oaXN0b3JpYS0xLTYtbGEtbC5mbHY".Length);
                x[0] = "<a href=http://www.tu.tv/tutvweb.swf?kpt=" + enlace + ">Ver online</a>";
                x[1] = "2";
                return(x);
            }
            else if (codigo.IndexOf("http://beta.vreel.net/") > -1)
            {
                x[0] = "false";
                x[1] = "";
                return(x);
            }
            else
            {
                Console.WriteLine("Se encontro un codigo que no es de Megavideo");
                Console.ReadLine();
            }
            return(null);
        }
Пример #7
0
        static void Obtener()
        {
            Ultima();
            bool       x = false;
            string     codigo = MiembrosEstaticos.DescargarCadena(new Uri("http://www.cinetube.es/subindices/inovedades.html"), null);
            string     imagen = null, enlace = null, titulo, descripcion, embed = null;
            int        i          = 1;
            Analizador analizador = new Analizador("http://www.cinetube.es/subindices/inovedades.html");

            MiembrosEstaticos.AvanzarA(analizador.html, "table", "class", "sample");
            int ch;

            while ((ch = analizador.html.Read()) != -1)
            {
                if (ch == 0)
                {
                    if (analizador.html.Tag.Name == "img" && imagen == null)
                    {
                        imagen = analizador.html.Tag["src"];
                        Console.WriteLine("Imagen: " + imagen);
                    }
                    if (analizador.html.Tag.Name == "a" && enlace == null)
                    {
                        Servidor = "1";
                        enlace   = analizador.html.Tag["href"];
                        if (enlace != ultima && !x)
                        {
                            string strConexion = "Provider=Microsoft.Jet.OLEDB.4.0;" +
                                                 "Data Source=./Pelis.mdb";
                            OleDbConnection conexion = new OleDbConnection(strConexion);
                            conexion.Open();
                            OleDbDataAdapter adaptador = new OleDbDataAdapter("UPDATE CineTube " +
                                                                              "SET ultima = '" + enlace + "' WHERE id = 1", conexion);
                            DataSet conjunto = new DataSet();
                            adaptador.Fill(conjunto);
                            conexion.Close();
                            x = true;
                        }
                        if (enlace == ultima)
                        {
                            break;
                        }
                        Console.WriteLine("Enlace: " + enlace);
                        if (enlace.IndexOf("online") > -1)
                        {
                            embed = ObtenerEmbed(enlace);
                        }
                        else if (enlace.IndexOf("indices") > -1)
                        {
                            embed = ObtnerIndice(enlace);
                        }
                        Console.WriteLine("Embed: " + embed);
                        titulo = MiembrosEstaticos.Extraer(codigo, "more_link Estilo17 Estilo16\">", "</a>", i);
                        titulo = titulo[0].ToString().ToUpper() + titulo.Substring(1);
                        titulo = MiembrosEstaticos.tituloAmigable(titulo);
                        Console.WriteLine("Titulo: " + titulo);

                        // No olvidar el i++
                        descripcion = MiembrosEstaticos.Extraer(codigo, "class=\"cover\" align=\"left\">SINOPSIS: ", "</div>", i++).Replace("á", "a").Replace("é", "e").Replace("í", "i").Replace("ó", "o").Replace("ú", "u").Replace("ñ", "n").Replace("É", "E").Replace("Á", "A").Replace("Í", "Í").Replace("Ó", "O").Replace("Ú", "Ú").Replace("'", "").Replace(",", "");
                        descripcion = descripcion[0].ToString().ToUpper() + descripcion.Substring(1);
                        MiembrosEstaticos.DescargarBinario(new Uri(imagen), "./imagenes/" + titulo + ".jpg");
                        if (embed != null)
                        {
                            Clases.Añadir(titulo, "17", titulo + ".jpg", embed, Servidor, descripcion);
                        }

                        imagen = enlace = titulo = descripcion = embed = null;
                        MiembrosEstaticos.Avanzar(analizador.html, "tr", 0);
                    }
                }
            }
        }