摘要: 抓取地址所有图片 正则抓取网页title 下载网页图片 阅读全文
posted @ 2016-09-28 10:09 李0539 阅读(5523) 评论(0) 推荐(0) 编辑
摘要: 主程序 代码 网络请求类 正则表达式类 阅读全文
posted @ 2016-09-28 09:49 李0539 阅读(6196) 评论(2) 推荐(0) 编辑
摘要: using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Web; namespace KTCommon.LOG { public class Trace... 阅读全文
posted @ 2016-09-27 11:20 李0539 阅读(3249) 评论(0) 推荐(0) 编辑
摘要: using KTCommon.Helper; using KTCommon.LOG; using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Net; using System.Text; using System.Threading.Tasks; name... 阅读全文
posted @ 2016-09-27 11:20 李0539 阅读(353) 评论(0) 推荐(0) 编辑
摘要: 新建CSA控件 1、新建一个纯类,命名空间是: 2、实现两个构造函数:无参和传Candy参数 3、编写InitMe()方法初始化控件属性: 4、重写RefreshMe()方法并进行异步消息事件的注册 5、重写UpdateMe()方法 6、编写异步消息处理方法 7、给DTE发送消息的方法 8、重写On 阅读全文
posted @ 2016-09-27 10:57 李0539 阅读(426) 评论(0) 推荐(0) 编辑
摘要: 1. 代表任意多个字符:(.*?)2. 代表网页里的<body>*</body>任意的标签内容,替换以后网页源码就只剩纯文本:<[^>]*>3. 代表网页中的空格:&nbsp;4. 四位0~9的数字,一般用来匹配验证码:[0-9]{4}5. 手机号正则式:\d{11}6. 密码正则式:[.*|\s* 阅读全文
posted @ 2016-09-27 10:50 李0539 阅读(323) 评论(0) 推荐(0) 编辑
摘要: 1.在地址栏输入“about:config”,按下回车进入设置菜单。 2.找到“general.useragent.override”,如果没有这一项,则点右键“新建”->“字符串”,输入这个字符串。 3.将其值设为自己想要的UserAgent。User-Agent要设置的字符串 4.Dalvik/ 阅读全文
posted @ 2016-09-27 10:34 李0539 阅读(1511) 评论(0) 推荐(1) 编辑
摘要: 1、Unicode编码 引用系统 System.Web 2、Unicode编码 自己封装的方法 3、\u50FA\u49AD 转换成 "中国" 4、网页ASCII转换成Unicode 5、解析html的NCR编码方法 6、C#实现escape编码 7、将Unicode编码转换为汉字字符串 阅读全文
posted @ 2016-09-27 10:30 李0539 阅读(5190) 评论(0) 推荐(0) 编辑
摘要: //postdata为数组的请求方式 public byte[] POST(string Url, byte[] byteRequest) { byte[] responsebody; HttpWebRequest httpWebRequest = null; HttpWebResponse httpWebR... 阅读全文
posted @ 2016-09-27 10:20 李0539 阅读(8518) 评论(2) 推荐(0) 编辑
摘要: //解析post请求数组返回的数组 //解码返回的二进制数组 public string DecodeBytes(byte[] c) { string html = string.Empty; try { byte[] d = c; ... 阅读全文
posted @ 2016-09-27 10:19 李0539 阅读(5051) 评论(3) 推荐(0) 编辑