用DOM实现文章采集--采集到网页源码(4)
来源:未知 责任编辑:责任编辑 发表时间:2014-04-20 03:40 点击:次
responseStream = response.GetResponseStream();
if (response.Headers["Accept-Encoding"] != null)
{
if (MyCollections.Contain(response.Headers["Accept-Encoding"], "*", "gzip", "x-gzip"))
{
responseStream = new GZipStream(responseStream, CompressionMode.Decompress);
}
}
else if (response.Headers["Content-Encoding"] != null)
{
if (MyCollections.Contain(response.Headers["Content-Encoding"], "*", "gzip", "x-gzip"))
{
responseStream = new GZipStream(responseStream, CompressionMode.Decompress);
}
}
if (this._HttpEncoding == null)
{
string str = response.CharacterSet.ToLower();
if (str.Length > 3)
相关新闻>>
最新推荐更多>>>
- 发表评论
-
- 最新评论 更多>>