www.movieweb.com (request)

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
shitty
Posts: 2
Joined: 2006-06-17 12:05:31

www.movieweb.com (request)

Post by shitty »

I've been having all kinds of problems with dvdempire, just like everyone else :(

After digging around the web to find a place with review and posters, I finally found a place that has great reviews and high quality posters...but I can't write code worth a da#n :cry:

I was wondering if one of the coders :grinking: could look at this site and see if it's possible!

Thanks in advance!
slasher
Posts: 13
Joined: 2007-05-05 18:07:33

Post by slasher »

I'll second this request, please.

Thanks in advance!!!
legrad
Posts: 109
Joined: 2006-02-11 09:46:06
Location: Lerida-Spain

Post by legrad »

Un saludo
(Supongo que se solicitaba un script para MOVIEWEB)
SLASHER espero que puedas explicar en ingles lo que a continuacion explico, ya que soy bastante torpe en ingles (para que el que solicita el script MOVIEWEB pueda entenderlo, gracias)

Bueno aqui posteo mi script particular de dvdempire en alguna busqueda no esta muy fino pero va bastante bien, tambien posteo el de MOVIEWEB lo he probado con 15 ó 20 peliculas y parece que funciona .
en fin ahi va. Al copiar el script DVDempire, aqui en el post, se produce un salto de carro en el apartado Caratula,y abajo del todo analizepage, abre el script
con el bloc de notas, y unes las lineas para que no haya saltos de carro(Linea 346-349 y 365) En cuanto al de movieweb hay alguna caratula que no esta en web es un vinculo a otra web de tal forma que en este caso solo carga la caratula pequeña, espero que sirvan los scripts




DVDempire (Legrad)

Code: Select all

(***************************************************

Ant Movie Catalog importation script
www.antp.be/software/moviecatalog/

[Infos]
Authors=Legrad 
Title=DVDEmpire (Legrad) 
Description= 
Site=www.dvdempire.com 
Language=EN 
Version=1.0 
Requires=3.5.0 
Comments= 
License= 
GetInfo=1

[Options]

***************************************************)

 
program DVDEmpire; 
uses 
   StringUtils1; 
var 
  MovieName: string; 
  MovieURL: string; 
//----------------------------------------------------------------------- 
function BorraComillas(var S: string): string; 
var 
   n,len, tag: Integer; 
   c: char; 
   t: String; 
begin 
   tag := 0; 
   t := ''; 
   len := length(s); 
   for n :=1 to len do 
   begin 
     c := Copy(s,n,1); 
     if c = '''' then 
        c := ' '; 
        t := t + c; 
   end 
   s := t; 
   result := t; 
end; 
//----------------------------------------- 
 function DeleteTags(var S: string): string; 
var 
   n,len, tag: Integer; 
   c: char; 
   t: String; 
begin 

   tag := 0; 
   t := ''; 
   len := length(s); 

   for n :=1 to len do 
   begin 
      c := Copy(s,n,1); 
      if c = #9 then 
         c := ' '; 

      if(tag=1) then 
      begin 
         if(c='>') then tag := 0; 
         continue; 
      end 
      else 
      begin 
         if(c='<') then 
         begin 
            tag := 1; 
            continue; 
         end; 
         t := t + c; 
      end; 
   end 
   s := t; 
   result := t; 
end; 
//--------------------------------------- 

procedure AnalyzePage(Address: string); 
var 
  strPage, MovieAddr, MovieTitle, MovieDate, MovieID: string; 
  BeginPos, EndPos: Integer; 
begin 
  strPage := GetPage(Address); 
  BeginPos := Pos('en el dominio <b>www.dvdempire.com</b>', strPage); 
  if(BeginPos > -1)then 
    begin 
      PickTreeClear; 
      Delete(strPage, 1, BeginPos); 
      BeginPos := Pos('href="http://www.dvdempire.com/', strPage); 
      EndPos := 1; 
      while ((BeginPos > 0) and (EndPos > 0)) do 
        begin 
          Delete(strPage, 1, BeginPos); 
          EndPos := Pos('" class', strPage); 
          MovieId := Copy(strPage, +36, EndPos -36); 
          MovieAddr := 'http://www.dvdempire.com/Exec/' + MovieId; 
          BeginPos := Pos(')">', strPage); 
          EndPos := Pos('</h2>', strPage); 
          MovieTitle := Copy(strPage, BeginPos, EndPos - BeginPos); 
          MovieTitle := TextBetween ( MovieTitle, 'Item - ', '</a>'); 
          MovieTitle  := StringReplace(MovieTitle , '/ DVD-video', ''); 
          MovieTitle  := StringReplace(MovieTitle , '/ DVD', ''); 
          MovieTitle  := StringReplace(MovieTitle , '&#;', ''); 
          MovieTitle  := StringReplace(MovieTitle , '39;', ''); 
          MovieTitle  := StringReplace(MovieTitle , '&', ''); 
          DeleteTags(MovieTitle); 
          PickTreeAdd(MovieTitle, MovieAddr); 
          BeginPos := Pos('href="http://www.dvdempire.com/Exec/', strPage); 
          if(Pos('</body>', strPage) < BeginPos) then 
           BeginPos := -1; 
           PickTreeSort; 
        end; 
    end; 
    PickTreeExec(Address) 
    AnalyzeMoviePage(Address); 
end; 
//------------------------------------------------------------------------------ 
 procedure AnalyzeMoviePage(Address: string); 
var 
  Page: TStringList; 
  LineNr: Integer; 
  Line: string; 
  Item: string; 
  Comments: string; 
  Actors: string; 
  Directors: string; 
  Description: string; 
  URL: string; 
  Mivar: string; 
begin 
  Description := ''; 
  Comments:= ''; 

  // URL 
  SetField(fieldURL, Address); 
  Page := TStringList.Create; 
  Page.Text := GetPage(Address); 

  // Titulo traducido 
  LineNr := FindLine('- Item -', Page, 0); 
  if LineNr <> -1 then 
  begin 
    Line := Page.GetString(LineNr); 
    Item := TextBetween (Line, '- Item -', '/'); 
    HTMLDecode(Item); 
    SetField(fieldTranslatedTitle, Trim (Item)); 
  end; 
  
    // Titulo original 
  LineNr := FindLine('- Item -', Page, 0); 
  if LineNr <> -1 then 
  begin 
    Line := Page.GetString(LineNr); 
    Item := TextBetween (Line, '- Item -', '/'); 
    HTMLDecode(Item); 
    SetField(fieldOriginalTitle, Trim (Item)); 
  end; 
  
  // director 
  LineNr := FindLine('<b>Directors:</b><br />', Page, 0); 
  if LineNr <> -1 then 
  begin 
    Item := copy(Page.Text, pos('<b>Directors:</b><br />',Page.Text), length(Page.Text)); 
    Item := TextBetween (Item, '">', '/><br'); 
    Item  := Trim(Item ); 
    DeleteTags(Item); 
    HTMLDecode(Item); 
    SetField(fieldDirector, Trim (Item)); 
  end; 
  
  // Productor 
  LineNr := FindLine('<b>Producers:</b><br />', Page, 0); 
  if LineNr <> -1 then 
  begin 
    Item := copy(Page.Text, pos('<b>Producers:</b><br />',Page.Text), length(Page.Text)); 
    Item := TextBetween (Item, '">', '/><br'); 
    Item  := Trim(Item ); 
    DeleteTags(Item); 
    HTMLDecode(Item); 
    SetField(fieldProducer, Trim (Item)); 
  end; 
  // Actores 
  LineNr := FindLine('<b>Actors:</b><br />', Page, 0); 
  if LineNr <> -1 then 
  begin 
    Item := copy(Page.Text, pos('<b>Actors:</b><br />',Page.Text), length(Page.Text)); 
    Item := TextBetween (Item, '">', '</td><td'); 
    Item := StringReplace(Item ,#13#10, ''); 
    Item := StringReplace(Item ,'>•',''); 
    Item := StringReplace(Item ,' ', ', '); 
    DeleteTags (Item); 
    Item := StringReplace(Item ,', , ', ', '); 
    SetField(fieldActors, Trim (Item)); 
  end; 

   // Argumento 
  LineNr := FindLine('<b>Synopsis</b>', Page, 0); 
  if LineNr <> -1 then 
  begin 
    Item := copy(Page.Text, pos('<b>Synopsis</b>',Page.Text), length(Page.Text)); 
    Item := TextBetween (Item, 'fontsmall3">', '</td>'); 
    Item := StringReplace(Item , #13#10, ''); 
    Item  := StringReplace(Item , '   ', ''); 
    Item  := Trim(Item ); 
    DeleteTags(Item); 
    HTMLDecode(Item); 
    SetField(fieldDescription, Trim (Item)); 
  end; 
  
  // Año 
  LineNr := FindLine('Year:</b>', Page, 0); 
  if LineNr <> -1 then 
  begin 
    Line := Page.GetString(LineNr); 
    Item := TextBetween (Line, 'Year:</b>', ' '); 
    DeleteTags (Item); 
    HTMLDecode(Item); 
    SetField(fieldYear, Trim (Item)); 
  end; 
  
  // Duración 
  LineNr := FindLine('Length:</b>', Page, 0); 
  if LineNr <> -1 then 
  begin 
    Line := Page.GetString(LineNr); 
    Item := TextBetween (Line, 'Length:</b>', 'mins'); 
    HTMLDecode(Item); 
    SetField(fieldLength, Trim (Item)); 
  end; 
  
  // Género 
  LineNr := FindLine('<b>Genre</b>:', Page, 0); 
  if LineNr <> -1 then 
  begin 
    Item := copy(Page.Text, pos('<b>Genre</b>:',Page.Text), length(Page.Text)); 
    Item := TextBetween (Item, '">', '</td>'); 
    Item := StringReplace(Item , #13#10, ''); 
    Item  := StringReplace(Item , 'id=', ', '); 
    Item  := Trim(Item ); 
    DeleteTags(Item); 
    HTMLDecode(Item); 
    SetField(fieldCategory, Trim (Item)); 
  end; 
  
  // Writers 
  LineNr := FindLine('<b>Writers:</b>', Page, 0); 
  if LineNr <> -1 then 
  begin 
    Item := copy(Page.Text, pos('<b>Writers:</b>',Page.Text), length(Page.Text)); 
    Item := TextBetween (Item, '">', '</a><br />'); 
    DeleteTags(Item); 
    HTMLDecode(Item); 
    Comments := Comments + 'Writers: '+Item+#13#10; 
  end; 
  
  // Authors 
  LineNr := FindLine('<b>Authors:</b>', Page, 0); 
  if LineNr <> -1 then 
  begin 
    Item := copy(Page.Text, pos('<b>Authors:</b>',Page.Text), length(Page.Text)); 
    Item := TextBetween (Item, '">', '</a><br />'); 
    HTMLDecode(Item); 
    Comments := Comments + 'Authors: '+Item+#13#10; 
  end; 
  
  // Studio 
  LineNr := FindLine('<b>Studio:</b>', Page, 0); 
  if LineNr <> -1 then 
  begin 
    Item := copy(Page.Text, pos('<b>Studio:</b>',Page.Text), length(Page.Text)); 
    Item := TextBetween (Item, 'studio_id=', '</a><br />'); 
    Item  := StringReplace(Item , '>', ''); 
    Item  := StringReplace(Item , '1', ''); 
    Item  := StringReplace(Item , '2', ''); 
    Item  := StringReplace(Item , '3', ''); 
    Item  := StringReplace(Item , '4', ''); 
    Item  := StringReplace(Item , '5', ''); 
    Item  := StringReplace(Item , '6', ''); 
    Item  := StringReplace(Item , '7', ''); 
    Item  := StringReplace(Item , '8', ''); 
    Item  := StringReplace(Item , '9', ''); 
    Item  := StringReplace(Item , '0', ''); 
    BorraComillas(Item); 
    DeleteTags(Item); 
    HTMLDecode(Item); 
    Comments := Comments + 'Studio: '+Item+#13#10+'*******************'+#13#10; 
  end; 
  
  // Features 
  LineNr := FindLine('<b>Features:</b>', Page, 0); 
  if LineNr <> -1 then 
  begin 
    Item := copy(Page.Text, pos('<b>Features:</b>',Page.Text), length(Page.Text)); 
    Item := TextBetween (Item, 'fontsmall2', '</td></tr><tr><td><b>'); 
    BorraComillas(Item); 
    DeleteTags(Item); 
    HTMLDecode(Item); 
    Item  := StringReplace(Item , '>', ''); 
    Comments := Comments + 'Features: '+#13#10+Item+#13#10+'*******************'+#13#10; 
  end; 
  
  // Video 
  LineNr := FindLine('<b>Video:</b>', Page, 0); 
  if LineNr <> -1 then 
  begin 
    Item := copy(Page.Text, pos('<b>Video:</b>',Page.Text), length(Page.Text)); 
    Item := TextBetween (Item, 'fontsmall2', '</td></tr>'); 
    BorraComillas(Item); 
    DeleteTags(Item); 
    HTMLDecode(Item); 
    Item  := StringReplace(Item , '>', ''); 
    Comments := Comments + 'Video: '+Item+#13#10; 
  end; 

  // Audio 
  LineNr := FindLine('<b>Audio:</b>', Page, 0); 
  if LineNr <> -1 then 
  begin 
    Item := copy(Page.Text, pos('<b>Audio:</b>',Page.Text), length(Page.Text)); 
    Item := TextBetween (Item, 'fontsmall2', '</td></tr>'); 
    BorraComillas(Item); 
    DeleteTags(Item); 
    HTMLDecode(Item); 
    Item  := StringReplace(Item , '>', ''); 
    Comments := Comments + 'Audio: '+#13#10+Item+#13#10+'*******************'+#13#10; 
  end; 
  
  // Subtitles 
  LineNr := FindLine('<b>Subtitles:</b>', Page, 0); 
  if LineNr <> -1 then 
  begin 
    Item := copy(Page.Text, pos('<b>Subtitles:</b>',Page.Text), length(Page.Text)); 
    Item := TextBetween (Item, 'fontsmall2', '</td></tr>'); 
    BorraComillas(Item); 
    DeleteTags(Item); 
    HTMLDecode(Item); 
    Item  := StringReplace(Item , '>', ''); 
    Comments := Comments + 'Subtitles: '+Item+#13#10+'*******************'+#13#10; 
  end; 
  
  // Others 
  LineNr := FindLine('Length:', Page, 0); 
  if LineNr <> -1 then 
  begin 
    Item := copy(Page.Text, pos('Length:',Page.Text), length(Page.Text)); 
    Item := TextBetween (Item, '<br /><b>', '</table>'); 
    Item  := StringReplace(Item , '<br />',#13#10); 
    BorraComillas(Item); 
    DeleteTags(Item); 
    HTMLDecode(Item); 
    Item  := StringReplace(Item , '>', ''); 
    Comments := Comments +Item; 
  end; 

  SetField(fieldComments, Comments); 

  // Caratula 
  LineNr := FindLine('<table style="padding-bottom:10px" width="100%" border="0" cellspacing="0" cellpadding="0">', Page, 0);
  if LineNr <> -1 then 
  begin 
    Item := copy(Page.Text, pos('<table style="padding-bottom:10px" width="100%" border="0" cellspacing="0" cellpadding="0">',Page.Text), length(Page.Text));
    Item := TextBetween (Item, 'http://images2.dvdempire.com/gen/', '.jpg'); 
     GetPicture ('http://images2.dvdempire.com/gen/'+Item+'h'+'.jpg'); 
  end; 
end; 
//------------------------------------------------------------------------------------ 
begin 
if (CheckVersion(3,5,0)=FALSe) then 
   begin 
      ShowMessage('Se requiere Ant Movie Catalog versión 3.5 o superior'); 
      exit; 
   end; 
   MovieName := GetField(fieldOriginalTitle); 
      if MovieName = '' then 
         MovieName := GetField(fieldTranslatedTitle); 
         Input('DVDempire', 'Films:', MovieName); 
   AnalyzePage('http://www.google.es/search?num=100&hl=es&as_qdr=all&q=allintitle%3A+'UrlEncode(MovieName)+'+site%3Awww.dvdempire.com&btnG=B%C3%BAsqueda&meta=');
end.
MovieWeb

Code: Select all

(***************************************************

Ant Movie Catalog importation script
www.antp.be/software/moviecatalog/

[Infos]
Authors=Legrad
Title=MovieWeb
Description=
Site=www.movieweb.com
Language=EN
Version=1.0
Requires=3.5.0
Comments=
License=
GetInfo=1

[Options]

***************************************************)
program MovieWeb;
uses
   StringUtils1;
var
  MovieName: string;
  MovieURL: string;
//-----------------------------------------------------------------------
function BorraComillas(var S: string): string;
var
   n,len, tag: Integer;
   c: char;
   t: String;
begin
   tag := 0;
   t := '';
   len := length(s);
   for n :=1 to len do
   begin
     c := Copy(s,n,1);
     if c = '''' then
        c := ' ';
        t := t + c;
   end
   s := t;
   result := t;
end;
//-----------------------------------------
 function DeleteTags(var S: string): string;
var
   n,len, tag: Integer;
   c: char;
   t: String;
begin

   tag := 0;
   t := '';
   len := length(s);

   for n :=1 to len do
   begin
      c := Copy(s,n,1);
      if c = #9 then
         c := ' ';

      if(tag=1) then
      begin
         if(c='>') then tag := 0;
         continue;
      end
      else
      begin
         if(c='<') then
         begin
            tag := 1;
            continue;
         end;
         t := t + c;
      end;
   end
   s := t;
   result := t;
end;
//---------------------------------------

procedure AnalyzePage(Address: string);
var
  strPage, MovieAddr, MovieTitle, MovieDate, Page, MovieID: string;
  BeginPos, EndPos: Integer;
begin
  strPage := GetPage(Address);
  BeginPos := Pos('Your search returned the following results for:', strPage);
  if(BeginPos > -1)then
    begin
      PickTreeClear;
      Delete(strPage, 1, BeginPos);
      BeginPos := Pos('/movies/film/', strPage);
      EndPos := 1;
      while ((BeginPos > 0) and (EndPos > 0)) do
        begin
          Delete(strPage, 1, BeginPos);
          EndPos := Pos('.php', strPage);
          MovieId := Copy(strPage, +13, EndPos -13);
          MovieId := StringReplace ( MovieId, 'reviews', 'summary');
          MovieAddr := 'http://www.movieweb.com/movies/film/' + MovieId+'.php';
          BeginPos := Pos('nodec', strPage);
          EndPos := Pos('</h5>', strPage);
          MovieTitle := Copy(strPage, BeginPos, EndPos - BeginPos);
          MovieTitle := TextBetween ( MovieTitle, '>', '</a>');
          DeleteTags(MovieTitle);
          PickTreeAdd(MovieTitle, MovieAddr);
          BeginPos := Pos('/movies/film/', strPage);
          if(Pos('</body>', strPage) < BeginPos) then
          BeginPos := -1;
          PickTreeSort;
        end;
    end;
    PickTreeSort;
    PickTreeExec(Address)
    AnalyzeMoviePage(Address);
end;
//------------------------------------------------------------------------------
 procedure AnalyzeMoviePage(Address: string);
var
  Page: TStringList;
  LineNr: Integer;
  Line: string;
  Item: string;
  Comments: string;
  Actors: string;
  Directors: string;
  Description: string;
  URL: string;
  Mivar: string;
begin
  Description := '';
  Comments:= '';

  // URL
  SetField(fieldURL, Address);
  Page := TStringList.Create;
  Page.Text := GetPage(Address);

  // Titulo traducido
  LineNr := FindLine('<title>', Page, 0);
  if LineNr <> -1 then
  begin
    Line := Page.GetString(LineNr);
    Item := TextBetween (Line, '<title>', '(');
    HTMLDecode(Item);
    SetField(fieldTranslatedTitle, Trim (Item));
  end;
  
    // Titulo original
  LineNr := FindLine('<title>', Page, 0);
  if LineNr <> -1 then
  begin
    Line := Page.GetString(LineNr);
    Item := TextBetween (Line, '<title>', '(');
    HTMLDecode(Item);
    SetField(fieldOriginalTitle, Trim (Item));
  end;
  
  // Año
  LineNr := FindLine('<title>', Page, 0);
  if LineNr <> -1 then
  begin
    Line := Page.GetString(LineNr);
    Item := TextBetween (Line, '(', ')');
    DeleteTags (Item);
    HTMLDecode(Item);
    SetField(fieldYear, Trim (Item));
  end;
  
  // director
  LineNr := FindLine('/stats/director.gif', Page, 0);
  if LineNr <> -1 then
  begin
    Item := copy(Page.Text, pos('/stats/director.gif',Page.Text), length(Page.Text));
    Item := TextBetween (Item, 'top', '</td>');
    Item := StringReplace(Item ,'&#243','ó');
    Item := StringReplace(Item ,'>','');
    BorraComillas(Item);
    Item  := Trim(Item );
    DeleteTags(Item);
    HTMLDecode(Item);
    SetField(fieldDirector, Trim (Item));
  end;
  
  // Actores
  LineNr := FindLine('stats/starring.gif', Page, 0);
  if LineNr <> -1 then
  begin
    Item := copy(Page.Text, pos('stats/starring.gif',Page.Text), length(Page.Text));
    Item := TextBetween (Item, 'top', '</td></tr>');
    BorraComillas(Item);
    Item := StringReplace(Item ,'&#243','ó');
    Item := StringReplace(Item ,'>','');
    DeleteTags (Item);
    SetField(fieldActors, Trim (Item));
  end;
  
  // Productor
  LineNr := FindLine('stats/studio.gif', Page, 0);
  if LineNr <> -1 then
  begin
    Item := copy(Page.Text, pos('stats/studio.gif',Page.Text), length(Page.Text));
    Item := TextBetween (Item, '#f0f0f0', '</td></tr>');
    BorraComillas(Item);
    Item := StringReplace(Item ,'&#243','ó');
    Item := StringReplace(Item ,'>','');
    Item  := Trim(Item );
    DeleteTags(Item);
    HTMLDecode(Item);
    SetField(fieldProducer, Trim (Item));
  end;
  
  // Género
  LineNr := FindLine('stats/genre.gif', Page, 0);
  if LineNr <> -1 then
  begin
    Item := copy(Page.Text, pos('stats/genre.gif',Page.Text), length(Page.Text));
    Item := TextBetween (Item, 'blacklink', '</a></td>');
    BorraComillas(Item);
    Item := StringReplace(Item ,'&#243','ó');
    Item := StringReplace(Item ,'>','');
    Item  := Trim(Item );
    DeleteTags(Item);
    HTMLDecode(Item);
    SetField(fieldCategory, Trim (Item));
  end;
  // Duración
  LineNr := FindLine('stats/runtime.gif', Page, 0);
  if LineNr <> -1 then
  begin
    Item := copy(Page.Text, pos('stats/runtime.gif',Page.Text), length(Page.Text));
    Item := TextBetween (Item, '#f0f0f0', 'minutes');
    BorraComillas(Item);
    Item := StringReplace(Item ,'>','');
    Item  := Trim(Item );
    DeleteTags(Item);
    HTMLDecode(Item);
    SetField(fieldLength, Trim (Item));
  end;
  
   // Argumento
  LineNr := FindLine('http://movieweb.com/media/use/curve_box_grey/left.gif', Page, 0);
  if LineNr <> -1 then
  begin
    Item := copy(Page.Text, pos('http://movieweb.com/media/use/curve_box_grey/left.gif',Page.Text), length(Page.Text));
    Item := TextBetween (Item, '><tr><td>', 'table');
    Item := StringReplace(Item , #13#10, '');
    Item  := StringReplace(Item , '   ', '');
    Item  := Trim(Item );
    DeleteTags(Item);
    HTMLDecode(Item);
    SetField(fieldDescription, Trim (Item));
  end;
  
  // Writers
  LineNr := FindLine('stats/writer.gif', Page, 0);
  if LineNr <> -1 then
  begin
    Item := copy(Page.Text, pos('stats/writer.gif',Page.Text), length(Page.Text));
    Item := TextBetween (Item, '#f0f0f0', '</td></tr>');
    Item := StringReplace(Item ,'&#243','ó');
    BorraComillas(Item);
    Item := StringReplace(Item ,'>','');
    DeleteTags(Item);
    HTMLDecode(Item);
    Comments := Comments + 'Writers: '+Item+#13#10;
  end;
  
  // Official site
  LineNr := FindLine('stats/officialsite.gif', Page, 0);
  if LineNr <> -1 then
  begin
    Item := copy(Page.Text, pos('stats/officialsite.gif',Page.Text), length(Page.Text));
    Item := TextBetween (Item, 'href=', 'target=');
    BorraComillas(Item);
    DeleteTags(Item);
    HTMLDecode(Item);
    Comments := Comments + 'Official Site: '+Item+#13#10;
  end;
  
  // Rating
  LineNr := FindLine('stats/rating.gif', Page, 0);
  if LineNr <> -1 then
  begin
    Item := copy(Page.Text, pos('stats/rating.gif',Page.Text), length(Page.Text));
    Item := TextBetween (Item, '><b>', '</td></tr>');
    BorraComillas(Item);
    DeleteTags(Item);
    HTMLDecode(Item);
    Comments := Comments + 'Rating: '+Item+#13#10;
  end;
  
  // Box Office
  LineNr := FindLine('stats/box_office.gif', Page, 0);
  if LineNr <> -1 then
  begin
    Item := copy(Page.Text, pos('stats/box_office.gif',Page.Text), length(Page.Text));
    Item := TextBetween (Item, 'film', '</td></tr>');
    BorraComillas(Item);
    DeleteTags(Item);
    HTMLDecode(Item);
    Item  := StringReplace(Item , '>', '');
    Comments := Comments + 'Box Office: '+#13#10;
  end;
  
  // Prod Notes
  LineNr := FindLine('stats/notes.gif', Page, 0);
  if LineNr <> -1 then
  begin
    Item := copy(Page.Text, pos('stats/notes.gif',Page.Text), length(Page.Text));
    Item := TextBetween (Item, 'href=', 'class=');
    BorraComillas(Item);
    DeleteTags(Item);
    HTMLDecode(Item);
    Comments := Comments + 'Prod Notes: '+Item+#13#10;
  end;
  
  SetField(fieldComments, Comments);

  // Caratula
  LineNr := FindLine('http://media.movieweb.com/galleries/', Page, 0);
  if LineNr <> -1 then
  begin
    Item := copy(Page.Text, pos('http://media.movieweb.com/galleries/',Page.Text), length(Page.Text));
    Item := TextBetween (Item, 'http://media.movieweb.com/galleries/', '.jpg');
    Item  := StringReplace(Item , '_full', '');
    GetPicture ('http://media.movieweb.com/galleries/'+Item+'.jpg');
  end;
end;
//------------------------------------------------------------------------------------
begin
if (CheckVersion(3,5,0)=FALSe) then
   begin
      ShowMessage('Se requiere Ant Movie Catalog versión 3.5 o superior');
      exit;
   end;
   MovieName := GetField(fieldOriginalTitle);
      if MovieName = '' then
         MovieName := GetField(fieldTranslatedTitle);
         Input('MovieWeb', 'Films:', MovieName);
   AnalyzePage('http://www.movieweb.com/search/?q=film&search=' + UrlEncode(MovieName));
end.
slasher
Posts: 13
Joined: 2007-05-05 18:07:33

Post by slasher »

Genial, legrad!!! Muchas gracias! :grinking:

Bueno, yo no soy tan bueno con el inglés tampoco, así que trataré de hacerlo lo mejor posible... :p (traducción no literal)

Ok, here's and english translation, requested by legrad, of his previous post:
legrad wrote:Bueno aqui posteo mi script particular de dvdempire en alguna busqueda no esta muy fino pero va bastante bien, tambien posteo el de MOVIEWEB lo he probado con 15 ó 20 peliculas y parece que funciona .
en fin ahi va. Al copiar el script DVDempire, aqui en el post, se produce un salto de carro en el apartado Caratula,y abajo del todo analizepage, abre el script
con el bloc de notas, y unes las lineas para que no haya saltos de carro(Linea 346-349 y 365) En cuanto al de movieweb hay alguna caratula que no esta en web es un vinculo a otra web de tal forma que en este caso solo carga la caratula pequeña, espero que sirvan los scripts
Legrad wrote:
  • Well, I'm posting here my own script to dvdempire. It's not very accurate in some searches, but is working pretty fine. I'm also posting a script to MOVIEWEB. I have tried it with 15 or 20 movies and it seems to be working alright.
    Anyway, there it goes. When you copy the DVDempire script from this post, you get an error in the "Caratula" (cover) field, and below all analizapage. To fix it you must open the script with notepad and join the lines so there is no CR+LF (lines 346-349 and 365).
    About the movieweb script, there are some covers that are not present in the webpage, they're linked to another websites, so in that cases only the small cover will be retrieved. I hope that this scripts can be helpful.
Post Reply