Personal Video Database

English => Development => Topic started by: Ivek23 on February 07, 2012, 01:12:25 pm

Title: People imdb script: additional information in the comment box
Post by: Ivek23 on February 07, 2012, 01:12:25 pm
People imdb script question:
 
I have made People imdb script with additional information which is People imdb plugin not transferred  and is already in the final phase of testing of that I see how it works and or it may be necessary something to fix. I know this as well. that this additional information, for example from ParsePeople (Main Page information) is transferred to this code
Code: [Select]
//~Career~
curPos := Pos('<div class="infobar">', HTML);
if curPos > 0 then begin
EndPos := curPos;
    //AddFieldValue(pfTransName, TextBetween(HTML, '">', '</div>', True, curPos));
    TmpStr1 := TextBetween(HTML, '">', '</div>', True, curPos);
TmpStr1 := StringReplace(TmpStr1, ' | ', ', ', true, false, true);
fullinfo1:= fullinfo1 + ' • • Alternate people info • • ' + #13;
if TmpStr1 <> '' then
fullinfo1:= fullinfo1 + 'Career: ' + TmpStr1 + #13; 
LogMessage(fullinfo1);
end;

//~Height~
curPos := Pos('<h2>Personal Details</h2>', HTML);
if curPos > 0 then begin
EndPos := curPos;
         TmpStr := TextBetween(HTML, '<h4 class="inline">Height:</h4>', '</div>', True, curPos);
if TmpStr <> '' then
fullinfo1:= fullinfo1 + 'Height : ' + TmpStr + #13;
LogMessage(fullinfo1);
end;

If fullinfo1 <> '' then AddFieldValueXML('comment', fullinfo1);
in the Comment box, but this additional information from ParseBiography (Biography Page)  is transferred to this code
Code: [Select]
//~Nickname~
curPos := Pos('<h5>Nickname</h5>', HTML);
if curPos > 0 then begin
EndPos := curPos;
TmpStr := TextBetween(HTML, '<h5>Nickname</h5>', '<h5>', True, curPos);
if TmpStr <> '' then
fullinfo2:= fullinfo2 + 'Alternate Names : ' + TmpStr + #13;
LogMessage(fullinfo2);
end;

//~Height~
curPos := Pos('<h5>Height</h5>', HTML);
if curPos > 0 then begin
EndPos := curPos;
        TmpStr := TextBetween(HTML, '<h5>Height</h5>', '<h5>', True, curPos); 
if TmpStr <> '' then
fullinfo2:= fullinfo2 + 'Height : ' + TmpStr + #13;
LogMessage(fullinfo2);
end;

//~Spouse~
    TmpStr:= HTMLValues2(HTML,
'<h5>Spouse</h5>', '</table>',
'<td valign="top">' , '</td>',
', ', EndPos);
if TmpStr <> '' then
fullinfo2:= fullinfo2 + 'Spouse : ' + TmpStr + #13;
LogMessage(fullinfo2);

fullinfo2:= fullinfo2;
LogMessage(fullinfo2);
If fullinfo2 <> '' then AddFieldValueXML('comment', fullinfo2);
not passed in the Comment box.

I wonder how the above described information as such combine them into a single total information and as such by then download in the Comment box.
Title: Re: People imdb script: additional information in the comment box
Post by: Ivek23 on February 07, 2012, 02:02:12 pm
I found a solution that is very simple:
Code: [Select]
fullinfo1 := fullinfo1;
LogMessage(fullinfo1);
    //If fullinfo1 <> '' then AddFieldValueXML('comment', fullinfo1);
    fullinfo1 := fullinfo1+fullinfo2;
end;
 
procedure ParseBiography(BiographyURL : String; HTML : String);
var
curPos, endPos: Integer;
Name, URL, TmpStr, TmpStr1, TmpStr2, TmpStr3, TmpStr4 : String;
begin

fullinfo2 := fullinfo1+fullinfo2;
fullinfo2 := fullinfo2;

//Get ~Biography URL~

Script is attached.



Notice:

I have not repaired this Imdb People script, because the PVD Does not yet support custom fields for the People.

All you need to pass the current script,  it is Simpe People imdb script with additional information.



BTW: Here (http://www.videodb.info/forum_en/index.php/topic,3114.0.html) it is Simpe People imdb script with additional information.


[attachment deleted by admin]