egafd_movie
Complete Details Code:
///// Part <Details> :
If Pos('<th>Details</th>', HTML) > 0 then begin
//Year
//pull ~Year~ from Part 'Details'
dbgstrg := '';
CurPos := Pos('<td valign="top">Released: ', HTML);
endpos := CurPos;
LogMessage('getting year');
dbgstrg := TextBetween(HTML, '<td valign="top">Released: </td><td width="100%" class="notes">', '</td>', False, CurPos);
LogMessage('YEAR:' + dbgstrg);
debug_pos1:=Pos('?',dbgstrg);
if debug_pos1 >0 then
dbgstrg := Copy(dbgstrg,0,debug_pos1-1);
LogMessage(dbgstrg);
debug_pos1:=Pos('s',dbgstrg);
if debug_pos1 >0 then
dbgstrg := Copy(dbgstrg,0,debug_pos1-1);
LogMessage(dbgstrg);
If dbgstrg <> '' then
AddFieldValue(mfYear,dbgstrg);
//Director
//pull ~Director~ from Part 'Details'
dbgstrg := '';
curPos := Pos('<td valign="top">Director: ', HTML);
EndPos := curPos;
LogMessage('getting Director');
dbgstrg:= TextBetween(HTML, '<td valign="top">Director: </td><td width="100%" class="notes">', '</td>', False, CurPos);
LogMessage('DIRECTOR:' + dbgstrg);
If dbgstrg <> '' then
AddFieldValueXML('comment', ' • • ' + SCRIPT_NAME + ' ' + SCRIPT_VERSION +
' • • ' + 'Directors: ' + dbgstrg)
else
AddFieldValueXML('comment', ' • • ' + SCRIPT_NAME + ' ' + SCRIPT_VERSION +
' • • ');
debug_pos1:=Pos('(',dbgstrg);
if debug_pos1 >0 then
dbgstrg := Copy(dbgstrg,0,debug_pos1-1);
LogMessage(dbgstrg);
debug_pos1:=Pos(', ',dbgstrg);
if debug_pos1 >0 then
dbgstrg := Copy(dbgstrg,0,debug_pos1-1);
LogMessage(dbgstrg);
debug_pos1:=Pos(' as ',dbgstrg);
if debug_pos1 >0 then
dbgstrg := Copy(dbgstrg,0,debug_pos1-1);
LogMessage(dbgstrg);
debug_pos1:=Pos(' aas ',dbgstrg);
if debug_pos1 >0 then
dbgstrg := Copy(dbgstrg,0,debug_pos1-1);
LogMessage(dbgstrg);
debug_pos1:=Pos('/',dbgstrg);
if debug_pos1 >0 then
dbgstrg := Copy(dbgstrg,0,debug_pos1-1);
LogMessage(dbgstrg);
debug_pos1:=Pos(' and ',dbgstrg);
if debug_pos1 >0 then
dbgstrg := Copy(dbgstrg,0,debug_pos1-1);
LogMessage(dbgstrg);
debug_pos1:=Pos('?',dbgstrg);
if debug_pos1 >0 then
dbgstrg := Copy(dbgstrg,0,debug_pos1-1);
LogMessage(dbgstrg);
debug_pos1:=Pos('or ',dbgstrg);
if debug_pos1 >0 then
dbgstrg := Copy(dbgstrg,0,debug_pos1-1);
LogMessage(dbgstrg);
If dbgstrg <> '' then
AddMoviePerson(dbgstrg, '', '', '', ctDirectors);
//Notes
//pull ~Notes~ from Part 'Details'
dbgstrg := '';
curpos := Pos('<td valign="top">Notes: ' , HTML);
EndPos := curPos;
LogMessage('Notes')
dbgstrg := TextBetween(HTML, '<td valign="top">Notes: </td><td width="100%" class="notes">', '</td>', False, CurPos);
LogMessage('Notes :' + dbgstrg);
If dbgstrg <> '' then
{AddFieldValue(mfDescription, dbgstrg);}
AddFieldValueXML('tagline', dbgstrg);
end; //// End of Part <Details>