Попробуйте заменить строку (можно просто закомментировать вставив перед ней // )
s2 := ParseJsonParam(all, 'duration');
на строку
s2 := ParseJsonParam(all, 'timeRequired');;
и сообщите результат.
Спасибо за подсказку)
Сработало лишь при удалении этого условия
begin
s2 := ParseInfoContentText(all, 'Время');
s2 := Trim(ParseString(s2, '(\d+?) мин', 1));
if (not TryStrToInt(s2, duration)) then
duration := 0;
end;
В итоге рабочий код
//movie duration (minutes)
duration:=0;
if (RegReadInteger('KinopoiskDlDuration', 1) = 1) then begin
s2 := ParseString(all, '<td class="time" id="runtime">(\d+) мин.', 1);
if s2 = '' then
s2:=ParseString(all, 'время</b>.*?(\d+?) мин', 1);
if s2<>'' then
begin
try
duration:=StrToInt(s2);
except
end;
end;
if (duration = 0) then
begin
s2 := ParseJsonParam(all, 'timeRequired');
if (not TryStrToInt(s2, duration)) then
begin
s2 := ParseString(s2, 'M(\d+)S', 1);
if (not TryStrToInt(s2, duration)) then
duration := 0;
end;
end;
end;