Author Topic: People imdb script: additional information in the comment box  (Read 5158 times)

0 Members and 1 Guest are viewing this topic.

Offline Ivek23

  • Global Moderator
  • *****
  • Posts: 2667
    • View Profile
People imdb script: additional information in the comment box
« 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.
Ivek23
Win 10 64bit (32bit)   PVD v0.9.9.21, PVD v1.0.2.7, PVD v1.0.2.7 + MOD


Offline Ivek23

  • Global Moderator
  • *****
  • Posts: 2667
    • View Profile
Re: People imdb script: additional information in the comment box
« Reply #1 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 it is Simpe People imdb script with additional information.


[attachment deleted by admin]
« Last Edit: September 13, 2012, 08:20:44 am by Ivek23 »
Ivek23
Win 10 64bit (32bit)   PVD v0.9.9.21, PVD v1.0.2.7, PVD v1.0.2.7 + MOD