[FR] Script de Monsieur Cinéma...

If you made a script you can offer it to the others here, or ask help to improve it. You can also report here bugs & problems with existing scripts.
Post Reply
Major

[FR] Script de Monsieur Cinéma...

Post by Major »

J'aimerais ajouter l'anecdote dans la partie des commentaires, est-ce faisable ?
Merci
antp
Site Admin
Posts: 9651
Joined: 2002-05-30 10:13:07
Location: Brussels
Contact:

Post by antp »

Probablement
Major

Post by Major »

Voici le code pour importer l'histoire dans la description:

// Description
BeginPos := Pos('<td>', Fullpage);
EndPos := Pos('</td>', Fullpage);
Value := Copy(Fullpage, BeginPos, EndPos - BeginPos);
Delete(Fullpage, 1, EndPos);
EndPos := Pos('[<a href="histoire', Value);
if EndPos > 0 then
begin
BeginPos := EndPos + 10;
EndPos := Pos('">', Value);
Value := Copy(Value, BeginPos, EndPos - BeginPos);
Line := GetPage('http://www.monsieurcinema.tiscali.fr/commun/film/' + Value);
BeginPos := Pos('<table width="100%" border="0" cellspacing="0" cellpadding="4">', Line);
Delete(Line, 1, BeginPos);
BeginPos := Pos('<p>', Line);
Delete(Line, 1, BeginPos + 2);
EndPos := Pos('</td>', Line);
Value := Copy(Line, 1, EndPos - 1);
end;
HTMLRemoveTags(Value);
SetField(fieldDescription, Trim(Value));

J'ai remplacé 'histoire' (5e ligne) par 'anecdote' et fieldDescription (dernière ligne) par fieldComments, mais ça ne marche pas.

Quelqu'un d'autre aurait une suggestion ?
Merci
Post Reply