Scripts that need to be fixed / Scripts à corriger

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.
J.P.
Posts: 64
Joined: 2006-09-20 09:55:52

Post by J.P. »

the site moviemeter has change his look.
Also the rating are not ok anymore.
I don't now how many raiting they are using.
roma_nel_cuore
Posts: 2
Joined: 2007-04-13 18:44:39
Location: Genk - Belgium

Post by roma_nel_cuore »

moviemeter have a new home page and i think the current scripts not is good.
(sorry 4 my english)
Miss_Kitty
Posts: 14
Joined: 2007-04-14 18:25:03

Post by Miss_Kitty »

Maybe this can help.
Download Script
J.P.
Posts: 64
Joined: 2006-09-20 09:55:52

Post by J.P. »

thank it's works...
roma_nel_cuore
Posts: 2
Joined: 2007-04-13 18:44:39
Location: Genk - Belgium

Post by roma_nel_cuore »

Dankje wel het werkt :grinking:
antp
Site Admin
Posts: 9636
Joined: 2002-05-30 10:13:07
Location: Brussels
Contact:

Post by antp »

Thank you very much, this helps me as I did not really had time for working on the script.
But as it is a modification of the existing script (rather than a whole new one), you could add your name before or after mine rather than replacing it :p
namruuh
Posts: 6
Joined: 2006-04-17 15:55:13

Post by namruuh »

yes, it does work again, great job!
Miss_Kitty
Posts: 14
Joined: 2007-04-14 18:25:03

Post by Miss_Kitty »

@antp: Sorry for replacing your name with mine... It was my first attempt to modify a script and did not expect it to work or even release it...:)
But once it did work, I forgot to adjust the properties again... :ha:

I corrected my mistake, cleaned up the source a bit and uploaded the new file.

Anyway, I love your Movie Catalog program. :grinking:
antp
Site Admin
Posts: 9636
Joined: 2002-05-30 10:13:07
Location: Brussels
Contact:

Post by antp »

Thanks ;)
I kept both name in "authors" in the version included on my server.
Miss_Kitty
Posts: 14
Joined: 2007-04-14 18:25:03

Post by Miss_Kitty »

antp wrote:Thanks ;)
I kept both name in "authors" in the version included on my server.
That's even better... :) Again I replaced my version with yours in my .rar so now there's only one version to download.
vlada_sk8
Posts: 2
Joined: 2007-04-15 17:56:08

Post by vlada_sk8 »

Something is wrong with moviegoods.com script! i thing that search line was change!! Cheers
Miss_Kitty
Posts: 14
Joined: 2007-04-14 18:25:03

Post by Miss_Kitty »

vlada_sk8 wrote:Something is wrong with moviegoods.com script! i thing that search line was change!! Cheers
Maybe this will help?

Code: Select all

program MOVIEGOODS;

var
  MovieName: string;
  MovieURL: string;
  ImageURL: string;
  ImageName: string;

// STRING PROCEDURES (don't delete any part of this)
procedure CutAfter(var Str: string; Pattern: string);
begin
  Str := Copy(str, Pos(Pattern, Str) + Length(Pattern), Length(Str));
end;
procedure CutBefore(var Str: string; Pattern: string);
begin
  Str := Copy(Str, Pos(Pattern, Str), Length(Str));
end;
// GetStringFromHTML funtion
function GetStringFromHTML(Page, StartTag, CutTag, EndTag: string): string;
begin
  Result := '';
  if Pos(StartTag, Page) > 0 then begin
    CutBefore(Page, StartTag);
    if Length(CutTag) > 0 then
      CutAfter(Page, CutTag);
    Result := Copy(Page, 0, Pos(EndTag, Page) - 1);
    HTMLDecode(Result);
  end;
end;
// END OF STRING PROCEDURES
// Anaylze main title
procedure AnalyzePage(Address: string);
var
  Page: TStringList;
begin
  Page := TStringList.Create;
  Page.Text := GetPage(Address);
  if pos('<table width="100%" height="100%">', Page.Text) = 0 then
  begin
    ShowMessage('Sorry no cover available!');
  end else
  begin
      PickTreeClear;
      PickTreeAdd('Search results', '');
      AddMoviesTitles(Page);
    if PickTreeExec(Address) then
       AnalyzePage2(Address);
  end;
  Page.Free;
end;

// Analyze exist posters for the main title
procedure AnalyzePage2(Address: string);
var
  Page: TStringList;
  URL: string;
begin
  Page := TStringList.Create;
  Page.Text := GetPage(Address);
       PickTreeClear;
        PickTreeAdd('Available Poster Types', '');
        AddMoviesTitles2(Page);
        if PickTreeExec(Address) then
        GetPicture (Address);
  Page.Free;
end;

// Add the name of the searched movies
procedure AddMoviesTitles(ResultsPage: TStringList);
var
  Page: string;
  MovieTitle, MovieAddress: string;
begin
  Page := ResultsPage.Text;
  while Pos('<table width="100%" height="100%">', Page) > 0 do
  begin
    CutBefore(Page, '<table width="100%" height="100%">');
    MovieAddress := GetStringFromHTML(Page, 'a href="', 'href="', '"');
    MovieTitle := GetStringFromHTML(Page, '<b>', '', '</b>');
    ImageURL:= 'http://www.moviegoods.com/Assets/product_images/1000/'+GetStringFromHTML(Page, 'width="120"><img src="', 'src="', '"');
    CutAfter(Page, '</a>');
    MovieAddress := StringReplace(MovieAddress, '1000.A', '1020.A');
    HTMLRemoveTags(MovieTitle);
    PickTreeAdd(MovieTitle, MovieAddress+ImageURL);
  end;
end;

// add the poster names for the searched title
procedure AddMoviesTitles2(ResultsPage: TStringList);
var
  Page: string;
  MovieTitle, MovieAddress: string;
begin
  Page := ResultsPage.Text;
  while Pos('<INPUT TYPE="HIDDEN" NAME="DSP_IMAGE" VALUE="', Page) > 0 do
  begin
    CutBefore(Page, '<INPUT TYPE="HIDDEN" NAME="DSP_IMAGE" VALUE="');
    MovieAddress := 'http://www.moviegoods.com/Assets/product_images/1000/'+GetStringFromHTML(Page, '<INPUT TYPE="HIDDEN" NAME="DSP_IMAGE" VALUE="', 'UE="', '">');
    MovieTitle := GetStringFromHTML(Page, 'border=2 ALT=', '"', '></A>');
    MovieAddress := StringReplace(MovieAddress, '1000.A', '1020.A');
    CutAfter(Page, '">');
    HTMLRemoveTags(MovieTitle);
    PickTreeAdd(MovieTitle, MovieAddress);
  end;
end;
begin
  if CheckVersion(3,5,0) then
  begin
    MovieName := GetField(fieldOriginalTitle);
    if MovieName = '' then
      MovieName := GetField(fieldTranslatedTitle);
    if Input('MovieGoods Poster Import 0.3', 'Please enter English title:', MovieName) then
    begin
      AnalyzePage('http://search.moviegoods.com/search?w='+UrlEncode(MovieName)+'&Go2.x=0&Go2.y=0');
    end;
  end
  else
    ShowMessage('This script requires a newer version of Ant Movie Catalog (at least the version 3.5.0)');
end.
vlada_sk8
Posts: 2
Joined: 2007-04-15 17:56:08

Post by vlada_sk8 »

yeah friend! that is! little change in margins! i don't know php and java! I didn't saw when they change! thanx very much, must be update on server! Hello from Serbia!!!!
bruuss
Posts: 4
Joined: 2007-04-22 14:32:02

Post by bruuss »

1) IMDB script is not working anymore :( It simply returns "http://www.imdb.com/title/tt"
Can smb help with this issue?

2) ImpAwards script does not work as it should be - sometimes it finds the movie, but sometimes not (when the movie poster is actually in their database). I also failed to find an update for this script under author's script directory. Am I blind to see it, or is it actually not supported anymore?

Thanks,
antp
Site Admin
Posts: 9636
Joined: 2002-05-30 10:13:07
Location: Brussels
Contact:

Post by antp »

1. For me the latest version of the IMDB script ( www.antp.be/temp/scripts ) seems to work. If it fails with that one, try to disable your firewall just to test, to see if it is its fault. Else give the title of the movie that causes that problem.

2. That script was last updated two years ago, so maybe the site changed. Someone would have to update it if it does not work correctly.
bruuss
Posts: 4
Joined: 2007-04-22 14:32:02

Post by bruuss »

1) sorry, my mistake. my proxy was playing tricks with me
2) yes, there certainly are problems with Impawards script. I am no programmer though.. :( Can smb pls fix this for me or at least tell me where to look and how to do this? :ha: This is really my #1 choice for film posters. They have high quality, lots of choice for most of them.. :grinking:

P.S. antp, thanks for the program, it's really great, I've been using it for couple of years now and entered quite a decent number of films. really useful to take a look back and see what was what. thx
AHAC
Posts: 1
Joined: 2007-05-02 09:28:04

Post by AHAC »

antp wrote:1. For me the latest version of the IMDB script ( www.antp.be/temp/scripts ) seems to work.
At first a big THX to the creators of this stuff!
I used Colectorz.com a while but after some issues with script I gave Ant a try and decided that it was perfect for the job.

Off topic: I liked the layout of Colectorz a bit more, (the picture within the film properties) but at least Ant is working all the time..

About IMDB I had no problems after creating the script today, the 2th of may 2007, but I search for the link that IMDB give for a movie.
So I go to their website and search, after the movie is found I copy the URL into scenario and the film is correctly added to Ant.
Its a workaround but I don't have hundreds of movies to add every day, so it will do for me...
kaas
Posts: 8
Joined: 2006-11-06 07:05:28

Post by kaas »

MovieMeter.nl script doesn't work again. Can someone figure out the problem? When I try to search a movie the script everytime returns "Nothing found".
Freak
Posts: 7
Joined: 2005-10-07 07:11:31
Location: The Netherlands
Contact:

Post by Freak »

Same problem here (moviemeter)

:(
bad4u
Posts: 1148
Joined: 2006-12-11 22:54:46

Post by bad4u »

MovieMeter (NL) fixed. I changed two lines within the script :

Code: Select all

AnalyzeResultsPage('http://www.moviemeter.nl/?search&q='+UrlEncode(MovieName));
to

Code: Select all

AnalyzeResultsPage('http://www.moviemeter.nl/film/search/'+UrlEncode(MovieName));
and

Code: Select all

Line := TextBetween(Page.Text, 'class="filmresults_row1">', '<form action="http://www.moviemeter.nl/film/search/"');
to

Code: Select all

if Pos('Zoekresultaten in films:', Page.Text) > 0 then
  Line := TextBetween(Page.Text, 'Zoekresultaten in films:</p>', '<form action="http://www.moviemeter.nl/film/search/"');
if Pos('Alle zoekresultaten in films:', Page.Text) > 0 then
   Line := TextBetween(Page.Text, 'Alle zoekresultaten in films:</p>', '<form action="http://www.moviemeter.nl/film/search/"');
Line := TextBetween(Line, '</p></div>', '<p><br /></p>');
Maybe you can find a more elegant solution for the second workaround, but you should know that Line := TextBetween(Page.Text, 'class="filmresults_row1 first" >', '<form action="http://www.moviemeter.nl/film/search/"'); will not work with all films!

Download : http://bad4u.saveitfree.com/scripts/Mov ... 8NL%29.ifs

@Antoine: Just want to mention that I set version number from 2.6.1. to 2.6.2 . If you don't like it, you can use it as basis for your own corrections. If you like it, upload it ;)
Post Reply