|
|
| 20/6/07 11:00:04 |
 | chavess | Votos: 26 Críticas: 0 Mensajes: 3 |
|
|
Cita: Wenas!
chavess, ¿has actualizado el script del AMC? Con el nuevo script que aparece unos post más arriba funciona perfectamente
Salu2. |
Sí, es el que tengo, y el AM es la v.3.5.0.2
|
| 20/6/07 14:21:09 |
 | Merri | Votos: 751 Críticas: 7 Mensajes: 1039 |
|
|
Wenas!
chavess, si no te funciona no sé a qué se debe porque, vuelto a comprobar ahora mismo, funciona bien
Salu2.
|
| 20/6/07 15:26:10 |
 | pantic | Votos: 422 Críticas: 1 Mensajes: 221 |
|
|
Chavess mira a ver que en la pantalla del script del ant, el script de alpacine aparece con nombre distinto al que tenia anteriormente ahora aparece con el nombre cine -alpacine
Saludoss y a ver si hay suerte
|
| 20/6/07 17:15:42 |
 | focuskan | Votos: 266 Críticas: 19 Mensajes: 396 |
|
|
Wenas,
Sip, como dice Pantic, el problema puede venir por ahi y que el archivo se llama "alpacine (ES).ifs" y el q tuvieras anteriormente no tenga ese nombre.
Si quieres ponerlo bien, editas el fichero con el bloc de notas y en las primeras lineas te indica esto:
Cita: Ant Movie Catalog importation script
www.antp.be/software/moviecatalog/
[Infos]
Authors=
Title=Cine-Alpacine
Description=
Site=www.alpacine.com
Language=Cine
Version=1.1
Requires=3.5.0
Comments=
License=
GetInfo=1 |
Solo tiene q cambiar "Title=Cine-Alpacine" por "Title=Alpacine".
Salu2!
|
| 20/6/07 21:16:48 |
 | chavess | Votos: 26 Críticas: 0 Mensajes: 3 |
|
|
Bueno, ya esta solucionado, reinstale el AM y cambie esa linea.
Gracias a todos.
|
| 20/6/07 22:07:26 |
|
|
Actualizado el script y sin problemas.
Gracias
Salu2.
|
| 28/7/07 20:25:21 |
 | Triki | Votos: 108 Críticas: 6 Mensajes: 136 |
|
|
Buenas no sé si a alguno más le ha pasado, al crear algunas fichas el año de la película no aparece, me había pasado ya antes y hoy me he acordado de postearlo  . Si lo quereis probar me ha pasado con la película Quiz Show
|
| 28/7/07 21:27:51 |
 | focuskan | Votos: 266 Críticas: 19 Mensajes: 396 |
|
|
Sip, el script se lia un poco cuando el titulo de la pelicula lleva paréntesis como el caso que citas de Quiz Show (El Dilema).
Prueba ahora, buscando por "dilema" y te saldrá bien.
Salu2!
|
| 6/8/07 12:25:29 |
 | Triki | Votos: 108 Críticas: 6 Mensajes: 136 |
|
|
Pues sí, se vuelve loco con todas las películas que llevan paréntesis y deja de poner el año
Tambien me ha dado guerra con la pelicula Cry Baby, el titulo traducido lo deja solo en Cry, parece que tampoco se lleva bien con los guiones
Última edición por Triki fecha: 12/8/07 22:13:27
|
| 28/9/07 11:02:29 |
 | legrad | Votos: 0 Críticas: 0 Mensajes: 4 |
|
|
He probado con:
-quiz show (El Dilema)
-el dilema
en ambos casos va perfecto añade todos los datos de la pagina incluido el año.
No se donde puede estar el fallo que os da, en cuanto algunos titulos que contienen guion (-) ejemplo Cry-Baby
ya lo he arreglado.
adjunto la modificacion o todo el script para el que lo desee.Puede editarse el script con el bloc de notas o wordpad.
Para corregir el guion del titulo buscar esta cadena.(sin asteriscos)
***************
// Titulo traducido
LineNr := FindLine('
Line := Page.GetString(LineNr);
Item := TextBetween (Line, 'content="', '-');
Item := AnsiLowerCase(Item);
Item := AnsiUpFirstLetter(Item );
HTMLDecode(Item);
SetField(fieldTranslatedTitle, Trim (Item));
****************
y cambiar por esta
****************
// Titulo traducido
LineNr := FindLine('
Line := Page.GetString(LineNr);
Item := TextBetween (Line, 'content="', ' - ');
Item := AnsiLowerCase(Item);
Item := AnsiUpFirstLetter(Item );
HTMLDecode(Item);
SetField(fieldTranslatedTitle, Trim (Item));
****************
para el que quiera todo el script(con los asteriscos)procurar que en el inicio del script no haya ninguna linea vacia osea que empieze la primera linea con (****... tampoco debe haber lineas en blanco despues del ultimo End.
(***************************************************
Ant Movie Catalog importation script
www.antp.be/software/moviecatalog/
[Infos]
Authors=Legrad
Title=Alpacine
Description=
Site=www.alpacine.com
Language=Cine
Version=1.1
Requires=3.5.0
Comments=
License=
GetInfo=1
[Options]
***************************************************
program Alpacine;
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 FindLine(Pattern: string; List: TStringList; StartAt: Integer): Integer;
var
i: Integer;
begin
Result := -1;
if StartAt < 0 then
StartAt := 0;
for i := StartAt to List.Count-1 do
if Pos(Pattern, List.GetString(i)) <> 0 then
begin
Result := i;
Break;
end;
end;
//------------------------------------------------------------------------------------
function TextBetween(var S: string; StartTag: string; EndTag: string): string;
var
InitialPos: Integer;
begin
InitialPos := Pos(StartTag, S);
if InitialPos = 0 then
result := ''
else
begin
Delete(S, 1, InitialPos + Length(StartTag) - 1);
InitialPos := Pos(EndTag, S);
if InitialPos = 0 then
result := S
else
begin
result := copy(S, 1, InitialPos - 1);
Delete(S, 1, InitialPos + 1);
end;
end;
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, Movie: string;
BeginPos, EndPos: Integer;
BeginPoss, EndPoss: Integer;
begin
strPage := GetPage(Address);
BeginPos := Pos('class="resultados">', strPage);
if(BeginPos > -1)then
begin
PickTreeClear;
Delete(strPage, 1, BeginPos);
BeginPos := Pos(' ', strPage);
MovieId := Copy(strPage,+42, EndPos-42);
MovieAddr := 'http://www.alpacine.com/pelicula/' + MovieId;
BeginPoss := Pos('/"',strPage);
EndPoss := Pos('', strPage);
MovieTitle := Copy(strPage,BeginPoss+2, EndPoss);
MovieTitle := StringReplace(MovieTitle , '>', '');
MovieTitle := AnsiUpFirstLetter(MovieTitle);
DeleteTags(MovieTitle);
MovieTitle:= StringReplace(MovieTitle ,#13#10, '');
MovieTitle:= StringReplace(MovieTitle ,' ', '');
PickTreeAdd(MovieTitle, MovieAddr);
BeginPos := Pos('
Line := Page.GetString(LineNr);
Item := TextBetween (Line, 'content="', ' - ');
Item := AnsiLowerCase(Item);
Item := AnsiUpFirstLetter(Item );
HTMLDecode(Item);
SetField(fieldTranslatedTitle, Trim (Item));
// Titulo Original
LineNr := FindLine('Título original:', Page, 0);
if LineNr <> -1 then
begin
Line := Page.GetString(LineNr);
Item := TextBetween (Line, '', ' ');
DeleteTags (Item);
Item := AnsiUpFirstLetter(Item );
HTMLDecode(Item);
SetField(fieldOriginalTitle, Trim (Item));
end;
// año
LineNr := FindLine('', Page, 0);
if LineNr <> -1 then
begin
Line := Page.GetString(LineNr);
Item := TextBetween (Line, '(', ')');
DeleteTags (Item);
Item := AnsiUpFirstLetter(Item );
HTMLDecode(Item);
SetField(fieldYear, Trim (Item));
end;
// Categoria
LineNr := FindLine('class="titulo">Género:', Page, 0);
if LineNr > 0 then
begin
Item := copy(Page.Text, pos('class="titulo">Género:',Page.Text), length(Page.Text));
Item := TextBetween (Item, '/">', '');
Item := StringReplace(Item , #13#10, '');
Item := StringReplace(Item , ' ', '');
DeleteTags (Item);
Item := AnsiUpFirstLetter(Item );
Item := Trim(Item );
HTMLDecode(Item);
SetField(fieldCategory, Trim (Item));
end;
// pais
LineNr := FindLine('class="titulo">País:', Page, 0);
if LineNr > 0 then
begin
Item := copy(Page.Text, pos('class="titulo">País:',Page.Text), length(Page.Text));
Item := TextBetween (Item, '/">', '');
Item := StringReplace(Item , #13#10, '');
Item := StringReplace(Item , ' ', '');
Item := StringReplace(Item , 'Estados Unidos', 'USA');
DeleteTags (Item);
Item := AnsiUpFirstLetter(Item );
Item := Trim(Item );
HTMLDecode(Item);
SetField(fieldCountry, Trim (Item));
end;
// director
LineNr := FindLine('class="titulo">Dirección:', Page, 0);
if LineNr > 0 then
begin
Item := copy(Page.Text, pos('class="titulo">Dirección:',Page.Text), length(Page.Text));
Item := TextBetween (Item, '/">', '');
Item := StringReplace(Item , #13#10, '');
//Item := StringReplace(Item , ' ', '');
Item := StringReplace(Item , ' Duración:', Page, 0);
if LineNr > 0 then
begin
Item := copy(Page.Text, pos('class="titulo">Duración:',Page.Text), length(Page.Text));
Item := TextBetween (Item, '', 'minutos');
Item := Trim(Item );
HTMLDecode(Item);
SetField(fieldLength, Trim (Item));
end;
// Calificación
LineNr := FindLine('', Page, 0);
if LineNr > 0 then
begin
Item := copy(Page.Text, pos(' ',Page.Text), length(Page.Text));
Item := TextBetween (Item, ' ', ' ');
Item := StringReplace(Item , #13#10, '');
Item := StringReplace(Item , ' ', '');
DeleteTags (Item);
Item := Trim(Item );
HTMLDecode(Item);
SetField(fieldRating, Trim (Item));
end;
// Reparto
LineNr := FindLine('class="titulo">Interpretación: ', Page, 0);
if LineNr > 0 then
begin
Item := copy(Page.Text, pos('class="titulo">Interpretación: ',Page.Text), length(Page.Text));
Item := TextBetween (Item, '/">', '');
Item := StringReplace(Item , #13#10, '');
Item := StringReplace(Item , ' ', '');
Item := StringReplace(Item , '',', ');
DeleteTags (Item);
Item := AnsiUpFirstLetter(Item );
Item := Trim(Item );
HTMLDecode(Item);
SetField(fieldActors, Trim (Item));
end;
// sinopsis
LineNr := FindLine('class="titulo">Sinopsis:', Page, 0);
if LineNr > 0 then
begin
Item := copy(Page.Text, pos('class="titulo">Sinopsis:',Page.Text), length(Page.Text));
Item := TextBetween (Item, 'class="cuerpo">', '');
Item := StringReplace(Item , #13#10, '');
Item := StringReplace(Item , ' ', '');
DeleteTags (Item);
Item := AnsiUpFirstLetter(Item );
Item := Trim(Item );
HTMLDecode(Item);
SetField(fieldDescription, Trim (Item));
end;
// comentarios
LineNr := FindLine('class="titulo">Premios:', Page, 0);
if LineNr > 0 then
begin
Item := copy(Page.Text, pos('class="titulo">Premios:',Page.Text), length(Page.Text));
Item := TextBetween (Item, 'class="cuerpo">', '
Item := StringReplace(Item , ' ', '');
Item := StringReplace(Item , 'Más', '');
DeleteTags (Item);
Item := AnsiUpFirstLetter(Item );
Item := Trim(Item );
HTMLDecode(Item);
SetField(fieldComments, Trim (Item));
end;
// Caratula
LineNr := FindLine('src="http://img.alpacine.com/carteles/', Page, 0);
if LineNr <> -1 then
begin
Line := Page.GetString(LineNr);
Busca := FindLine('id="ampliar">', Page, 0);
if Busca <> -1 then
begin
Item := TextBetween (Line, 'src="', '.jpg');
Item := StringReplace(Item , '-150', '');
GetPicture (Item+'.jpg');
end
else
begin
Item := TextBetween (Line, 'src="', '" alt');
GetPicture (Item);
end
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(fieldTranslatedTitle);
if MovieName = '' then
MovieName := GetField(fieldOriginalTitle);
Input('Alpacine', 'Buscar:', MovieName);
if(GetOption('Sin resultado') = 0) then Input('Alpacine', 'Buscar:', MovieName);
AnalyzePage('http://www.alpacine.com/buscar/?buscar=' + UrlEncode(MovieName)+'&tipo=2&todo=1');
end.
|
| 28/9/07 11:09:55 |
 | legrad | Votos: 0 Críticas: 0 Mensajes: 4 |
|
|
! ATENCION¡ sobre el script
No copies el script del post, se ve que hay una limitacion de espacio y no se copio todo el contenido, mejor lo copiais de la pagina de AntMovie. Donde lo he actualizado
http://forum.antp.be/phpbb2/viewforum.php?f=12
http://forum.antp.be/phpbb2/viewtopic.php?t=3745
|
| 17/11/07 21:38:00 |
 | Triki | Votos: 108 Críticas: 6 Mensajes: 136 |
|
|
sigue dándome el mismo error con las películas que tienen una segunda parte entre paréntesis, deja de coger el año.
Gracias por el curro
|
|