Exemplo n.º 1
0
        public static String DownloadUrl(string Url)
        {
            string content = Web.getContentFromUrlWithProperty(Url);

            if (Log.getMode())
            {
                Log.println("Content : " + content);
            }

            if (Log.getMode())
            {
                Log.println("Content : " + content);
            }

            int startIndex = content.IndexOf("og:image") + 19;

            content = content.Substring(startIndex, content.Length - startIndex);

            int startIndexFile = content.IndexOf(".ak.instagram.com/") + 18;
            int endIndex       = content.IndexOf(".jpg");

            String url = content.Substring(0, endIndex + 4);

            if (Log.getMode())
            {
                Log.println("Url : " + url);
            }

            return(url);
        }
Exemplo n.º 2
0
        public static String Title(string Url)
        {
            string content = Web.getContentFromUrlWithProperty(Url);

            if (Log.getMode())
            {
                Log.println("Content : " + content);
            }

            int startIndex = content.IndexOf("og:image") + 19;

            content = content.Substring(startIndex, content.Length - startIndex);

            int startIndexFile = content.IndexOf(".ak.instagram.com/") + 18;
            int endIndex       = content.IndexOf(".jpg");

            String title = content.Substring(startIndexFile, endIndex - startIndexFile);

            if (Log.getMode())
            {
                Log.println("Title : " + title);
            }

            return(title);
        }
Exemplo n.º 3
0
        public static List <PornhubExtractorComponents> Query(string Url)
        {
            items = new List <PornhubExtractorComponents>();

            string content = Web.getContentFromUrlWithProperty(Url);

            if (Log.getMode())
            {
                Log.println("Content: " + content);
            }

            // Search string
            string          pattern = "720\",\"videoUrl\":\".*?\"";
            MatchCollection result  = Regex.Matches(content, pattern, RegexOptions.Singleline);

            String TITLE = string.Empty;
            String URL   = String.Empty;

            for (int ctr = 0; ctr <= result.Count - 1; ctr++)
            {
                if (Log.getMode())
                {
                    Log.println("Match: " + content);
                }

                TITLE = Helper.ExtractValue(content, "\"video_title\":\"", "\",\"");

                if (Log.getMode())
                {
                    Log.println("Title : " + TITLE);
                }

                URL = result[ctr].Value.Replace("\\", "").Replace("720\",\"videoUrl\":\"", "")
                      .Replace("\"", "");

                if (Log.getMode())
                {
                    Log.println("Url : " + URL);
                }

                if (Log.getMode())
                {
                    Log.println("********************************");
                }

                PornhubExtractorComponents comp = new PornhubExtractorComponents(TITLE, URL);

                items.Add(comp);
            }

            return(items);
        }
Exemplo n.º 4
0
        public static String DownloadUrl(string Url)
        {
            string content = Web.getContentFromUrlWithProperty(Url);

            if (Log.getMode())
            {
                Log.println("Content : " + content);
            }

            String URL = Helper.ExtractValue(content.Replace("\r\n", ""), "sd_src_no_ratelimit:\"", "\",hd_src_no_ratelimit:");

            if (Log.getMode())
            {
                Log.println("Url : " + URL);
            }

            if (Log.getMode())
            {
                Log.println("********************************");
            }

            return(URL);
        }
Exemplo n.º 5
0
        public static String Title(string Url)
        {
            string content = Web.getContentFromUrlWithProperty(Url);

            if (Log.getMode())
            {
                Log.println("Content : " + content);
            }

            String title = Helper.ExtractValue(content, "\"pageTitle\">", "</title><link");

            if (Log.getMode())
            {
                Log.println("Title : " + title);
            }

            if (Log.getMode())
            {
                Log.println("********************************");
            }

            return(title);
        }
Exemplo n.º 6
0
        public static List <xHamsterExtractorComponents> Query(String Url)
        {
            items = new List <xHamsterExtractorComponents>();

            // Search address
            string content = Web.getContentFromUrlWithProperty(Url);

            if (Log.getMode())
            {
                Log.println("Match: " + content);
            }

            // Search string
            string          pattern = "players:.*?}\"}},";
            MatchCollection result  = Regex.Matches(content, pattern, RegexOptions.Singleline);

            for (int ctr = 0; ctr <= result.Count - 1; ctr++)
            {
                if (!result[ctr].Value.Contains("</script>"))
                {
                    if (Log.getMode())
                    {
                        Log.println("Content: " + result[ctr].Value);
                    }

                    title = Helper.ExtractValue(result[ctr].Value, "\"title\":\"", "\",\"");

                    /* FLV */

                    if (Log.getMode())
                    {
                        Log.println("Title: " + title);
                    }

                    format = "flv";

                    if (Log.getMode())
                    {
                        Log.println("Format: " + format);
                    }

                    resolution = "";

                    if (Log.getMode())
                    {
                        Log.println("Resolution: " + resolution);
                    }

                    url = Helper.ExtractValue(result[ctr].Value, "\"file\":\"", "\",\"").Replace("\\", "");

                    if (Log.getMode())
                    {
                        Log.println("Url: " + url);
                    }

                    xHamsterExtractorComponents comp = new xHamsterExtractorComponents(title, format, resolution, url);

                    items.Add(comp);

                    /* **************************************************************************** */

                    /* MP4 */

                    // Search string
                    string          pattern_ = "sources:.*?},";
                    MatchCollection result_  = Regex.Matches(content, pattern_, RegexOptions.Singleline);

                    for (int ctr_ = 0; ctr_ <= result_.Count - 1; ctr_++)
                    {
                        if (Log.getMode())
                        {
                            Log.println("Match: " + result_[ctr_].Value);
                        }

                        /* 240p */

                        if (Log.getMode())
                        {
                            Log.println("Title: " + title);
                        }

                        format = "mp4";

                        if (Log.getMode())
                        {
                            Log.println("Format: " + format);
                        }

                        resolution = "240p";

                        if (Log.getMode())
                        {
                            Log.println("Resolution: " + resolution);
                        }

                        url = Helper.ExtractValue(result_[ctr_].Value, "\"240p\":\"", "\",").Replace("\\", "");

                        if (Log.getMode())
                        {
                            Log.println("Url: " + url);
                        }

                        comp = new xHamsterExtractorComponents(title, format, resolution, url);

                        items.Add(comp);

                        /* 480p */

                        if (Log.getMode())
                        {
                            Log.println("Title: " + title);
                        }

                        format = "mp4";

                        if (Log.getMode())
                        {
                            Log.println("Format: " + format);
                        }

                        resolution = "480p";

                        if (Log.getMode())
                        {
                            Log.println("Resolution: " + resolution);
                        }

                        url = Helper.ExtractValue(result_[ctr_].Value, "\"480p\":\"", "\"").Replace("\\", "");

                        if (Log.getMode())
                        {
                            Log.println("Url: " + url);
                        }

                        comp = new xHamsterExtractorComponents(title, format, resolution, url);

                        items.Add(comp);

                        /* 720p */

                        if (Log.getMode())
                        {
                            Log.println("Title: " + title);
                        }

                        format = "mp4";

                        if (Log.getMode())
                        {
                            Log.println("Format: " + format);
                        }

                        resolution = "720p";

                        if (Log.getMode())
                        {
                            Log.println("Resolution: " + resolution);
                        }

                        url = Helper.ExtractValue(result_[ctr_].Value, "\"720p\":\"", "\"}").Replace("\\", "");

                        if (Log.getMode())
                        {
                            Log.println("Url: " + url);
                        }

                        comp = new xHamsterExtractorComponents(title, format, resolution, url);

                        items.Add(comp);
                    }
                }
            }

            return(items);
        }
Exemplo n.º 7
0
        public static string DownloadUrl(string Url)
        {
            url  = "";
            url_ = "";

            // Download html content
            string content = Web.getContentFromUrlWithProperty(Url);

            if (Log.getMode())
            {
                Log.println("Content: " + content);
            }

            // Search string
            string          pattern = "config_url.*?player_url";
            MatchCollection result  = Regex.Matches(content, pattern, RegexOptions.Singleline);

            for (int ctr = 0; ctr <= result.Count - 1; ctr++)
            {
                if (Log.getMode())
                {
                    Log.println("Match: " + result[ctr].Value);
                }

                url = result[ctr].Value;

                url = url.Replace("config_url\":\"", "");
                url = url.Replace("\",\"player_url", "");
                url = url.Replace("\\", "");

                if (Log.getMode())
                {
                    Log.println("ConfigUrl : " + url);
                }

                // Download html content
                string content_ = Web.getContentFromUrlWithProperty(url);

                // Search string
                string          pattern_ = "fps.*?level3";
                MatchCollection result_  = Regex.Matches(content_, pattern_, RegexOptions.Singleline);

                for (int ctr_ = 0; ctr_ <= result_.Count - 1; ctr_++)
                {
                    if (Log.getMode())
                    {
                        Log.println("Match: " + result_[ctr_].Value);
                    }

                    url_ = Helper.ExtractValue(result_[ctr_].Value, "fps\":", "\",\"cdn\":\"level3");

                    url_ = url_ + "\"";

                    url_ = Helper.ExtractValue(url_, "url\":\"", "\"");
                }

                if (Log.getMode())
                {
                    Log.println("Url : " + url_);
                }

                if (Log.getMode())
                {
                    Log.println("********************************");
                }
            }

            return(url_);
        }
Exemplo n.º 8
0
        public static List <VimeoSearchComponents> Query(string querystring, int querypages)
        {
            items = new List <VimeoSearchComponents>();

            // Do search
            for (int i = 1; i <= querypages; i++)
            {
                // Search address
                string content = Web.getContentFromUrlWithProperty("https://www.vimeo.com/search/page:" + i + "?q=" + querystring.Replace(" ", "+"));

                if (Log.getMode())
                {
                    Log.println("Content: " + content);
                }

                // Search string
                string          pattern = "\"uri\":.*?clip\",\"clip";
                MatchCollection result  = Regex.Matches(content, pattern, RegexOptions.Singleline);

                for (int ctr = 0; ctr <= result.Count - 1; ctr++)
                {
                    if (Log.getMode())
                    {
                        Log.println("Match: " + result[ctr].Value);
                    }

                    title = Helper.ExtractValue(result[ctr].Value, "\"name\":\"", "\",\"link\"");

                    if (Log.getMode())
                    {
                        Log.println("Title : " + title);
                    }

                    author = Helper.ExtractValue(result[ctr].Value, "\"user\":{\"name\":\"", "\",\"link\":");

                    if (Log.getMode())
                    {
                        Log.println("Author : " + author);
                    }

                    duration = Helper.formatDuration(Helper.ExtractValue(result[ctr].Value, "duration\":", ",\"c"));

                    if (Log.getMode())
                    {
                        Log.println("Duration : " + duration);
                    }

                    url = Helper.Concat("https://vimeo.com", Helper.ExtractValue(result[ctr].Value, "videos", "\",\"").Replace("\\", ""));

                    if (Log.getMode())
                    {
                        Log.println("Url : " + url);
                    }

                    thumbnail = Helper.ExtractValue(Helper.ExtractValue(result[ctr].Value, "pictures\":{\"sizes\":", "r=pad"), "\"link\":\"", "?").Replace("\\", "");

                    if (Log.getMode())
                    {
                        Log.println("Thumbnail : " + thumbnail);
                    }

                    if (Log.getMode())
                    {
                        Log.println("********************************");
                    }

                    VimeoSearchComponents comp = new VimeoSearchComponents(title, author, duration, url, thumbnail);

                    items.Add(comp);
                }
            }

            return(items);
        }
Exemplo n.º 9
0
        public static List <xHamsterSearchComponents> Query(string querystring, int querypages)
        {
            items = new List <xHamsterSearchComponents>();

            // Do search
            for (int i = 1; i <= querypages; i++)
            {
                // Search address
                string content = Web.getContentFromUrlWithProperty("https://xhamster.com/search?q=" + querystring.Replace(" ", "+") + "&p=" + i);

                if (Log.getMode())
                {
                    Log.println("Content: " + content);
                }

                // Search string
                string          pattern = "<div class=\"video\">.*?</div></div></div>";
                MatchCollection result  = Regex.Matches(content, pattern, RegexOptions.Singleline);

                for (int ctr = 0; ctr <= result.Count - 1; ctr++)
                {
                    if (Log.getMode())
                    {
                        Log.println("Match: " + result[ctr].Value);
                    }

                    title = Helper.ExtractValue(result[ctr].Value, "class='thumb' alt=\"", "\"/><");

                    if (Log.getMode())
                    {
                        Log.println("Title : " + title);
                    }

                    duration = Helper.ExtractValue(result[ctr].Value, "'></div><b>", "</b><u>");

                    if (Log.getMode())
                    {
                        Log.println("Duration : " + duration);
                    }

                    url = Helper.ExtractValue(result[ctr].Value, "<a href=\"", "\"");

                    if (Log.getMode())
                    {
                        Log.println("Url : " + url);
                    }

                    thumbnail = Helper.ExtractValue(result[ctr].Value, "<img src='", "' class='t");

                    if (Log.getMode())
                    {
                        Log.println("Thumbnail : " + thumbnail);
                    }

                    if (Log.getMode())
                    {
                        Log.println("********************************");
                    }

                    xHamsterSearchComponents comp = new xHamsterSearchComponents(title, duration, url, thumbnail);

                    items.Add(comp);
                }
            }

            return(items);
        }
Exemplo n.º 10
0
        public static List <PornhubSearchComponents> Query(string querystring, int querypages)
        {
            items = new List <PornhubSearchComponents>();

            // Do search
            for (int i = 1; i <= querypages; i++)
            {
                // Search address
                string content = Web.getContentFromUrlWithProperty("https://pornhub.com/video/search?search=" + querystring.Replace(" ", "+") + "&page=" + i);

                if (Log.getMode())
                {
                    Log.println("Content: " + content);
                }

                // Search string
                string          pattern = "<div class=\"wrap\">.*?<var class=\"duration\">.*?</var>";
                MatchCollection result  = Regex.Matches(content, pattern, RegexOptions.Singleline);

                for (int ctr = 0; ctr <= result.Count - 1; ctr++)
                {
                    if (Log.getMode())
                    {
                        Log.println("Match: " + result[ctr].Value);
                    }

                    title = Helper.ExtractValue(result[ctr].Value, "title=\"", "\" class=\"img\"");

                    if (Log.getMode())
                    {
                        Log.println("Title : " + title);
                    }

                    duration = Helper.ExtractValue(result[ctr].Value, "duration\">", "</var>");

                    if (Log.getMode())
                    {
                        Log.println("Duration : " + duration);
                    }

                    url = Helper.Concat("https://pornhub.com", Helper.ExtractValue(result[ctr].Value, "<a href=\"", "\""));

                    if (Log.getMode())
                    {
                        Log.println("Url : " + url);
                    }

                    thumbnail = Helper.ExtractValue(result[ctr].Value, "data-mediumthumb=\"", "\"");

                    if (Log.getMode())
                    {
                        Log.println("Thumbnail : " + thumbnail);
                    }

                    if (Log.getMode())
                    {
                        Log.println("********************************");
                    }

                    if (!title.Contains("target="))
                    {
                        PornhubSearchComponents comp = new PornhubSearchComponents(title, duration, url, thumbnail);

                        items.Add(comp);
                    }
                }
            }

            return(items);
        }