Culturalia

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
raulsara
Posts: 54
Joined: 2006-02-13 14:05:04

Culturalia

Post by raulsara »

Parece que no funciona y es una lástima ya que tiene muchas pelis e información. A ver si alguien se anima. Gracias
antp
Site Admin
Posts: 9665
Joined: 2002-05-30 10:13:07
Location: Brussels
Contact:

Post by antp »

Hello,
Is it long time since it does not work?
The movie pages used by the script still work, e.g.
http://www.culturalianet.com/bus/catalo ... digo=23954
but the search page does not return results. I suppose that there is a problem on their side.
I see that the script uses
http://www.culturalianet.com/bus/catalo ... xto=spider
which should return results
but other scripts seem to have additional parameters:
http://www.culturalianet.com/bus/catalo ... =1&donde=1
which cause an error then
I guess we could wait a few days, and if it still does not work again I'll contact them.
raulsara
Posts: 54
Joined: 2006-02-13 14:05:04

Post by raulsara »

Ok, thanks
jacqlittle
Posts: 26
Joined: 2013-04-11 07:13:02

Post by jacqlittle »

Si quieres una alternativa muy válida, y al menos bajo mi punto de vista más completa, puedes usar el script para FilmAffinity, que en el tema que hay sobre el mismo tienes disponible la última versión (v2.66) que funciona de lujo.

Lo único que en la anterior versión (la que hay disponible en los servidores de esta web) fallaba era la importación de películas en ciertos casos puntuales, pero en el tema del script de FilmAffinity en los últimos posts se encuentra disponible la versión modificada que te comento, que simplemente con el bloc de notas de Windows lo copias y sobreescribes el anterior script "FilmAffinity (ES).ifs", y como la seda... ;)

Saludos.
antp
Site Admin
Posts: 9665
Joined: 2002-05-30 10:13:07
Location: Brussels
Contact:

Post by antp »

jacqlittle wrote:que simplemente con el bloc de notas de Windows lo copias y sobreescribes el anterior script "FilmAffinity (ES).ifs", y como la seda... ;)
Or run the "update scripts" script to get the latest one.
jacqlittle
Posts: 26
Joined: 2013-04-11 07:13:02

Post by jacqlittle »

Hola antp, la versión v2.66 antesdeayer al menos no estaba disponible, por eso le comenté que lo actualizara manualmente...

Saludos.

--------------------------------------------------------------------------------------

Hi antp, v2.66 version before yesterday at least was not available, so I told him to update it manually...

Greetings.
raulsara
Posts: 54
Joined: 2006-02-13 14:05:04

Post by raulsara »

Hola, gracias por vuestras respuestas, normalmente utilizo filmaffinity ya que están casi todas las peliculas y da mucha información, el problema es que trae las caratulas en el idioma de la pelicula (ingles, frances,....) y a mi me gustaría en castellano. La idea es traer la info de filmaffinity y después pegar un repaso seleccionando solo la caratula de culturalia que normalmente estan en castellano, ahora utilizo para esto Sensacine que me trae la caratula en castellano pero no hay muchas pelis, si sabeis algun script que funcione ademas de estas con caratulas, por favor, hacédmelo saber.

Un saludo y gracias por vuestro interés.

Posdata. Espero que vuelva a funcionar pronto culturalia con AMC
raulsara
Posts: 54
Joined: 2006-02-13 14:05:04

Post by raulsara »

Hola al final he arreglado el script de Hispashare para que me de las caratulas, antes no funcionaba. Os lo adjunto por si a alguien le interesa.
Si teneis algún problema me lo haceis saber, a mi me funciona bien.

program Hispashare;
var
MovieName: string;
MovieURL: string;

//------------------------------------------------------------------------------------
function Comillas(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;
// Page: TStringList;
begin
strPage := GetPage(Address);
BeginPos := Pos('<strong>Resultados:</strong> ', strPage);
if(BeginPos > -1)then
begin
BeginPos := BeginPos +28;
PickTreeClear;
Delete(strPage, 1, BeginPos);
BeginPos :=0;
// Page := TStringList.Create;
// Page.Text := strPage;
// Page.SaveToFile('9999999.html');
//ShowMessage(strPage);
if Copy(strPage,BeginPos, BeginPos+1) = '0' then
BeginPos :=0
else
begin
BeginPos := Pos('<h1><a ', strPage);
end;
EndPos := 1;

while ((BeginPos > 0) and (EndPos > 0)) do

begin
Delete(strPage, 1, BeginPos);
// Page.Text := strPage;
// Page.SaveToFile('9999999.html');
EndPos := Pos('">', strPage);
MovieId := Copy(strPage,+13, EndPos-13);
MovieId := Comillas(MovieId );
MovieId := StringReplace(MovieId , 'amp;', '');
MovieAddr := 'http://www.hispashare.com/' + MovieId;
Delete(strPage, 1, EndPos);
// ShowMessage(strPage);
BeginPoss := Pos('>',strPage);
EndPoss := Pos('<small>', strPage);
MovieTitle := Copy(strPage,BeginPoss, EndPoss);
BeginPoss := Pos('<small>',strPage);
EndPoss := Pos('</small>', strPage);
MovieTitle := MovieTitle + Copy(strPage,BeginPoss, EndPoss-10);
MovieTitle := StringReplace(MovieTitle , '>', '</a>');
MovieTitle := AnsiUpFirstLetter(MovieTitle);
MovieTitle := Comillas(MovieTitle);
DeleteTags(MovieTitle);
MovieTitle:= StringReplace(MovieTitle ,#13#10, '');
MovieTitle:= StringReplace(MovieTitle ,' ', '');
PickTreeAdd(MovieTitle, MovieAddr);
PickTreeSort;
BeginPos := Pos('<h1><a ', strPage);
if(Pos('</body>', strPage) < BeginPos) then
BeginPos := -1;
end;
end;
// Page.Free;
PickTreeExec(Address)
AnalyzeMoviePage(Address);
end;
//------------------------------------------------------------------------------------
procedure AnalyzeMoviePage(Address: string);
var
Page: TStringList;
LineNr, LineAc, LineTmp: Integer;
Line: string;
Item: string;
Ite2: string;
Ite3: string;
Comments: string;
Actors: string;
Directors: string;
Description: string;
Busca: integer;

Page2: TStringList;
begin
Description := '';

// URL
SetField(fieldURL, Address);

Page := TStringList.Create;
Page.Text := GetPage(Address);
// Page.SaveToFile('9999999.html');

// Caratula
LineNr := FindLine('Detalles del título', Page, 0);
if LineNr > 0 then
begin
LineAc := FindLine('<img src="', Page, LineNr);
LineNr := LineAc;
Item := Page.GetString(LineAc);
Item := TextBetween (Item, '<img src="', '" width');
Item := Trim(Item );
HTMLDecode(Item);
GetPicture (Item);
end;
// Titulo traducido
LineAc := FindLine('<h1>', Page, LineNr);
Line := Page.GetString(LineAc);
Item := TextBetween (Line, '<h1>', '<small>');
Item := AnsiLowerCase(Item);
Item := AnsiUpFirstLetter(Item );
HTMLDecode(Item);
SetField(fieldTranslatedTitle, Trim (Item));

// año
Item := TextBetween (Line, 'mall>(', ')</small>');
HTMLRemoveTags (Item);
HTMLDecode(Item);
SetField(fieldYear, Trim (Item));
LineNr := LineAc;

// Titulo Original y pais
LineAc := FindLine('Título original', Page, LineNr);
if LineAc <> -1 then
begin
Line := Page.GetString(LineAc);
Item := TextBetween (Line, '</strong>', '(');
Line := Page.GetString(LineAc);
Ite2 := TextBetween (Line, '(', ')</p>');
Item := Trim(Item );
Item := AnsiUpFirstLetter(Item );
HTMLDecode(Item);
HTMLDecode(Ite2);
SetField(fieldOriginalTitle, Trim (Item));
SetField(fieldCountry, Trim (Ite2));
end;
LineNr := LineAc;

// Categoria
LineAc := FindLine('Películas', Page, LineNr);
if LineAc > 0 then
begin
Line := Page.GetString(LineAc);

Item := '';
Ite2 := TextBetween (Line, 'genre', '</p>');
Line := Ite2;
Item := Item + TextBetween (Line, '>', '</a>');

while length(Line) > 4 do
begin
Line := Line + '</p>';
Ite2 := TextBetween (Line, 'genre', '</p>');
Line := Ite2;
Item := Item + ', '+ TextBetween (Line, '>', '</a>');
end;
Item := AnsiUpFirstLetter(Item );
Item := Trim(Item );
HTMLDecode(Item);
// Page2 := TStringList.Create;
// Page2.Text := '**' + Item+ '**';
// Page2.SaveToFile('9999999.html');
//ShowMessage(Line);
SetField(fieldCategory, Trim (Item));
end;
LineNr := LineAc;

// director
LineAc := FindLine('director=', Page, LineNr);
if LineAc > 0 then
begin
Line := Page.GetString(LineAc);
Item := TextBetween (Line, 'director=', '">');
HTMLRemoveTags (Item);
Item := AnsiUpFirstLetter(Item );
Item := Comillas(Item );
Item := Trim(Item );
HTMLDecode(Item);
SetField(fieldDirector, Trim (Item));
end;
LineNr := LineAc;

// Duracion
LineAc := FindLine('Duración:</strong>', Page, LineNr);
if LineAc > 0 then
begin
Line := Page.GetString(LineAc);
Item := TextBetween (Line, 'Duración:</strong>', 'minutos');
Item := Trim(Item );
HTMLDecode(Item);
SetField(fieldLength, Trim (Item));
end;
LineNr := LineAc;

// sinopsis
LineAc := FindLine('<p class="TEXT">', Page, LineNr);
if LineAc > 0 then
begin
LineTmp := FindLine('</p>', Page, LineAc);
Line := Page.GetString(LineAc);
Item := TextBetween (Line, '<p class="TEXT">', '');
LineAc := LineAc + 1;
while LineAc <= LineTmp do
begin
Line := Page.GetString(LineAc);
Item := Item + Line;
LineAc := LineAc + 1;
end;
Item := Comillas(Item );
Item := StringReplace(Item , '<br/>', #13#10);
Item := StringReplace(Item , '>', '');
HTMLRemoveTags (Item);
Item := AnsiUpFirstLetter(Item );
Item := Trim(Item );
HTMLDecode(Item);
SetField(fieldDescription, Trim (Item));
end;
LineNr := LineAc;

// Reparto
LineAc := FindLine('Actores', Page, LineNr);
if LineAc > 0 then
begin
LineAc := LineAc + 1;
Line := Page.GetString(LineAc);
Item := '<' + TextBetween (Line, 'actor=', '');
Line := Item;
Ite2 := TextBetween (Item, '<', '">');
Ite3 := Ite2;
while length(Ite2) > 0 do
begin

Line := Item;
Item := '<' + TextBetween (Line, 'actor=', '');
Line := Item;
Ite2 := TextBetween (Item, '<', '">');
if length(Ite2) > 0 then Ite3 := Ite3+', '+Ite2;
end;
HTMLRemoveTags (Ite3);
Ite3 := Trim(Ite3 );
HTMLDecode(Ite3);
SetField(fieldActors, Trim (Ite3));
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('hispashare', 'Buscar:', MovieName);

if(GetOption('Sin resultado') = 0) then Input('hispashare', 'Buscar:', MovieName);

AnalyzePage('http://www.hispashare.com/?view=search&q=' + UrlEncode(MovieName));
end.
raulsara
Posts: 54
Joined: 2006-02-13 14:05:04

Post by raulsara »

Lo voy a intentar con el de Culturalia pero está algo mas liado y yo no entiendo mucho. Si alguien se atreve......
Post Reply