Page 1 of 1

[FR] Correction script Allocine (les 3)

Posted: 2003-06-17 18:42:57
by Nykouze
Hello, c'est la 1ere fois que je poste ici, alors je connais pas toutes les coutumes.
Cependant, j'apporte une petite correction. Allociné a changé ses pages, et on a un probleme lorsque l'on recupere le nom du film (original et traduit).

Donc dans les trois scripts (celui sans l'image et les deux autres), changez ce passage, qui se trouve dans AnalyzeMoviePage

Code: Select all

  // Original & Translated Title
  LineNr := FindLine('<FONT Class="titrePage">', Page, 0);
  if LineNr > -1 then
  begin
    Line := Page.GetString(LineNr);
    BeginPos := pos('<FONT Class="titrePage">', Line) + 24;
    if pos('<font size=2>', Line) = 0 then
    begin
      EndPos := pos('</FONT>', Line);
      Value := copy(Line, BeginPos, EndPos - BeginPos);
      SetField(fieldOriginalTitle, Value);
    end else
    begin
      EndPos := pos('<font size=2>', Line);
      Value := copy(Line, BeginPos, EndPos - BeginPos - 1);
      SetField(fieldTranslatedTitle, Value);
      BeginPos := EndPos + 14;
      EndPos := pos('</font>', Line) - 1;
      Value := copy(Line, BeginPos, EndPos - BeginPos);
      SetField(fieldOriginalTitle, Value);
    end;
par

Code: Select all

 // Original & Translated Title
  LineNr := FindLine('<FONT Class="titrePage">', Page, 0);
  if LineNr > -1 then
 begin
    Line := Page.GetString(LineNr);
    BeginPos := pos('<FONT Class="titrePage">', Line) + 24;
    if pos(')</font></FONT>', Line) = 0 then
    begin
      EndPos := pos('</FONT>', Line);
      Value := copy(Line, BeginPos, EndPos - BeginPos);
      SetField(fieldOriginalTitle, Value);
    end else
    begin
      EndPos := pos('<font >(', Line);
      Value := copy(Line, BeginPos, EndPos - BeginPos - 1);
      SetField(fieldTranslatedTitle, Value);
      BeginPos := EndPos + 8;
      EndPos := pos(')</font>', Line);
      Value := copy(Line, BeginPos, EndPos - BeginPos);
      SetField(fieldOriginalTitle, Value);
    end;
et roulez jeunesse.

Faire des feedbacks si ça marche pas,

A+

Posted: 2003-06-17 21:40:21
by antp
À première vue ça a l'air bon, merci :)
Comme ça je ne devrai pas chercher ce qui posait problème... il va juste falloir que je mette à jour le script sur le site.

Posted: 2003-06-17 21:58:24
by Nykouze
De rien :D

Posted: 2003-06-20 08:54:11
by Frog
What's the purpose of this update? Both versions give me the same result !! :??: :badidea:

Posted: 2003-06-20 09:01:44
by antp
It seems to work fine for me...
What movie titles did you try ?

I'll try to update the program (or at least the scripts) this evening so you can download it.

Posted: 2003-06-20 10:49:40
by Frog
What I mean is that the old version works as good as the new one. So why bother with a new version if the old one works fine?

Posted: 2003-06-20 11:58:50
by antp
There was a problem with the translated title that was set in the original title field, since few days (less than one week).
By the way, why do you speak English and use a script in French ? :D