I hope you will help me 2 more questions.
in the script code, I found:
If (Length(ItemValue)=0) Then ItemValue:=titleValue; //Provider hides the original title if same that title. WEB_SPECIFIC
Is there a way to unhide both origtitle and title when they're the same?
This is only visible if the title and original title are different.
In the custom Imdb_Title field, I edited it so that you have both the original and the local address, if the local address of course exists.
//Get ~alternatetitle~
ItemValue:=TextBetWeenFirst(ItemList,'","alternateName":"','","'); //Strings which opens/closes the data. WEB_SPECIFIC
AddCustomFieldValueByName('Localized title',ItemValue);
if GET_LOCAL_TITLE then AddFieldValueXML('title',ItemValue);
if ItemValue <> '' then LogMessage(' Get result alternatetitle:'+ItemValue+'||');
If ItemValue <> '' then AddCustomFieldValueByName('Imdb_Title',ItemValue+#13+titleValue+' (original title)')
Else AddCustomFieldValueByName('Imdb_Title',titleValue);
//Get ~IMDB_Movietype~
And maybe the biggest challenge for me. Is it possible to get/import English (International) title to a Title field while at the same time importing Localized Title too? Or to some other custom field for example?
In the custom English title field, you now have an English title. However, you have the manual option to possibly get / import English title to a Title field.
Function ParsePage_IMDBMovieAKA(HTML:String):Cardinal; //BlockOpen
//Returns:
// Result:=prFinished; Script has finished gathering data
// Result:=prError; If żany big problem? with exit;
//Retrieve: ~aka~ "Also Known As"
Var
curPos,endPos,index:Integer;
ItemValue,ItemList:String;
ItemValue1:String;
ItemList2:String;
Name,Role,ItemValue2:String;
ItemArray: TWideArray;
Begin
LogMessage('Function ParsePage_IMDBMovieAKA BEGIN=====================||');
Result:=prFinished; //It will change to prError if any big problem with exit;
//Get ~aka~ (several values in a line break separated list) Be careful don't repeat
.
.
.
//Get all aka list ~Imdb Aka~
ItemValue1:=StringReplace(ItemValue1,'|','',True,True,False);
ItemValue1:=StringReplace(ItemValue1,' ',#13,True,True,False);
AddCustomFieldValueByName('Imdb Aka',ItemValue1);
//Get ~aka~ (English title)
curPos:=Pos('<table class="ipl-zebra-list akas-table-test-only">',ItemList2) //String which opens the subList data. WEB_SPECIFIC
While curPos>0 Do Begin
Name:=TextBetWeen(ItemList2,'<td class="aka-item__name">','</td>',false,curPos);
if Name <> '' then LogMessage(' Get result Name:'+Name+'||');
Role:=TextBetWeen(ItemList2,'<td class="aka-item__title">','</td>',false,curPos);
if Role <> '' then LogMessage(' Get result Role:'+Role+'||');
if ItemValue2 <> '' then ItemValue2:=ItemValue2+#13;
if Name <> '' then ItemValue2:=ItemValue2+Name;
if Role <> '' then ItemValue2:=ItemValue2+#160#160+Role;
if ItemValue2 <> '' then LogMessage(' Get results aka 2:'+ItemValue2+'||');
If Pos('(English title)',Name) > 1 then Role:=Role else Role:='';
if ItemValue2 <> '' then LogMessage(' Get results aka2:'+Role+'||');
AddCustomFieldValueByName('English title',Role);
//AddFieldValueXML('title',Role);
curPos:=PosFrom('<tr class="ipl-zebra-list__item aka-item">',ItemList2,curPos) //String which opens the subList data. WEB_SPECIFIC
End;
LogMessage('Function ParsePage_IMDBMovieAKA END=====================||');
End; //BlockClose
IMDB_[EN][HTTPS]_(afrocuban) script is attached.