微软面试100题打包下载和博客园博客导出工具下载

说明

  根据网上提供的"CSDN博客导出工具v4.2"源码修改,可进行博客园博客随笔导出,之前的源码只能导出文章。

  微软面试100题打包,是将本博客中所有的微软面试100题打包成离线格式,有利于批量查看。

地址

  http://yun.baidu.com/share/home?uk=369664793&view=share#category/type=0

修改

  Regex reg_title = new Regex(@"href=""(http://www\.cnblogs\.com/.+?/(archive|p)/.+?)"">([^<]+?)</a>", RegexOptions.IgnoreCase | RegexOptions.Compiled);//把之前的articles改为了p

       int p = 0;
            for (int i = 1; i < 1000; i++)
            {
                if (p > 0 && i > p) break;
                web.URL = string.Format(url, i);
                string html = web.Get();
                if (p == 0)
                {
                    var mp = Regex.Match(html, @"共(\d+)页");
                    if (mp.Success) p = App.ToInt(mp.Groups[1].Value);
                    else p = 1;
                }

改为:

        //    int p = 0;
            for (int i = 1; i < 50; i++)
            {
             //   if (p > 0 && i > p) break;
                web.URL = string.Format(url, i);
                string html = web.Get();
             //   if (p == 0)
            //    {
             //       var mp = Regex.Match(html, @"共(\d+)页");
             //       if (mp.Success) p = App.ToInt(mp.Groups[1].Value);
              //      else p = 1;
            //    }            

改动之后,基本可以应付常规下载,遗憾的是速度有点慢。

posted on 2014-12-02 19:41  tractorman  阅读(428)  评论(0编辑  收藏  举报

导航