网上也出现一些抓取妹子图的python 代码,今天我们用c#实现爬虫过程。

请看我的网站: www.di81.com

 关于如何爬虫妹子图网的源码分析 c#实现

        private void www_94xmn_Com(string url, string urlType, int allpage, int typeID)
        {
            new Thread(() =>
            {
                PublicHtml p = new PublicHtml();
                CookieContainer c = new CookieContainer();

                Invoke(new Action(() =>
                {
                    this.listBoxno.Items.Add(urlType);
                }));

                for (int i = 1; i < allpage; i++)
                {
                    //GetDataGetHtml
                    string homeurl = string.Format(url, i);
                    string html = PubsLibrary.HttpHelper.GetDataGetHtml(homeurl, "", c);
                    MatchCollection mcs = new Regex("(?is)(?<=\"wf-cld\").+?(?=</span></div>)").Matches(html);
                    foreach (Match m in mcs)
                    {
                        WarehouseService ms = new WarehouseService();


爬取成功后就直接装入库。

相关文章:

  • 2022-02-12
  • 2021-09-17
  • 2022-12-23
  • 2021-11-29
  • 2022-12-23
  • 2022-12-23
  • 2021-08-01
猜你喜欢
  • 2022-03-03
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-07-26
  • 2022-12-23
  • 2021-09-04
相关资源
相似解决方案