[REQ] 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.
MovieMan

[REQ] OFDb - IMDb (DE)

Post 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
antp
Site Admin
Posts: 9629
Joined: 2002-05-30 10:13:07
Location: Brussels
Contact:

Post 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 :(
MovieMan

Post 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.
Bad Joker
Posts: 81
Joined: 2002-06-10 12:46:38
Location: Hamburg, Germany
Contact:

Post 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
antp
Site Admin
Posts: 9629
Joined: 2002-05-30 10:13:07
Location: Brussels
Contact:

Post 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 "...")
Bad Joker
Posts: 81
Joined: 2002-06-10 12:46:38
Location: Hamburg, Germany
Contact:

Post by Bad Joker »

thanks, that's what i searched for...

i'll update the script with it ;)
moeff
Posts: 5
Joined: 2005-12-04 07:00:57

Post 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:
Bad Joker
Posts: 81
Joined: 2002-06-10 12:46:38
Location: Hamburg, Germany
Contact:

Post 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...
moeff
Posts: 5
Joined: 2005-12-04 07:00:57

Post 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)
moeff
Posts: 5
Joined: 2005-12-04 07:00:57

Post 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^^
Bad Joker
Posts: 81
Joined: 2002-06-10 12:46:38
Location: Hamburg, Germany
Contact:

Post 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 ;)
moeff
Posts: 5
Joined: 2005-12-04 07:00:57

Post 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? ^^
Bad Joker
Posts: 81
Joined: 2002-06-10 12:46:38
Location: Hamburg, Germany
Contact:

Post 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;
moeff
Posts: 5
Joined: 2005-12-04 07:00:57

Post by moeff »

mhh thx^^

but doesn't work :D
yeti
Posts: 60
Joined: 2003-09-14 15:50:05

Post 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...
Bad Joker
Posts: 81
Joined: 2002-06-10 12:46:38
Location: Hamburg, Germany
Contact:

Post by Bad Joker »

works fine!

thx alot, i will mail ant the updated script...
cobrajet
Posts: 11
Joined: 2003-09-17 09:07:14

Post by cobrajet »

not any more
Bad Joker
Posts: 81
Joined: 2002-06-10 12:46:38
Location: Hamburg, Germany
Contact:

Post 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
yeti
Posts: 60
Joined: 2003-09-14 15:50:05

Post 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.
Bad Joker
Posts: 81
Joined: 2002-06-10 12:46:38
Location: Hamburg, Germany
Contact:

Post by Bad Joker »

somebody already mailed antoine the script???
Post Reply