Great, it works ok, but something is missing or some details
Details := AddDetails(HTML,'Langue','<div>Langue</div></th><td>',Details);
Details := AddDetails(HTML,'Date de sortie VOD','<div>Date de sortie VOD</div></th><td>',Details);
Details := AddDetails(HTML,'Date de sortie DVD','<div>Date de sortie DVD</div></th><td>',Details);
Details := AddDetails(HTML,'Date de sortie Blu-ray','<div>Date de sortie Blu-ray</div></th><td>',Details);
that are added in this code:
//Partie Synopsis et details :
CurPos := Pos('Synopsis et d', HTML);
AddCustomFieldValueByName('Controle parental', TextBetween(HTML,'<span class="insist">','</span>',True,CurPos));
AddFieldValue(13,TextBetween(HTML,'"description">','</p>',True,CurPos));
If Pos('Titre original</div></th><td>',HTML) > 0 then AddFieldValueXML('origtitle',TextBetween(HTML,'Titre original</div></th><td>','</td>',True,CurPos));
CurPos := Pos('e de production',HTML);
If CurPos > 0 then AddFieldValueXML('year',TextBetween(HTML,'">','</span>',True,CurPos));
Details := AddDetails(HTML,'Distributeur','visible"><th><div>Distributeur</div></th><td>',Details);
Details := AddDetails(HTML,'Budget','<div>Budget</div></th><td>',Details);
Details := AddDetails(HTML,'Format de production','Format de production</div></th><td>',Details);
Details := AddDetails(HTML,'Format de projection','Format de projection</div></th><td>',Details);
Details := AddDetails(HTML,'Couleur','Couleur</div></th><td>',Details);
Details := AddDetails(HTML,'Format audio','Format audio</div></th><td>',Details);
Details := AddDetails(HTML,'Type de film','Type de film</div></th><td>',Details);
Details := AddDetails(HTML,'N° de visa','N° de Visa</div></th><td>',Details);
Details := AddDetails(HTML,'Box office France','Box Office France</div></th><td>',Details);
Details := AddDetails(HTML,'Langue','<div>Langue</div></th><td>',Details);
Details := AddDetails(HTML,'Date de sortie VOD','<div>Date de sortie VOD</div></th><td>',Details);
Details := AddDetails(HTML,'Date de sortie DVD','<div>Date de sortie DVD</div></th><td>',Details);
Details := AddDetails(HTML,'Date de sortie Blu-ray','<div>Date de sortie Blu-ray</div></th><td>',Details);
AddCustomFieldValueByName('Details',Details);
END;
I made a small cosmetic correction in this code:
before the cosmetic correction
Function AddDetails(HTML, Name, where, strdetail : string):string;
Var
CurPos : Integer;
Begin
CurPos := Pos(where,HTML);
If Copy(HTML,CurPos+Length(where),3) <> ' - ' then begin
Result := strdetail + Name + ' : ' + TextBetween(HTML,'<td>','</td>',true,CurPos) + #13#10;
end else
Result := strdetail;
end;
after the cosmetic correction
Function AddDetails(HTML, Name, where, strdetail : string):string;
Var
CurPos : Integer;
Begin
CurPos := Pos(where,HTML);
If Copy(HTML,CurPos+Length(where),3) <> ' - ' then begin
Result := strdetail + Name + ' : ' + TextBetween(HTML,'<td>','</td>',true,CurPos) + #13#10;
end else
Result := strdetail;
end;
He is a better overview of data transferred in the
'Details' custom field.
I also made a small cosmetic correction in this code:
//Date de sortie :
TestPos := IfNextStep('<span class="lighten">','Date de sortie',HTML,CurPos);
If TestPos <> CurPos then begin
CurPos := TestPos;
.
.
.
end;
//LogMessage('Date de sortie: ' + DteSortie);
//LogMessage('Duree :' + Duree);
AddCustomFieldValueByName('Date de sortie',DteSortie);
Duree := StringReplace(Duree,'h','h ',True,True,True);
AddCustomFieldValueByName('Duree',Duree);
end;
I don't konw how put the script in download page.
Will arrive explanation of PM until Sunday, sorry, I am currently a little tight at the time.