Allocine France - script adaptation
Posted: 2002-10-05 00:13:19
re-salut !
Il semble qu'Allocine ait modifié leurs pages car les descriptions/Synopsis ne sont plus repris par les scripts.
Voici mon adaptation pour cette partie (le reste est ok).
// Description
LineNr := FindLine('Synopsis', Page, LineNr);
if LineNr > -1 then
begin
Line := Page.GetString(LineNr);
Value := '';
repeat
Line := Page.GetString(LineNr);
BeginPos := pos('"size2">', Line);
if BeginPos > 0 then
begin
BeginPos := BeginPos + 8;
end
LineNr := lineNr+1
until BeginPos > 0;
repeat
BeginPos := 1;
EndPos := pos('</FONT>', Line);
if EndPos = 0 then
EndPos := pos('<br>', Line);
if EndPos = 0 then
EndPos := Length(Line) + 1;
if EndPos > 0 then
Value := Value + copy(Line, BeginPos, EndPos - BeginPos) + #13#10;
EndPos := pos('</FONT>', Line);
if EndPos = 0 then
begin
LineNr := LineNr + 1;
Line := Page.GetString(LineNr);
end;
until EndPos > 0;
HTMLRemoveTags(Value);
SetField(fieldDescription, Value);
end;
Il semble qu'Allocine ait modifié leurs pages car les descriptions/Synopsis ne sont plus repris par les scripts.
Voici mon adaptation pour cette partie (le reste est ok).
// Description
LineNr := FindLine('Synopsis', Page, LineNr);
if LineNr > -1 then
begin
Line := Page.GetString(LineNr);
Value := '';
repeat
Line := Page.GetString(LineNr);
BeginPos := pos('"size2">', Line);
if BeginPos > 0 then
begin
BeginPos := BeginPos + 8;
end
LineNr := lineNr+1
until BeginPos > 0;
repeat
BeginPos := 1;
EndPos := pos('</FONT>', Line);
if EndPos = 0 then
EndPos := pos('<br>', Line);
if EndPos = 0 then
EndPos := Length(Line) + 1;
if EndPos > 0 then
Value := Value + copy(Line, BeginPos, EndPos - BeginPos) + #13#10;
EndPos := pos('</FONT>', Line);
if EndPos = 0 then
begin
LineNr := LineNr + 1;
Line := Page.GetString(LineNr);
end;
until EndPos > 0;
HTMLRemoveTags(Value);
SetField(fieldDescription, Value);
end;