Personal Video Database
English => Development => Scripts and Templates => Topic started by: Ivek23 on March 15, 2011, 09:55:00 am
-
The AllMovie site has been replaced by AllRovi.
I wonder if it was possible script for AllMovie People Information.
I'm working on AllMovie script for People However, I wonder how such data Birthday in box Birthday shifted into the Comments field,is at all possible because the Person information is not yet the custom fields.
-
I wonder if it was possible script for AllMovie People Information.
I'm working on AllMovie script for People However, I wonder how such data Birthday in box Birthday shifted into the Comments field,is at all possible because the Person information is not yet the custom fields.
Obviously it will be necessary to wait for the PVD version 1. xxx and in the future to complete renovation and improvements in Sections PVD Information for People(It has also Nostra some mention somewhere in the forum).
-
Here is the test and conversion script AllMovie People -Ivek23- Information for People.
Welcome comments and opinions on the script.
---------------------
Appendix attached:
I'm just little changed and corrected for another script attached to a larger size.
[attachment deleted by admin]
-
I have a question:
How this code
function RemoveTagsEx(AText : String) : String;
var
B, E : Integer;
begin
Result := AText;
B := PosFrom('<', Result, 1);
E := PosFrom('>', Result, B);
while (B > 0) AND (B < E) do begin
Delete(Result, B, E - B + 1);
B := Pos('<', Result);
E := Pos('>', Result);
end;
end;
procedure ParseBiography(HTML : String);
var
curPos, endPos : Integer;
TmpStr, TmpStr1, TmpStr2 : String;
begin
curPos := Pos('<div id="results-table">', HTML);
endPos := curPos
if curPos < 1 then
Exit;
//Biography
curPos := PosFrom('<td colspan="2">', HTML, curPos);
endPos := PosFrom('</p></td>', HTML, curPos);
TmpStr := Copy(HTML, curPos, EndPos - curPos);
TmpStr1 := StringReplace(TmpStr, ' -- ', '—', True, True, False);
TmpStr2 := StringReplace(TmpStr1, ' --- ', '—', True, True, False);
TmpStr := StringReplace(TmpStr2, '--', '—', True, True, False);
TmpStr1 := StringReplace(TmpStr, #13#13#13#13, #13#10#13#10, True, True, False);
TmpStr2 := RemoveTagsEx(TmpStr1);
AddFieldValue(pfBio, TmpStr2);
end;
and this code
procedure ParseFilmography(HTML : String);
var
curPos, EndPos : Integer;
TmpStr : String;
Name, Role, URL : String;
begin
curPos := Pos('<div id="results-table">', HTML);
if curPos < 1 then
Exit;
LogMessage('Pasrsing filmography...');
TmpStr := '';
EndPos := curPos;
curPos := PosFrom('http://www.allmovie.com/work/', HTML, curPos);
while (curPos > 0) AND (curPos < PosFrom('</table>', HTML, EndPos)) do begin
EndPos := PosFrom('">', HTML, curPos);
URL := Copy(HTML, curPos, EndPos - curPos);
curPos := EndPos + 2;
EndPos := PosFrom('</a>', HTML, curPos);
Name := Copy(HTML, curPos, EndPos - curPos);
curPos := PosFrom('<td>', HTML, EndPos);
if curPos > 0 then begin
curPos := curPos + 4;
EndPos := PosFrom('</td>', HTML, curPos);
Role := Trim(Copy(HTML, curPos, EndPos - curPos));
end else begin
Role := '';
curPos := EndPos;
end;
AddMoviePerson(Name, '', Role, URL, ctActors);
if TmpStr <> '' then
TmpStr := TmpStr + #13;
if URL <> '' then
TmpStr := TmpStr + '<link url="' + URL + '">';
TmpStr := TmpStr + Name ;
if Role <> '' then
TmpStr := TmpStr + ' - ' + Role;
if URL <> '' then
TmpStr := TmpStr + '</link>';
if curPos > 0 then
curPos := PosFrom('http://www.allmovie.com/work/', HTML, curPos)
else
Exit;
end;
AddFieldValue(pfFilmography, TmpStr);
end;
combine the information in the field pfBio (Biography).
Thanks for the help.
-
For assistance:
For example, people url
http://www.allmovie.com/artist/george-gabby-hayes-31223
http://www.allmovie.com/artist/geoffrey-rush-151418
http://www.allmovie.com/artist/geoffrey-lewis-42203
http://www.allmovie.com/artist/gene-wilder-116771
Added a script to facilitate assistance.
If this change
this AddFieldValue(pfFilmography, TmpStr);
in this
AddFieldValue(pfBio, TmpStr);
I just transferred filmography but not a biography.
---------------------
Appendix attached:
I'm just little changed and corrected for another script attached to a larger size.
[attachment deleted by admin]
-
For assistance:
For example, people url
http://www.allmovie.com/artist/george-gabby-hayes-31223
http://www.allmovie.com/artist/geoffrey-rush-151418
http://www.allmovie.com/artist/geoffrey-lewis-42203
http://www.allmovie.com/artist/gene-wilder-116771
Added a script to facilitate assistance.
If this change
this AddFieldValue(pfFilmography, TmpStr);
in this
AddFieldValue(pfBio, TmpStr);
I just transferred filmography but not a biography.
I worked a lot of tests but I could not find the right code, maybe someone might have some idea or solution for this,
function RemoveTagsEx(AText : String) : String;
var
B, E : Integer;
begin
Result := AText;
B := PosFrom('<', Result, 1);
E := PosFrom('>', Result, B);
while (B > 0) AND (B < E) do begin
Delete(Result, B, E - B + 1);
B := Pos('<', Result);
E := Pos('>', Result);
end;
end;
procedure ParseBiography(HTML : String);
var
curPos, endPos : Integer;
TmpStr, TmpStr1, TmpStr2 : String;
begin
curPos := Pos('<div id="results-table">', HTML);
endPos := curPos
if curPos < 1 then
Exit;
//Biography
curPos := PosFrom('<td colspan="2">', HTML, curPos);
endPos := PosFrom('</p></td>', HTML, curPos);
TmpStr := Copy(HTML, curPos, EndPos - curPos);
TmpStr1 := StringReplace(TmpStr, ' -- ', '—', True, True, False);
TmpStr2 := StringReplace(TmpStr1, ' --- ', '—', True, True, False);
TmpStr := StringReplace(TmpStr2, '--', '—', True, True, False);
TmpStr1 := StringReplace(TmpStr, #13#13#13#13, #13#10#13#10, True, True, False);
TmpStr2 := RemoveTagsEx(TmpStr1);
AddFieldValue(pfBio, 'Biography:' + #13 + TmpStr2);
end;
and
procedure ParseFilmography(HTML : String);
var
curPos, EndPos : Integer;
TmpStr : String;
Name, Role, URL, Year, Aka, Artist : String;
begin
curPos := Pos('<div id="results-table">', HTML);
if curPos < 1 then
Exit;
LogMessage('Pasrsing filmography...');
TmpStr := '';
EndPos := curPos;
EndPos := PosFrom('width="35" align="center', HTML, curPos);
curPos := PosFrom('">', HTML, EndPos) + 2;
EndPos := PosFrom('</td>', HTML, curPos);
Year := Trim(Copy(HTML, curPos, EndPos - curPos));
EndPos := curPos;
curPos := PosFrom('http://www.allmovie.com/work/', HTML, curPos);
while (curPos > 0) AND (curPos < PosFrom('</table>', HTML, EndPos)) do begin
EndPos := PosFrom('">', HTML, curPos);
URL := Copy(HTML, curPos, EndPos - curPos);
curPos := EndPos + 2;
EndPos := PosFrom('</a>', HTML, curPos);
Name := Copy(HTML, curPos, EndPos - curPos);
curPos := PosFrom('<td>', HTML, EndPos);
if curPos > 0 then begin
curPos := curPos + 4;
EndPos := PosFrom('</td>', HTML, curPos);
Role := Trim(Copy(HTML, curPos, EndPos - curPos));
end else begin
Role := '';
curPos := EndPos;
end;
if TmpStr <> '' then
TmpStr := TmpStr + #13;
if URL <> '' then
TmpStr := TmpStr + '<link url="' + URL + '">';
TmpStr := TmpStr + Name ;
if Role <> '' then
TmpStr := TmpStr + ' - ' + Role;
if URL <> '' then
TmpStr := TmpStr + '</link>' + ' ';
if Year <> '' then
TmpStr := TmpStr + '(' + Year + ')' + ' ';
EndPos := PosFrom('width="35" align="center">', HTML, curPos);
curPos := curPos + Length('<tr><small>');
EndPos := PosFrom('</td>', HTML, curPos);
Aka := Copy(HTML, curPos + 5, EndPos - curPos - 16);
EndPos := curPos;
EndPos := PosFrom('width="130', HTML, curPos);
curPos := PosFrom('">', HTML, EndPos) + 2;
EndPos := PosFrom('</td>', HTML, curPos);
Artist := Copy(HTML, curPos, EndPos - curPos);
EndPos := curPos;
EndPos := PosFrom('width="35" align="center', HTML, curPos);
curPos := PosFrom('">', HTML, EndPos) + 2;
EndPos := PosFrom('</td>', HTML, curPos);
Year := Copy(HTML, curPos, EndPos - curPos);
if Artist <> '' then
TmpStr := TmpStr + '- ' + Artist;
if Aka <> '' then
TmpStr := TmpStr + #13 + 'Aka''s: ' + Aka;
if curPos > 0 then
curPos := PosFrom('http://www.allmovie.com/work/', HTML, curPos)
else
Exit;
end;
AddFieldValue(pfBio, 'Filmography:' + #13 + #13 + TmpStr);
end;
that would bring together the biography and filmography in field Biography.
-
that would bring together the biography and filmography in field Biography.
or even both at once can copy together in one box.
-
that would bring together the biography and filmography in field Biography.
or even both at once can copy together in one box.
After many tests, I still have not found the right code, but still has only a data transfer for only Biography or for only a filmography.
-
For perhaps any ideas or solutions from of previous post's here is E-mail for Guest:
Ivanrupnik@simobil.net - not work anymore
new E-mail
ivan.rupnik@amis.net
-
Attention to important:
AllMovie script for People do not work anymore.
-
The AllMovie site has been replaced by AllRovi.