摘要: 以前写抓取网页的代码喜欢用ReadToEnd,因为简单省事,后来发现,在爬取网页的时候,如果网速很慢,ReadToEnd超时的几率很大。使用Read改写后,超时几率大大减小,完整代码如下: /// <summary> /// HttpPost /// </summary> public static 阅读全文
posted @ 2017-07-27 17:31 0611163 阅读(5834) 评论(0) 推荐(0)
摘要: 写了一个Windows服务,通过C#模拟网站用户登录并爬取BUG列表查询有没有新的BUG,并提醒我 1、HttpUtil工具类,用于模拟用户登录以及爬取网页: using System; using System.Collections.Generic; using System.IO; using 阅读全文
posted @ 2017-07-27 16:58 0611163 阅读(605) 评论(0) 推荐(1)