Bom dia, fiz alguns ajustes no procedimento: procedure TACBrSedex.Rastrear(const CodRastreio: String);
Notei que mudaram a estrutura html, e os campos pesquisados para capturar os valores nao existiam mais.
Caso tenha me equivocado, me avisem por favor.
Trecho modificado:
SL := TStringList.Create;
try
SL.Text := Self.RespHTTP.Text;
vCriar := False;
for I := 0 to Pred(SL.Count) do
begin
if Pos('<li>Data', SL[I].Trim) > 0 then
begin
vData := Copy(SL[I].Trim, 13, 10) + ' ' + Copy(SL[I], 32, 5) + ':00';
end;
if Pos('<li>Local', SL[I].Trim) > 0 then
begin
vLocal :=(CopyDeAte(SL[I].Trim, '<li>Local:', '</li>')) + ' -> ' + vObs;
vCriar := true;
end;
if Pos('<li>Status', SL[I].Trim) > 0 then
begin
vObs := CopyDeAte(SL[I].Trim, '<b>', '</b>');
//vLocal := vObs;
end;
if Pos('<li>Origem', SL[I].Trim) > 0 then
begin
vLocal := (CopyDeAte(SL[I].Trim, '<li>', '</li>')) + ' - ' + (CopyDeAte(SL[I + 1].Trim, '<li>', '</li>'))+ ' -> ' + vObs;
vCriar := true;
end;
if vCriar then
begin
with retRastreio.New do
begin
DataHora := StrToDateTime(vData);
Local := vLocal;
Situacao := vObs;
Observacao := vObs;
end;
vData := EmptyStr;
vLocal := EmptyStr;
vObs := EmptyStr;
vCriar := False;
end;
end;
finally
SL.Free;
end;