Delphi TIdHTTP抓取页面信息


本文整理自网络,侵删。

 
function MacSonucuAl(const id: Integer): string;
  function SubParse(Source, L, R: string): string;
 begin
   Delete(Source, 1, Pos(L, Source) + Length(L) - 1);
   Result := Copy(Source, 1, Pos(R, Source) - 1);
 end;
var
 HTTP: TIdHTTP;
 Temp: string;
begin
 HTTP := TIdHTTP.Create(nil);
 try
   Temp := HTTP.Get('http://www.delphitop.com.com/Mac/' + IntToStr(id) + '/');
   Result := Trim(SubParse(Temp, '<div class="match-score" id="dvScoreText">', '</div>'));
 finally
   HTTP.Free;
 end;
end;

相关阅读 >>

Delphi android实例-红外线操作(xe10.2+小米5)

Delphi 透明窗体

Delphi firemonkey的stylebook皮肤控件的使用

Delphi清除ie临时文件,历史记录

Delphi 精要-读书笔记(内存分配释放)

Delphi 将鼠标锁定在一定范围

移植Delphi7的tclientsocket,tserversocket

Delphi 隐藏桌面图标和任务栏

Delphi xe 共享一个之前封装的多进程共享内存的memorystream

Delphi firedac tfdconnection连接mysql数据库

更多相关阅读请进入《Delphi》频道 >>



打赏

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码打赏,您说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

分享从这里开始,精彩与您同在

评论

管理员已关闭评论功能...