Witam, jak ktoś ma wersję programu ponad 4 i chce aby skrypt poprawiony przez Ariell'a pobierał dodatkowo informacje o dystrybutorze i studio, powinien utworzyć w programie pola niestandardowe o Tag'u "Distribution' i drugie o Tag'u 'Studio'. Następnie w skrypcie należy po liniach
Code: Select all
procedure AnalyzeMoviePage(Address : String);
var
Page, PageTEMP, Authors : TStringList;
Line, Value, Hours, Mins : String;
Rates, TraTitle, OrgTitle : String;
LineNr, MinsInt : Integer;
StartPos, EndPos : Integer;
Szukane, SzukaneEnd : String;
Separator : String;
begin
Page := TStringList.Create;
Authors := TStringList.Create;
Page.Text := UTF8Decode(GetPage(Address));
if ServiceMode<>'' then SaveServiceMode(Page, 'StronaFilmu');
wkleić kod:
Code: Select all
//Dystrybucja
Value := TextBetween(Page.Text, 'dystrybucja:', 'studio:');
Value := StringReplace(Value, '</dd>', ',');
Value := StringReplace(Value, ',', ', ');
HTMLRemoveTags(Value);
HTMLDecode(Value);
if Copy(Value, Length(Value) - 1, 2) = ', ' then
Value := Copy(Value, 0, Length(Value) - 2);
SetCustomField('Distribution', Trim(Value));
//Studio
Value := TextBetween(Page.Text, 'studio:', 'inne tytuły:');
Value := StringReplace(Value, '</li><li>', ',');
Value := StringReplace(Value, ',', ', ');
HTMLRemoveTags(Value);
HTMLDecode(Value);
Value := StringReplace(Value, '(więcej...)', '');
if Copy(Value, Length(Value) - 1, 2) = ', ' then
Value := Copy(Value, 0, Length(Value) - 2);
SetCustomField('Studio', Trim(Value));
a przed liniami:
Code: Select all
// Tytuł polski i oryginalny
TraTitle := TextBetween(Page.Text, 'property="v:itemreviewed">', '</a>');
OrgTitle := TextBetween(Page.Text, '<h2 class="cap s-16 top-5">', '</h2>');
HTMLRemoveTags(TraTitle);
UniToPol(TraTitle);
if (Length(Trim(TraTitle)) > 0) then
SetField(fieldTranslatedTitle, Trim(TraTitle));
tak będzie wyglądała ciągłość skryptu, pozdrawiam