根据网上提供的"CSDN博客导出工具v4.2"源码修改,可进行博客园博客随笔导出,以前的源码只能导出文章。html
微软面试100题打包,是将本博客中全部的微软面试100题打包成离线格式,有利于批量查看。web
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; }
改成:url
// 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; // }
改动以后,基本能够应付常规下载,遗憾的是速度有点慢。spa