Hi.
I have another question about this script ( filmaffinity ):
The summary of films contains genre e.g (
300):
"GÉNERO Y CRÍTICA Aventuras. Acción. Bélico. Cómic / SINOPSIS: Adaptación del cómic de Frank Miller (autor del cómic de "Sin City") sobre la famosa batalla de las Termópilas"
"Aventuras. Acción. Bélico. Cómic" is the genre, and it is repeated in the Category and in the Description fields. The structure in Description field is always this:
Genres / SINOPSIS: Description
Is it possible to delete genres from the description field?
TY
I copy the part of the script I think have to be modified (I dont know how):
Code: Select all
// Critic
LineNr := FindLine('GÉNERO Y CRÍTICA', Page, 0);
if LineNr <> -1 then
begin
iL := 6;
Line := Page.GetString(LineNr + iL);
LineAux := Page.GetString(LineNr + iL+1);
while LineAux<>'</tr>' do
begin
Line := Line+LineAux;
iL := iL+1;
LineAux := Page.GetString(LineNr + iL+1);
end;
HTMLDecode(Line);
Line := StringReplace(Line, '<br />', #13#10);
Item := TextBetween (Line, '<td valign="top">','</td>');
Item := StringReplace (Item, 'á','á');
Item := StringReplace (Item, 'é','é');
Item := StringReplace (Item, 'í','í');
Item := StringReplace (Item, 'ó','ó');
Item := StringReplace (Item, 'ú','ú');
Item := StringReplace (Item, 'Á','Á');
Item := StringReplace (Item, 'É','É');
Item := StringReplace (Item, 'Í','Í');
Item := StringReplace (Item, 'Ó','Ó');
Item := StringReplace (Item, 'Ú','Ú');
Item := StringReplace (Item, '"','');
Item := StringReplace (Item, 'ñ','ñ');
Item := StringReplace (Item, '¿','¿');
SetField(fieldDescription, Trim(Item));
end;
// Category
LineNr := FindLine('GÉNERO Y CRÍTICA', Page, 0);
if LineNr <> -1 then
begin
Line := Page.GetString(LineNr + 6);
Item := TextBetween (Line, ' / ', ' / ');
if Length(Item)> 100 then
begin
Line := Page.GetString(LineNr + 6);
Item := TextBetween (Line, '<td valign="top">', ' /');
end;
HTMLDecode(Item);
SetField(fieldCategory, Trim (Item));
end;