delphi 如何实现采集一个网页
求一个采集的例子
看了几个源码 其中几个地方不明白豆丁网
function TForm1.GetStr(StrSource,StrBegin,StrEnd:string):string;
var
in_star,in_end:integer;
begin
in_star:=AnsiPos(strbegin,strsource)+length(strbegin);
in_end:=AnsiPos(strend,strsource);
result:=copy(strsource,in_sta,in_end-in_star);
end;in_sta,in_end-in_star 都没定义 他是怎么用的
s:=copy(re,pos('<td width="100" align="left">',re)+29,99999);
/// +29意思就是前规律的字符数(可以用我提供的软件查) 99999是规律中的截取数据字符。
s:=copy(s,1,pos('</td>',s)-1);
s:=stringreplace(s,' ',' ',[rfReplaceAll]);
Label1.Caption:='综合排名:'+s; /// s 就是我们截取到的内容
cpoy
后面加的 2999999是什么意思 求 详解的delphi采集 代码
求一个采集的例子
看了几个源码 其中几个地方不明白豆丁网
function TForm1.GetStr(StrSource,StrBegin,StrEnd:string):string;
var
in_star,in_end:integer;
begin
in_star:=AnsiPos(strbegin,strsource)+length(strbegin);
in_end:=AnsiPos(strend,strsource);
result:=copy(strsource,in_sta,in_end-in_star);
end;in_sta,in_end-in_star 都没定义 他是怎么用的
s:=copy(re,pos('<td width="100" align="left">',re)+29,99999);
/// +29意思就是前规律的字符数(可以用我提供的软件查) 99999是规律中的截取数据字符。
s:=copy(s,1,pos('</td>',s)-1);
s:=stringreplace(s,' ',' ',[rfReplaceAll]);
Label1.Caption:='综合排名:'+s; /// s 就是我们截取到的内容
cpoy
后面加的 2999999是什么意思 求 详解的delphi采集 代码
解决方案 »
- 请教一个较复杂的SQL语句如何编写,数据库ACCESS
- 怎么设置报表的页面大小?
- pradox 里面 用sql语句建number和data等字段时,数据类型怎么写?
- 【版务】Delphi社区第一届升星评选活动
- Delphi中写了一个Service Application运行后在控制面板的服务里找不到??
- 有意思的问题,请高手指教!(100*x)
- 请问那位大哥有邮件发送带验证的代码,给小弟一份,谢谢!
- NMFtp控件的不能连接问题?
- cxTreeList 通过遍历ITEM对每个ITEM加上小图标!出先问题
- 此条语句为何会出错?
- Delphi 中 access violation
- 关于正则表达式的双引号问题
s:=copy(re,pos(' <td width="100" align="left">',re)+29,99999); copy的 函数 copy 长度怎么计算 在网页中