c to capture high definition beautiful girls pictures

  • 2021-01-14 06:30:29
  • OfStack

c# to capture high-definition beautiful girls pictures


private void DoFetch(int pageNum)
        {
            ThreadPool.QueueUserWorkItem(_ =>
            {
                HttpWebRequest request = (HttpWebRequest)WebRequest.Create("http://me2-sex.lofter.com/tag/ The beauty of photography ?page=" + pageNum);
                request.Credentials = System.Net.CredentialCache.DefaultCredentials;
                HttpWebResponse response = (HttpWebResponse)request.GetResponse();
                if (response.StatusCode == HttpStatusCode.OK)
                {
                    using (StreamReader sr = new StreamReader(response.GetResponseStream()))
                    {
                        List<Uri> links = FetchLinksFromSource(sr.ReadToEnd());
                        Console.WriteLine("=========================" + pageNum + "fatch END==========================");
                    }
                }
            });
        }
        private List<Uri> FetchLinksFromSource(string htmlSource)
        {
            List<Uri> links = new List<Uri>();
            string regexImgSrc = @"<img[^>]*?src\s*=\s*[""']?([^'"" >]+?)[ '""][^>]*?>";
            MatchCollection matchesImgSrc = Regex.Matches(htmlSource, regexImgSrc, RegexOptions.IgnoreCase | RegexOptions.Singleline);
            foreach (Match m in matchesImgSrc)
            {
                string href = m.Groups[1].Value;
                if (CheckIsUrlFormat(href))
                {
                    links.Add(new Uri(href));
                    Console.WriteLine(href);
                }
                else
                    continue;
                using (WebClient myWebClient = new WebClient())
                {
                    try
                    {
                        myWebClient.DownloadFile(new Uri(href), System.IO.Path.Combine(globePath, System.IO.Path.GetRandomFileName() + System.IO.Path.GetExtension(href)));
                    }
                    catch (Exception ex)
                    {
                        Console.WriteLine(ex.Message);
                    }
                }
            }
            return links;
        }

That's all for this article, you can expand it freely, you know, I hope you like it.


Related articles: