Scripts that need to be fixed / Scripts à corriger
Somebody posted a fix for layouts 2 & 3, and I uploaded the script on www.antp.be/temp/scripts
But I still have to fix layouts 0 & 1.
But I still have to fix layouts 0 & 1.
The code to 0 & 1 is near the other :antp wrote:Somebody posted a fix for layouts 2 & 3, and I uploaded the script on www.antp.be/temp/scripts
But I still have to fix layouts 0 & 1.
Code: Select all
0, 1:
while Pos('<tr>', Value) > 0 do
begin
Value2 := TextBetween(Value, '<tr', '</tr>');
Value := RemainingText;
if Pos('rest of cast', Value2) > 0 then
Continue;
if Pos('<a href="fullcredits">(more)</a>', Value2) > 0 then
Break;
if FullValue <> '' then
FullValue := FullValue + #13#10;
TextBefore(Value2, '</td>', '');
Value2 := TextBetween(RemainingText, '/">', '</a>');
TextBetween(RemainingText, 'e">', '</td>');
if Value2 <> '' then
FullValue := FullValue + Value2;
end;
-
- Posts: 49
- Joined: 2005-11-30 15:58:57
- Location: Quebec
Yes, we need update for imdb script!!!!Teebee wrote:Since 23-07 i dont get any actors names anylore with IMDB script.
Actorslayout 2-3 dont work anymore, and i always used #3.
#4 seems to work.
Allocine script aussi quand on met les acteurs et producteurs sa met toute tout croche.
Update these script fast plz! I Have like 20movie to update!
if you dont like to wait use another program, FAST!!!MisconductQC wrote:Yes, we need update for imdb script!!!!
Allocine script aussi quand on met les acteurs et producteurs sa met toute tout croche.
Update these script fast plz! I Have like 20movie to update!
the people are making this in there free time and surely they dont take orders!!!!!!!!!!
-
- Posts: 49
- Joined: 2005-11-30 15:58:57
- Location: Quebec
Tout ça a déjà été corrigé hein, il faut télécharger les nouveaux scripts quand ils sont mis à jour...MisconductQC wrote: Yes, we need update for imdb script!!!!
Allocine script aussi quand on met les acteurs et producteurs sa met toute tout croche.
Update these script fast plz! I Have like 20movie to update!
Et puis j'ai un peu autre chose à faire que de mettre à jour les scripts pour ceux qui veulent pas copier/coller les infos depuis le site web pendant les quelques jours où le script ne marche pas
-
- Posts: 49
- Joined: 2005-11-30 15:58:57
- Location: Quebec
IMDB est correct
Merci!
Et jai updater allociné et jai un bug a la ligne 1757
if (ShowConfirmation('Vous exécutez le script avec le type de lancement << '+IntToStr(GetOption('Type de Lancement'))+' >> pour la première fois.'+RCN(2)+'Cliquer sur ''''OUI'''' pour continuer.') = False) then
C'est sa la ligne!
Sa dis: Erreur de script dans ALLOCINE_FR : unknown identifier: RCN à la ligne 1757
Merci!
Et jai updater allociné et jai un bug a la ligne 1757
if (ShowConfirmation('Vous exécutez le script avec le type de lancement << '+IntToStr(GetOption('Type de Lancement'))+' >> pour la première fois.'+RCN(2)+'Cliquer sur ''''OUI'''' pour continuer.') = False) then
C'est sa la ligne!
Sa dis: Erreur de script dans ALLOCINE_FR : unknown identifier: RCN à la ligne 1757
Script for www.adultfilmdatabase.com does not work...
Script for www.moviemeter.nl doesn't work.
Can someone please fix it?
Can someone please fix it?
It works for me. It was actually fixed nearly one month ago in the topic dedicated to that script: viewtopic.php?t=2082
And if there are still problems, please give at lease one or two titles as example of movie that fail.
And if there are still problems, please give at lease one or two titles as example of movie that fail.
ofdb.de
I have also problems with ofdb.de - sometimes it works, but mostly not, it depends on the query string.
They have changed their layout a while ago ...
I would be glad if there could be a solution.
Greetings from Cologne, Germany
Cyriaxx
They have changed their layout a while ago ...
I would be glad if there could be a solution.
Greetings from Cologne, Germany
Cyriaxx
I found the Problem with the OFDB-Script ...
I search manually for any examples, these are the results:
Roswell:
<b>Titel:</b><br><br>1. <a href='view.php?page=film&fid=25569'>Roswell [TV-Serie]
Robin of Sherwood:
<b>Titel:</b><br><br>1. <a href="view.php?page=film&fid=7045">Robin Hood [TV-Serie]
You see the problem? Once they use " a href=' " and once " a href=" ".
An this seems to be the problem in the AddMoviesTitles-Function in the script ...
But i cant fix it
I search manually for any examples, these are the results:
Roswell:
<b>Titel:</b><br><br>1. <a href='view.php?page=film&fid=25569'>Roswell [TV-Serie]
Robin of Sherwood:
<b>Titel:</b><br><br>1. <a href="view.php?page=film&fid=7045">Robin Hood [TV-Serie]
You see the problem? Once they use " a href=' " and once " a href=" ".
An this seems to be the problem in the AddMoviesTitles-Function in the script ...
But i cant fix it
Fix for ofdb problem!
Just change the AddMoviesTitles Procedure to this...
Just change the AddMoviesTitles Procedure to this...
Code: Select all
procedure AddMoviesTitles(Page: TStringList; var LineNr: Integer);
var
Line: string;
MovieTitle, MovieAddress: string;
StartPos, EndPos,MK: Integer;
begin
Line := Page.GetString(LineNr);
repeat
mk := 0;
StartPos := pos('<a href="view.php?page=film&fid=', Line);
if startPos = 0 then
begin
StartPos := pos('<a href=''view.php?page=film&fid=', Line);
MK := 1;
end;
if StartPos > 0 then
begin
Delete(Line, 1, StartPos + 8);
if MK = 0 then MovieAddress := copy(Line, 1, pos('">', Line) - 1)
else MovieAddress := copy(Line, 1, pos('''>', Line) - 1);
if MK = 0 then StartPos := pos('">', Line) +2
else StartPos := pos('''>', Line) +2;
MovieTitle := copy(Line, StartPos, pos('</a>', Line) - StartPos);
HTMLRemoveTags(MovieTitle);
PickTreeAdd(MovieTitle , 'http://www.ofdb.de/' + MovieAddress);
end;
until (StartPos < 1);
end;
I also fixed the Cinefacts.de script.
Problem was that no Bonusmaterial was imported.
I added a new option to import only the picture without and
other information.
Problem was that no Bonusmaterial was imported.
I added a new option to import only the picture without and
other information.
Code: Select all
(***************************************************
Ant Movie Catalog importation script
www.antp.be/software/moviecatalog/
[Infos]
Authors=OL
Title=Cinefacts.de
Description=cinfacts.de import incl. Big/small Picture
Site=www.cinefacts.de
Language=DE
Version=v0.1.3 - 31.08.2006
Requires=3.5.0
Comments=based on dvd-inside script by Tiziano Müller||Script Option "BigPicture" for loading Big / Small Picture |0 = load small picture|1= load big picture||
License=
GetInfo=1
[Options]
BigPicture=1|1|0=import small picture|1=import big picture
PictureOnly=0|0|0=import all|1=import picture only
***************************************************)
program CineFactsDE;
const
CRLF = #13#10;
var
MovieName: string;
MovieURL: string;
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 MyTrim(str_: string): string;
var
chars: array of char;
StrLen, i, LastSpacePos: integer;
begin
result := '';
str_ := StringReplace(str_, #9, '');
str_ := StringReplace(str_, #10, '');
str_ := StringReplace(str_, #13, '');
while Pos(' ', str_) = 1 do
begin
Delete(str_, Pos(' ', str_), 1);
end;
StrLen := Length(str_);
SetArrayLength(chars, StrLen);
for i := 0 to StrLen-1 do
begin
chars[i] := Copy(str_,i+1,1);
end;
str_ := '';
LastSpacePos := StrLen - 1;
if LastSpacePos > -1 then
begin
while chars[LastSpacePos] = ' ' do
begin
LastSpacePos := LastSpacePos - 1;
end;
for i:= 0 to LastSpacePos do
begin
str_ := str_ + chars[i];
end;
end;
str_ := StringReplace(str_, ' ', ' ');
while result <> str_ do
begin
result := str_;
str_ := StringReplace(str_, ' ', ' ');
end;
result := StringReplace(result, ' ,', ',');
end;
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;
function GetStringBetween(str_, StartTag, EndTag: string): string;
var
BeginPos, EndPos: integer;
begin
result := '';
if EndTag = '' then
begin
EndPos := Length(str_);
end
else
EndPos := Pos(EndTag, str_);
BeginPos := Pos(StartTag, str_) + Length(StartTag);
if StartTag = '' then BeginPos := 1;
if BeginPos > 0 then result := Copy(str_, BeginPos, EndPos - BeginPos);
end;
function GetTrimmedStringBetween(str_, StartTag, EndTag: string): string;
begin
result := MyTrim(GetStringBetween(str_, StartTag, EndTag));
end;
// Extracts single movie detail (like director, genre) from page
function GetStringFromHTML(Page, StartTag, CutTag, EndTag: string): string;
begin
Result := '';
Page := StringReplace(Page, 'ß','ß');
// recognition tag - if present, extract detail from page, otherwise assume detail is not present
if Pos(StartTag, Page) > 0 then begin
CutBefore(Page, StartTag);
// optional cut tag helps finding right string in html page
if Length(CutTag) > 0 then
CutAfter(Page, CutTag);
// movie detail copied with html tags up to end string
Result := Copy(Page, 0, Pos(EndTag, Page) - 1);
// remove html tags and decode html string
// HTMLRemoveTags(Result);
HTMLDecode(Result);
end;
end;
function StripHTMLTags(str_: string): string;
var
temp_char : char;
StrLen, i, CharPos : integer;
DoCopy : boolean;
begin
DoCopy := true;
CharPos := 0;
result := '';
StrLen := Length(str_);
for i := 1 to StrLen do
begin
temp_char := Copy(str_,i,1);
if temp_char = '<' then
begin
DoCopy := false;
continue;
end
else if temp_char = '>' then
begin
DoCopy := true;
continue;
end
else
begin
if DoCopy then
begin
result := result + temp_char;
end;
end;
end;
end;
procedure AnalyzeIndexPage(Address: string);
var
IndexPage: TStringList;
Page : String;
begin
IndexPage := TStringList.Create;
Address := URLEncode(Address);
IndexPage.Text := GetPage(Address);
PickTreeClear;
PickTreeAdd('Search results', '');
AddMoviesTitles(IndexPage);
if PickTreeExec(Address) then
begin
Page := GetPage(Address);
AnalyzeMoviePage(Page, Address);
end;
IndexPage.Free;
end;
procedure AnalyzeMoviePage(Page, Address :String);
var
TomString, Line, Temp, Value: string;
LineNr, IntValue: Integer;
BeginPos, EndPos: Integer;
StrPosition: Integer;
StrTemp,srcPic, MovieID: string;
OriginalTitle, Country, Year, Genre, Studio, Region, EAN_Number, Distributor, AFK, Duration: string;
VideoFormat, ScreenFormat, ScreenSystem, Language, AudioFormat, Subtitle, MediaType, Disks: string;
Comments, Bonusmaterial, Packaging, TranslatedTitle, Director, Cast, Producer, Description: string;
Music, Screenplay: string;
begin
if GetOption('PictureOnly') = 0 then
begin
// Initializing the very important Comments
Comments := '';
// URL
SetField(fieldURL, Address);
// Translated title
TranslatedTitle := MyTrim(GetStringFromHTML(Page,'span class="headline">','">','<br>'));
SetField(fieldTranslatedTitle, TranslatedTitle);
// Original-Title, Country and Year
OriginalTitle := MyTrim(GetStringFromHTML(Page, 'Originaltitel:','"first">','(<a href="'));
StrTemp := MyTrim(GetStringFromHTML(Page, '"land_list.php?name=','">','</dd>'));
StrTemp := StripHTMLTags(StrTemp);
StrTemp := GetTrimmedStringBetween(StrTemp,'(',')');
Country := Copy(StrTemp,1,Length(StrTemp)-4);
Year := Copy(StrTemp,Length(StrTemp)-4,Length(StrTemp));
SetField(fieldOriginalTitle, OriginalTitle);
SetField(fieldCountry, Country);
SetField(fieldYear, Year);
// EAN-Number
EAN_Number := MyTrim(StripHTMLTags(GetStringFromHTML(Page, '<dt class="c1">EAN-Nummer:','', '</dd>')));
EAN_Number := StringReplace(EAN_Number,'EAN-Nummer:','');
Comments := Comments + 'EAN-Nummer: ' + EAN_Number + CRLF;
// Genre
Genre := '';
Genre := MyTrim(StripHTMLTags(GetStringFromHTML(Page, '<dt class="c1">Genre:', '', '</dd>')));
Genre := StringReplace(Genre,'Genre: ','');
setField(fieldCategory, Genre);
end;
// Studio
Studio := MyTrim(StripHTMLTags(GetStringFromHTML(Page, '<dt class="c1">Studio:','', '</dd>')));
Studio := StringReplace(Studio,'Studio: ','');
if GetOption('PictureOnly') = 0 then
begin
Comments := Comments + 'Studio: ' + Studio + CRLF;
// Distributor
Distributor := MyTrim(StripHTMLTags(GetStringFromHTML(Page, '<dt class="c1">Vertrieb:','', '</dd>')));
Distributor := StringReplace(Distributor,'Vertrieb: ','');
Comments := Comments + 'Vertrieb: ' + Distributor + CRLF;
// Altersfreigabe
AFK := MyTrim(StripHTMLTags(GetStringFromHTML(Page, '<dt class="c1">FSK:','', '</dd>')));
AFK := StringReplace(AFK,'FSK: ','');
Comments := Comments + 'Altersfreigabe: ' + AFK + CRLF;
// CountryCode
Region := MyTrim(StripHTMLTags(GetStringFromHTML(Page, '<dt class="c1">Ländercode:','', '</dd>')));
Region := StringReplace(Region,'Ländercode: ','');
VideoFormat := 'DVD Zone '+Region;
setField(fieldVideoFormat,VideoFormat);
// Duration
Duration := MyTrim(StripHTMLTags(GetStringFromHTML(Page, '<dt class="c1">Länge:','', '</dd>')));
Duration := StringReplace(Duration,'Länge: ','');
Duration := StringReplace(Duration,' Minuten','');
setField(fieldLength,Duration);
// Description
Description := GetStringFromHTML(Page, '<li class="text c1">','', '</li>');
Description := StringReplace(Description, '<br />','*');
Description := MyTrim(StripHTMLTags(Description));
Description := StringReplace(Description, '*',CRLF);
setField(fieldDescription,Description);
// Actors
Cast := MyTrim(StripHTMLTags(GetStringFromHTML(Page, '<dt class="c1">Schauspieler:','', '</dd>')));
Cast := StringReplace(Cast,'Schauspieler: ','');
setField(fieldActors,Cast);
// Director
Director := MyTrim(StripHTMLTags(GetStringFromHTML(Page, '<dt class="c1">Regie:','', '</dd>')));
Director := StringReplace(Director,'Regie: ','');
setField(fieldDirector,Director);
// Production
Producer := MyTrim(StripHTMLTags(GetStringFromHTML(Page, '<dt class="c1">Produzent:','', '</dd>')));
Producer := StringReplace(Producer,'Produzent: ','');
setField(fieldProducer,Producer);
// Music
Music := '';
Music := MyTrim(StripHTMLTags(GetStringFromHTML(Page, '<dt class="c1">Musik:','', '</dd>')));
Music := StringReplace(Music,'Musik:','');
Music := StringReplace(Music,' Minuten','');
Comments := Comments + 'Musik:' + Music + CRLF;
// Screenplay
Screenplay := '';
Screenplay := MyTrim(StripHTMLTags(GetStringFromHTML(Page, '<dt class="c1">Drehbuch:','', '</dd>')));
Screenplay := StringReplace(Screenplay,'Drehbuch: ','');
Comments := Comments + 'Drehbuch: ' + Screenplay + CRLF;
// Screen format & system
ScreenFormat := MyTrim(StripHTMLTags(GetStringFromHTML(Page, '<dt class="c1">Format:','', '</dd>')));
ScreenFormat := StringReplace(ScreenFormat,'Format: ','');
ScreenSystem := MyTrim(StripHTMLTags(GetStringFromHTML(Page, '<dt class="c1">System:','', '</dd>')));
ScreenSystem := StringReplace(ScreenSystem,'System: ','');
setField(fieldResolution,ScreenSystem + ' - ' + ScreenFormat);
// Audioformat/Language
AudioFormat := '';
Language := '';
StrTemp := GetStringFromHTML(Page, '<dt class="c1">Tonformat:', '', '<dt class="c1">Untertitel:');
StrTemp := StringReplace(StrTemp, '</dd>','*');
StrTemp := MyTrim(StripHTMLTags(StrTemp));
StrTemp := StringReplace(StrTemp,'Tonformat: ','');
while Pos('*',StrTemp) > 0 do
begin
AudioFormat := AudioFormat + ', ' + MyTrim(Copy(StrTemp,1,Pos(' in ',StrTemp)));
Language := Language + ', ' + MyTrim(Copy(StrTemp,Pos(' in ',StrTemp)+4,Pos('*',StrTemp)-(Pos(' in ',StrTemp)+4)));
CutAfter(StrTemp,'*');
end;
AudioFormat := Copy(AudioFormat,3,Length(AudioFormat));
Language := Copy(Language,3,Length(Language));
setField(fieldAudioFormat, AudioFormat);
setField(fieldLanguages, Language);
// Subtitles
Subtitle := MyTrim(StripHTMLTags(GetStringFromHTML(Page, '<dt class="c1">Untertitel:', '', '</dd>')));
Subtitle := StringReplace(Subtitle,'Untertitel: ','');
if Subtitle = 'Keine Untertitel' then Subtitle := '';
setField(fieldSubtitles, Subtitle);
// Mediatype
MediaType := MyTrim(StripHTMLTags(GetStringFromHTML(Page, '<dt class="c1">Medientyp:','', '</dd>')));
MediaType := StringReplace(MediaType,'Medientyp: ','');
setField(fieldMediaType, MediaType);
// Disks
Disks := MyTrim(StripHTMLTags(GetStringFromHTML(Page, '<dt class="c1">Medienanzahl:','', '</dd>')));
Disks := StringReplace(Disks,'Medienanzahl: ','');
setField(fieldDisks, Disks);
// Package
Packaging := MyTrim(StripHTMLTags(GetStringFromHTML(Page, '<dt class="c1">Verpackung:', '', '</dd>')));
Packaging := StringReplace(Packaging,'Verpackung:','');
Comments := Comments + 'Verpackung: ' + Packaging + CRLF;
// Bonusmaterial
Bonusmaterial := MyTrim(GetStringFromHTML(Page, ' BONUS-MATERIAL </li>', '', '</ul>'));
Bonusmaterial := StringReplace(Bonusmaterial,'</span>','*');
Bonusmaterial := StringReplace(Bonusmaterial,'<li>','-');
Bonusmaterial := MyTrim(StripHTMLTags(Bonusmaterial));
Bonusmaterial := StringReplace(Bonusmaterial,'BONUS-MATERIAL','');
Bonusmaterial := StringReplace(Bonusmaterial,'*',CRLF);
Comments := Comments + CRLF + 'Bonusmaterial' + CRLF + '===========' + CRLF + Bonusmaterial + CRLF;
setField(fieldComments,Comments);
end;
if CanSetPicture then
begin
MovieID := Copy(Address,Pos('?id=',Address)+4,Length(Address));
if GetOption('BigPicture') = 1 then
begin
srcPic := 'http://www.cinefacts.de/bild.php?id=' + MovieID + '&type=db&studio=' + StringReplace(Studio,' ','');
if srcPic = '' then
srcPic := 'http://www.cinefacts.de/bild.php?id=' + MovieID + '&type=ds&studio=' + StringReplace(Studio,' ','');
end
else
srcPic := 'http://www.cinefacts.de/bild.php?id=' + MovieID + '&type=ds&studio=' + StringReplace(Studio,' ','');
GetPicture(srcPic);
end;
//DisplayResults;
end;
procedure AddMoviesTitles(ResultsPage: TStringList);
var
Page,str_: string;
sNr,pNr,aPage : Integer;
MovieTitle, MovieAddress: String;
begin
Page := ResultsPage.Text;
snr := 0;
str_ := MyTrim(StripHTMLTags(GetStringFromHTML(Page, 'Anzahl Ergebnisse gesamt:', '', '</li>')));
str_ := StringReplace(str_,'Anzahl Ergebnisse gesamt: ','');
pNr := StrToInt(StringReplace(str_,')',''),1);
aPage := 1;
while sNr < pNr do
begin
while Pos('details.php?id=', Page) > 0 do
begin
CutBefore(Page, 'details.php?id=');
MovieAddress := 'http://www.cinefacts.de/dvd/db/' + GetStringFromHTML(Page, 'details.php?id=', '', '"');
MovieTitle := MyTrim(GetStringFromHTML(Page, 'details.php?id=', '">', '</tr>'));
MovieTitle := StringReplace(MovieTitle, '</td>', ' | ');
MovieTitle := MyTrim(StripHTMLTags(MovieTitle));
CutAfter(Page, '</tr>');
PickTreeAdd(MovieTitle, MovieAddress);
end;
sNr := sNr + 50;
aPage := aPage + 1;
if sNr < pNr then
Page := GetPage(URLEncode('http://www.cinefacts.de/dvd/suche.php?akseite='+IntToStr(aPage)+'&startwert='+IntToStr(sNr)+'&name='+MovieName));
end;
end;
begin
if CheckVersion(3,5,0) then
begin
MovieName := GetField(fieldTranslatedTitle);
if MovieName = '' then
MovieName := GetField(fieldOriginalTitle);
if Input('cinefacts.de Import', 'Filmtitel eingeben:', MovieName) then
begin
AnalyzeIndexPage('http://www.cinefacts.de/dvd/suche.php?name='+MovieName+'&go.x=0&go.y=0');
end;
end
else
ShowMessage('This script requires a newer version of Ant Movie Catalog (at least the version 3.5.0)');
end.