Update OFDB-IMDB (DE)

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
gerol
Posts: 37
Joined: 2006-08-08 16:12:03

Update OFDB-IMDB (DE)

Post by gerol »

Hi,

you must change the expression

Code: Select all

<i>Keine Ergebnisse</i>
to

Code: Select all

<i>Keine Ergebnisse
otherwise you will not be able to change the movie title, if there is no search result.

Maybe there is another 'bug' (?) in the script: If the same title ist found as 'Exakte Ergebnisse' and as 'Ungefähre Ergebnisse', this title is shown twice as search result. I didn't change the script in this point, because I'm not shure, if this could be important under some circumstances. I think, it's not important.

Next modification is some posts below!
Last edited by gerol on 2008-09-16 16:00:04, edited 1 time in total.
bad4u
Posts: 1148
Joined: 2006-12-11 22:54:46

Post by bad4u »

Thanks. I changed it on the script.
OFDb - IMDb 1.4.0: http://www.bad4u.741.com/full/OFDb%20-% ... 8DE%29.ifs (copy link into a NEW browser window !)
Maybe there is another 'bug' (?) in the script: If the same title ist found as 'Exakte Ergebnisse' and as 'Ungefähre Ergebnisse', this title is shown twice as search result.
That happens when translated and original title of the film are identical. The website search shows movies with matching translated title as "Exakte Ergebnisse" and movies with matching original title as "Ungefähre Ergebnisse" - and so does the script, but as it does not split the results list into categories you cannot see it. I added some code to the script, so that now the results list will be divided into same categories that website shows (Exakte Erebnisse, Sehr ähnliche Ergebnisse, Ungefähre Ergebnisse, ..).
gerol
Posts: 37
Joined: 2006-08-08 16:12:03

Post by gerol »

@bad4u

Your modification works great. Thank you.

But let me remark, that the double entry not only appears, if translated and original title are identical. You can try it for example with the movie 'Adams Äpfel'. The original title is 'Adams æbler' and the translated title 'Adams Äpfel'. The title appears twice as 'Exakte Ergebnisse' and as 'Ungefähre Ergebnisse'.
bad4u
Posts: 1148
Joined: 2006-12-11 22:54:46

Post by bad4u »

Well, I didn't try lots of movies for double results.

In this case it is because of translated title (Adams Äpfel) and alternative title (Adams Äpfel - Gott ist auf meiner Seite) contain the same phrase - instead of the original title. But as the script only shows the same as the website does, and now you get the same categorization on the results list, it doesn't really make sense to change that any more ;)
gerol
Posts: 37
Joined: 2006-08-08 16:12:03

Post by gerol »

Hi,

today the next modification is necessary:

You must change the part

Code: Select all

  // IMDb Rating
  LineNr := FindLine('User Rating:', Page, 0);
  if LineNr > -1 then
    begin
      Line := Page.GetString(LineNr + 1);
      if Pos('awaiting', Line) = 0 then
        begin
          Line := Page.GetString(LineNr + 1);
          BeginPos := pos('<b>', Line) + 3;
          EndPos := BeginPos + 3;
          Value := copy(Line, BeginPos, EndPos - BeginPos);
          SetField(fieldRating, Value);
        end;
    end;
to

Code: Select all

  // IMDb Rating
  LineNr := FindLine('/10</b>', Page, 0);
  if LineNr > -1 then
  begin
      Line := Page.GetString(LineNr);
      BeginPos := pos('<b>', Line) + 3;
      EndPos := BeginPos + 3;
      Value := copy(Line, BeginPos, EndPos - BeginPos);
      SetField(fieldRating, Value);
  end;
otherwise you will not get the IMDb Rating.
Post Reply