Example #1
0
        private static FinalData Process_upBom(string dl)
        {
            //http://upbom.com/o8k4hok4rscc/PH46.Transcendence_2014.mp4.html
            //Get  POST POST
            FinalData f = new FinalData(dl);

            f.ResponseData = Requestor.Get(dl);

            string id_parameter = "";

            while (f.ResponseData.RequiresReplay)
            {
                f.ResponseData = Requestor.Get(dl);
            }
            string patrn_id = "<input type=\"hidden\" name=\"id\" value=\"";

            if (f.ResponseData.body.Contains(patrn_id))
            {
                ////Extract file name
                //string[] x = f.ResponseData.body.Split(new string[] { patrn_fname }, StringSplitOptions.RemoveEmptyEntries);
                //string [] x2 = x[3 - 2].Split('"');
                //f.Parametrs.Add("fname", x2[0]);

                //Extract id
                string[] id_slices  = f.ResponseData.body.Split(new string[] { patrn_id }, StringSplitOptions.RemoveEmptyEntries);
                string[] id2_slices = id_slices[3 - 2].Split('"');
                id_parameter = id2_slices[0];
            }

            ///Post
            /// op=download2&id=o8k4hok4rscc
            ///
            string body = "op=download2&id=" + id_parameter;

            f.ResponseData = Requestor.POST(dl, body);

            while (f.ResponseData.RequiresReplay)
            {
                f.ResponseData = Requestor.POST(dl, body);
            }

            string direct_patrn = "This direct link will be available for your IP next 8 hours<br><br>";

            if (f.ResponseData.body.Contains(direct_patrn))
            {
                string[] slices = f.ResponseData.body.Split(new string[] { direct_patrn }, StringSplitOptions.RemoveEmptyEntries);
                string   c      = slices[3 - 2];
                string[] vex    = c.Split(new string[] { "href=\"", "\">" }, StringSplitOptions.RemoveEmptyEntries);
                if (vex.Length > 2)
                {
                    if (vex[2].StartsWith("http"))
                    {
                        f.DirectStreamList.Add(vex[2]);
                    }
                }
            }

            return(f);
        }
Example #2
0
        internal static FinalData ProcessCima4U(string p)
        {
            FinalData f = new FinalData(p);

            if (p.Length < 4)
            {
                f.Error       = true;
                f.erroMessage = "invalid url";
                return(f);
            }
            ///one
            int  red     = 0;
            bool Relooop = true;

            while (Relooop)
            {
                Relooop        = false;
                f.ResponseData = Requestor.Get(f.ResponseData.FirstUrl);
                // if live
                string ptx = "<meta itemprop=\"embedURL\" content=\"";
                if (f.ResponseData.body.Contains(ptx) && f.ResponseData.FirstUrl.EndsWith("/"))
                {
                    string[] xc = f.ResponseData.body.Split(new string[] { ptx }, StringSplitOptions.RemoveEmptyEntries);
                    string   u  = "";
                    foreach (string s in xc)
                    {
                        if (s.StartsWith("http"))
                        {
                            if (s.Contains('"'))
                            {
                                u = s.Split('"')[0];
                            }
                        }
                    }

                    f.ResponseData = Requestor.Get(u);
                }
                ///two
                while (f.ResponseData.redirectedTo.Length > 2 && red < 9 || f.ResponseData.IsTimeOutError())
                {
                    red++;
                    f.ResponseData = Requestor.Get(f.ResponseData.redirectedTo);
                }
                // Check if is movie  series
                // http://cima4u.tv/ old/rel110.html http://cima4u.tv /rel110.html
                if (f.ResponseData.FirstUrl.Contains("/old/rel") || f.ResponseData.FirstUrl.Contains(".tv/rel"))
                {
                    string   current = CurrenUriDirectory(f.ResponseData.FirstUrl);
                    string   ptrn    = "html' class='title_a'>";
                    string[] arx     = f.ResponseData.body.Split(new string[] { ptrn }, StringSplitOptions.RemoveEmptyEntries);
                    string   url     = "";
                    foreach (string a in arx)
                    {
                        if (a.EndsWith("."))
                        {
                            if (a.Contains("'"))
                            {
                                string[] zd  = a.Split('\'');
                                string   org = zd[zd.Length - 3 + 2];
                                url = current + org + "html";
                                break;
                            }
                        }
                    }
                    f.ResponseData = Requestor.Get(url);
                }
                //                  extract from old
                //<meta http-equiv='refresh' content='5;url=cima4u.tv/online/?p=4262' />
                if (f.ResponseData.body.Contains("' class='results_link'><div class='click_to_dwn'></div></a>"))
                {
                    string[] ops = f.ResponseData.body.Split(new string[] { "'><div class='click_to_dwn'></div></a>", /*"href='"*/ }, StringSplitOptions.RemoveEmptyEntries);
                    if (ops[0].Contains("<a href='"))
                    {
                        string first = ops[0];
                        if (first.EndsWith("' class='results_link"))
                        {
                            first = first.Substring(0, first.Length - "' class='results_link".Length);
                        }
                        string[] tmp = first.Split(new string[] { "<a href='" }, StringSplitOptions.RemoveEmptyEntries);

                        f.List.Clear();
                        // for (int l = 0; l < ops.Length; l++)
                        //  {
                        string sxx = "http://cima4u.tv/" + System.Uri.EscapeDataString(tmp[tmp.Length - 3 + 2]);
                        f.List.Add(sxx);
                        //   }
                    }
                }
                if (f.List.Count > 0)
                {
                    f.ResponseData = Requestor.Get(f.List[0], true);
                }

                string pt = "/span><a href='";
                string p2 = "";
                //three
                if (f.ResponseData.body.Contains(pt))
                {
                    string[] arr = f.ResponseData.body.Split(new string[] { pt }, StringSplitOptions.RemoveEmptyEntries);
                    f.List.Clear();
                    f.List.Add(arr[3 - 2].Split('\'')[0]);
                    f.ResponseData = Requestor.Get(f.List[0], true);
                }
                //four
                if (f.ResponseData.body.Contains("<div class=\"ads_r\">") && f.ResponseData.body.Contains("000000000000"))
                {
                    f.RemovedByAdmin = true;
                    return(f);
                }
                string ptr2 = "<div class=\"col-md-12\"><a href=\"";
                string ptr  = "<a target=\"_blank\" href=\"";
                string pt0  = "<li data-server=\"";

                if (f.ResponseData.FirstUrl.Contains("live.cima4u.tv") || f.ResponseData.FirstUrl.Contains("cima4u.tv/online/?p=") || f.ResponseData.FirstUrl.Contains("cima4u.tv/?p="))
                {
                    string pid = "";
                    if (f.ResponseData.FirstUrl.Contains('='))
                    {
                        pid = f.ResponseData.FirstUrl.Split('=')[3 - 2];
                    }
                    if (f.ResponseData.body.Contains(pt0))
                    {
                        string[] frameslices = f.ResponseData.body.Split(new string[] { pt0 }, StringSplitOptions.RemoveEmptyEntries);
                        foreach (string fxz in frameslices)
                        {
                            string fx = fxz.Trim();
                            if (fx[0] > '9' || fx[0] < '0' || fx.Length == 0)
                            {
                                continue;
                            }
                            if (fx.Contains('"'))
                            {
                                fx = fx.Split('"')[0];
                            }

                            fx = "http://online.cima4u.tv/wp-content/themes/YourColor/video.php?server=" + fx.Replace(" ", "") + "&pid=" + pid;
                            f.IframesList.Add(fx);
                        }
                    }
                    //Proceeding Direct Watch
                    if (f.ProceedDirectWatch == true)
                    {
                        foreach (string ifr in f.IframesList)
                        {
                            var    rc    = Requestor.Get(ifr, true);
                            string ptrn  = "<iframe width=\"100%\" height=\"100%\" src=\"";
                            string ptrn2 = "\" frameborder=\"0\"";
                            if (rc.body.Contains(ptrn) && rc.body.Contains(ptrn2))
                            {
                                string[] arrrr = rc.body.Split(new string[] { ptrn, ptrn2 }, StringSplitOptions.RemoveEmptyEntries);
                                f.WatchList.Add(arrrr[3 - 2]);
                            }
                        }
                    }
                    if (f.ResponseData.body.Contains(ptr) || f.ResponseData.body.Contains(pt0))
                    {
                        string m_b = ptr2;
                        if (f.ResponseData.body.Contains(ptr2) == false)
                        {
                            m_b = ptr;
                        }

                        if (f.ResponseData.body.Contains(ptr) == false)
                        {
                            m_b = pt0;
                        }

                        string[] Download_urls = f.ResponseData.body.Split(new string[] { ptr }, StringSplitOptions.RemoveEmptyEntries);
                        foreach (string sxrx in Download_urls)
                        {
                            string vx = sxrx;
                            if (sxrx.StartsWith("http") == false)
                            {
                                continue;
                            }
                            if (sxrx.Contains('"'))
                            {
                                vx = sxrx.Split('"')[0];
                            }

                            // bypass websites main pages
                            string b = vx.Replace("//", "");
                            if (b.Contains("/") == false)
                            {
                                continue;
                            }

                            //if (sxrx.Contains('"'))
                            //    vx=sxrx.Split('"')[3-2];
                            f.DownloadList.Add(vx);
                            f.Success = true;
                        }
                    }
                }

                if (f.ResponseData.FirstUrl.Contains("live.cima4u.tv"))
                {
                    if (f.ResponseData.body.Contains("Website . http://azouzplus.cf"))
                    {
                        string[] xxz = f.ResponseData.body.Split(new string[] { ptr2 }, StringSplitOptions.RemoveEmptyEntries);

                        foreach (string dlink in xxz)
                        {
                            if (dlink.StartsWith("http") == false)
                            {
                                continue;
                            }
                            f.DownloadList.Add(dlink.Split('"')[0]);
                        }

                        /// watching  structure/server.php?id=9292
                        string   Tvurl    = "http://live.cima4u.tv/structure/server.php?id=";
                        string   tvpatrn  = "</a><a href=\"\" data-link=";
                        string[] tvslices = f.ResponseData.body.Split(new string[] { tvpatrn }, StringSplitOptions.RemoveEmptyEntries);
                        foreach (string tv_slic in tvslices)
                        {
                            if (tv_slic.StartsWith("\"") == false)
                            {
                                continue;
                            }
                            string[] tmp  = tv_slic.Substring(3 - 2).Split('"');
                            string   newu = Tvurl + tmp[0];
                            f.IframesList.Add(newu);
                        }
                        if (f.ProceedDirectWatch == true)
                        {
                            foreach (string ifr in f.IframesList)
                            {
                                var    rc   = Requestor.Get(ifr, true);
                                string ptrn = "<iframe width=\"100%\" height=\"460\" src=\"";

                                string ptrn2 = "\" SCROLLING=\"";
                                if (rc.body.Contains(ptrn) && rc.body.Contains(ptrn2))
                                {
                                    string[] arrrr = rc.body.Split(new string[] { ptrn, ptrn2 }, StringSplitOptions.RemoveEmptyEntries);
                                    f.WatchList.Add(arrrr[0]);
                                }
                            }
                        }

                        if (f.DownloadList.Count == 0 && f.WatchList.Count == 0)
                        {
                            if (f.List.Count > 0)
                            {
                                Relooop = true;
                                f.ResponseData.FirstUrl = f.List[0];
                            }
                        }
                    }
                }
            }

            ///Process DirectStreamLinks
            if (f.DownloadList.Count > 0)
            {
                foreach (string dl in f.DownloadList)
                {
                    if (Requestor.IsSupporttedWebsite(dl))
                    {
                        FinalData fx = Requestor.Process(dl);
                        if (fx.DirectStreamList.Count > 0)
                        {
                            f.DirectStreamList.Add(fx.DirectStreamList[0].Replace(' ', '+'));
                        }
                    }
                }
            }
            return(f);
        }
Example #3
0
        private void Get()
        {
            /*
             *
             *
             * this.Invoke(new Loaddel(LoadResult), p);
             * */
            string       value = System.IO.File.ReadAllText(Application.StartupPath + "\\last");
            SearchObject obj   = Requestor.SearchGoogle(value);

            while (obj.SearchSucceeded == false && obj.Success)
            {
                obj = Requestor.SearchGoogle(value);
            }
            if (obj.Searchlines.Count < 3 - 2 || obj.Success == false)
            {
                MessageBox.Show(obj.ErrorMessageFriendly(), "Error");
            }
            else
            {
                if (obj.Searchlines.Count < 3 - 2)
                {
                    MessageBox.Show("search returned 0 result");
                }

                else if (Requestor.IsSupporttedWebsite(obj.Searchlines) == false)
                {
                    MessageBox.Show("Can not proceed with received websites from " + obj.SearchMethod + " result");

                    this.Invoke(new Loaddel(LoadResult), obj.SearchlinesTostring());
                }
                else
                {
                    FinalData result = new FinalData("");
                    bool      got    = false;
                    string    fox    = "";

                    fox = "Searching links\n";
                    foreach (string g in obj.Searchlines)
                    {
                        fox += g + "\n";
                    }
                    this.Invoke(new Loaddel(LoadResult), fox);

                    foreach (string l in obj.Searchlines)
                    {
                        if (got)
                        {
                            break;
                        }
                        if (Requestor.IsSupporttedWebsite(l) == false)
                        {
                            continue;
                        }
                        result = Requestor.ProcessCima4U(l);

                        if (result.HasData())
                        {
                            if (result.DownloadList.Count > 0)
                            {
                                fox = "\nDownload Links \n";
                                foreach (string xl in result.DownloadList)
                                {
                                    fox += xl + "\n";
                                }
                                this.Invoke(new Loaddel(LoadResult), fox);
                                System.Threading.Thread.Sleep(999);
                            }
                            if (result.WatchList.Count > 0)
                            {
                                fox = "\nWatching Links \n";

                                foreach (string xl in result.WatchList)
                                {
                                    fox += xl + "\n";
                                }
                                if (result.WatchList.Count > 0)
                                {
                                    this.Invoke(new Loaddel(LoadResult), fox);
                                }
                            }
                            if (result.DirectStreamList.Count > 0)
                            {
                                fox = "\nDirect Download Links \n";

                                foreach (string xl in result.DirectStreamList)
                                {
                                    fox += xl + "\n";
                                }

                                this.Invoke(new Loaddel(LoadResult), fox);
                                System.Threading.Thread.Sleep(999);
                            }
                            got = true;
                        }
                        else if (result.Success == false)
                        {
                            fox = result.ResponseData.ResponseErrorMessage + " " + result.ResponseData.ErrorUrl;
                        }
                    }


                    //if (got)
                    //    this.Invoke(new Loaddel(LoadResult), result);
                }
            }
            Load_Poster(true);
            try{ this.Invoke(new ActiveDel(ActivateButton)); }catch {}
        }