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多线程程序示例(最简单的多线程)

Delphi 10.3 断点全部失效

Delphi 获取网卡信息

Delphi10.3.2安卓sdk安装

Delphi 字符串与日期格式互转

Delphi 获取文件大小方法

Delphi 中字符串比较函数对比

Delphi tfilestream和tmemorystream分别读取、创建、合并文件

Delphi 10.3.1新的变量的声明方法

Delphi 在 listbox 中放置一��可�� item 的 tedit �m件

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



打赏

取消

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

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

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

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

评论

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