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 d10.x 在安卓app开发中使用jar包的注意事项

Delphi 获取指定字符串后面的所有的字符串

Delphi strtodatetime 这个函数在win7下出错

Delphi idhttp数据自动编码

Delphi tfinddialog treplacedialog对话框在memo中的使用

Delphi外挂编写

Delphi xe版本 运行cmd命令,并取得输出字符

Delphi向imagelist中加入png类型的资源图片

Delphi http post json示例

Delphi 获取鼠标当前位置的相对坐标

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



打赏

取消

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

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

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

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

评论

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

    正在狠努力加载,请稍候...