Page 1 of 2

[REQ] OFDb - IMDb (DE)

Posted: 2005-04-03 19:47:27
by MovieMan
Hello,

since I've updated to v3.50 the script "OFDb - IMDb (DE)" isn't working anymore. It was included in the v3.5-package, but it doesn't appear in the list of scripts. What can I do?

I need the script for the actors and producers of a movie.

Thanks for help and please excuse my bad english.

Regards
Marc

Posted: 2005-04-03 19:54:00
by antp
Open the script window by Tools -> Scripting, select the script, go to Editor, click Properties, set "Get info" to True.
I do not know why it is set to False.
That solves the "not appearing" problem.
If the script does not work, I can't solve that right now, I do not have time for correcting scripts myself unfortunately :(

Posted: 2005-04-03 21:50:05
by MovieMan
:grinking:

Thank you for the fast reply. Now the script appears and works perfect.
Many thanks for that fantastic program... keep on working on it.

Posted: 2005-09-17 01:48:29
by Bad Joker
hi...

i did a small update of the script, there were several minor errors in it.

-the imdb rating is now in the new format (5,5 and not only one number)
-the imdb url is now in the new format (title/tt...)
-if no movie is found, the script ask now for an alternate title instead of showing an empty list
-i updated the info
-the script is now DE/EN

you can find the script here:
http://badjoker.7to.de/newofdbimdb.ifs

and then i have a little question:
is there a way to show the variable MovieName (the title who get searched of) inside the list with the results? in batch mode you can't see which movie is being searched of. when you get more then 5 results it's hard to say which one is searched...

like:

Results of search after 'Movie Name' are:

is there a way to do this??? when yes, how?

thanks for any hints

Posted: 2005-09-17 09:22:31
by antp
Thanks for your script ;)

About your question, you mean the tree displayed? You have the following item added in the list:

Code: Select all

PickTreeAdd('Suchergebnis:', '');
You can do

Code: Select all

PickTreeAdd('Suchergebnis "' + MovieName + '" :', '');
(I do not speak german so you would have to change the text to the equivalent of search result for "...")

Posted: 2005-09-17 16:13:44
by Bad Joker
thanks, that's what i searched for...

i'll update the script with it ;)

Posted: 2005-12-04 07:09:44
by moeff
is it possible to check also the year of a movie instead only the original/translated movie name with a script?

It gives many movies with the same title... but they have differences beetween the release year.

ofdb seems to support to check this!

sorry for my bad english ^^ i'm german :hihi:

Posted: 2005-12-04 12:47:59
by Bad Joker
i don't think so, sorry, because the search string you enter (eg. the title) can only be title information @ ofdb. if you enter it with year he won't find anything.

maybe you could code that, but i think it's a bit tricky...and you have to enter the year before you search into the movie form...

Posted: 2005-12-04 15:02:49
by moeff
the year is a available variable from the movie list for every entry... it only should be checked/parsed with the output of ofdb, so u should have mostly one video at the end in the list...

i know that the searchstring of ofdb only permits the title of a movie... but the result of search lists movies with the release year information...

cu and thx for fast answer ^^

sorry for my bad english again ^^ (wanne a german section here)

Posted: 2005-12-04 15:14:17
by moeff
ah ... also a feature request

if only one entry displayed in the title selection, why this entry not choosed automaticly... ?

traffic of the online dbs?
it could be really the wrong movie?

... that are questions ive asked me^^

Posted: 2005-12-04 15:34:14
by Bad Joker
as i told you, you can code that.

you have to save the year info from the year field and compare that with the results and then just list the movie which match that year.

the other thing is also possible. dunno how exactly atm, but it is, maybe ant can tell us ;)

Posted: 2005-12-04 16:08:14
by moeff
problem I: Only one movie found, update this automatically

Code: Select all

  begin
    PickTreeClear;
    LineNr := FindLine('<b>Titel:</b>', Page, 0);
    if LineNr > 0 then
    begin PickTreeAdd('Suche nach "' + MovieName + '" ergab:', '');
      AddMoviesTitles(Page, LineNr);
      if PickTreeExec(Address) then
         AnalysePage(Address);
    end;
it must be checked how many lines are in the array any solutions? ^^

Posted: 2005-12-04 16:17:06
by Bad Joker
yep try this

Code: Select all

change to:
if LineNr > 0 then
  if LineNr >1 then
    begin PickTreeAdd('Suche nach "' + MovieName + '" ergab:', ''); 
      AddMoviesTitles(Page, LineNr); 
      if PickTreeExec(Address) then 
         AnalysePage(Address); 
  else
  AnalysePage(Address);
  end;
end;

Posted: 2005-12-04 17:21:32
by moeff
mhh thx^^

but doesn't work :D

Posted: 2006-01-01 18:21:25
by yeti
try this:

Replace complete procedure AddMoviesTitles() with

Code: Select all

function AddMoviesTitles(Page: TStringList; var LineNr: Integer) : string;
var
  Line: string;
  MovieTitle, MovieAddress: string;
  StartPos, EndPos, NumTitles: Integer;
begin
  result := '';
  Line := Page.GetString(LineNr);
  NumTitles := 0;
  repeat
    StartPos := pos('<a href=''view.php?page=film&fid=', Line);
    if StartPos > 0 then
    begin
      Delete(Line, 1, StartPos + 8);
      MovieAddress := copy(Line, 1, pos('''>', Line) - 1);
      StartPos := pos('''>', Line) +2;
      MovieTitle := copy(Line, StartPos, pos('</a>', Line) - StartPos);
      HTMLRemoveTags(MovieTitle);
      NumTitles := NumTitles + 1;
      PickTreeAdd(MovieTitle , 'http://www.ofdb.de/' + MovieAddress);
    end;
  until (StartPos < 1);
  if NumTitles = 1 then result := 'http://www.ofdb.de/' + MovieAddress;
end;
and change in AnalysePage():

Code: Select all

    begin
      PickTreeClear;
      LineNr := FindLine('<b>Titel:</b>', Page, 0);
      if LineNr > 0 then
      begin
        PickTreeAdd('Suche nach "' + MovieName + '" ergab:', '');
        Address := AddMoviesTitles(Page, LineNr);
        if Address = '' then
        begin
          if PickTreeExec(Address) then
            AnalysePage(Address);
        end else
          AnalysePage(Address);
      end;
    end;
happy new year...

Posted: 2006-01-08 00:02:20
by Bad Joker
works fine!

thx alot, i will mail ant the updated script...

Posted: 2006-01-28 08:54:23
by cobrajet
not any more

Posted: 2006-01-28 10:17:08
by Bad Joker
yep, true... but not yet managed to get out why...

..seems ofdb changed some html code...

but i'm too lazy now...anyways, he stops after "function AddMoviesTitles"

maybe this helps

Posted: 2006-01-28 18:14:08
by yeti
Change the line

if pos('<title>OFDb - Übersicht der Filmdaten</title>', Page.Text) > 0 then

to

if pos('<title>OFDb - Suchergebnis', Page.Text) = 0 then

and it works again.

Thx to pfc for the fix.

Posted: 2006-01-28 18:29:05
by Bad Joker
somebody already mailed antoine the script???