Posted by: Ivek23
« on: December 10, 2013, 02:02:31 pm »ONLY TITLE is my problem. My scripts run well.
ONLY TITLE
For TITLE I can not help it.
ONLY TITLE is my problem. My scripts run well.
ONLY TITLE
For Year I need only 4 digits from end and unformated date i save to Custom Field.
//~mfYear~ or ~Year~
endPos := PosFrom('</span></h1>', HTML, curPos);
curPos := endPos - 5;
TmpStr2 := IntToStr(StrToInt(Copy(HTML, curPos, 4)));
if TmpStr2 = '0' then
TmpStr2 := '';
AddFieldValue(mfYear, TmpStr2);
AddCustomFieldValueByName('Year', TmpStr2);
if TmpStr2 = '' then
TmpStr2 := 'year unknown';
LogMessage(' Parsing: ' + TmpStr1 + '(' + TmpStr2 + ')');
procedure ParseMovie(MovieURL : String; HTML : String);
var
curPos, endPos : Integer;
Date, TmpStr, TmpStr1, TmpStr2, TmpStr3, TmpStr4, TmpStr5 : String;
DateParts: TWideArray;
begin
//Date ~Updated~ (choose simple or verbose version)
Date := DateToStr(CurrentDateTime);
if Date <> '' then
begin
ExplodeString(Date, DateParts, '-');
Date := DateParts[2] +'.'+ DateParts[1] +'.'+ DateParts[0];
AddCustomFieldValueByName('Updated', Date); // Simple
end else
LogMessage('date not found');
procedure ParseMovie(MovieURL : String; HTML : String);
var
curPos, endPos : Integer;
New Name : String;
begin
.
.
.
AddFieldValueXML('title', New Name);
or
AddFieldValue(mfTitle, New Name);