Edit:
Jurassic World Dominion (2022) -- Description added to database after download is nothing like the Description presented on IMDB's site for this movie.
Just finished updating the movie database once more using 'IMDB_ [EN] [HTTPS] _TEST_1'; 2 movies that downloaded the Description also downloaded a bunch of jibber-jabber jargin thereafter as well, making the Description very lengthy; requiring me to manually clean it up. Perhaps you could test the movies yourself to see if a fix should be applied to the script.
They were both animation type movies:
The Bobs Burgers Movie (2022) and
The Sea Beast (2022)
Edit:
Added another movie 'The Phantom Of The Open (2021)' and it downloaded same jargin for Description+ above.
curPos:=Pos('Plot ',ItemValue); //WEB_SPECIFIC.
If 0<curPos then ItemValue:=Copy(ItemValue,0,curPos-1);
Function ParsePage_IMDBMovieREFERENCE(HTML:String):Cardinal; //BlockOpen
//Returns:
// Result:=prFinished; Script has finished gathering data
// Result:=prError; If zany big problem? with exit
//Retrieve: REFERENCE~
Var
curPos,endPos:Integer;
ItemValue,ItemList:String;
//Category,Name:String;
debug_pos1:Integer;
ItemValue22:String;
ItemValue0,ItemValue1,ItemValue2:String;
ItemValue10,ItemValue11,ItemValue12,ItemList2:String;
Begin
LogMessage('Function ParsePage_IMDBMovieREFERENCE BEGIN=====================||');
Result:=prFinished; //It will change to prError if any big problem with exit;
//(*
//~Imdb Title 1~
If Pos('<div id="content-2-wide" class="redesign">',HTML)>0 Then Begin
curPos:=PosFrom('<h3 itemprop="name">',HTML,EndPos);
//curPos:=curPos+Length('<h3 itemprop="name">');
EndPos:=PosFrom('<section class="titlereference-section-overview">',HTML,curPos);
ItemList:=Copy(HTML,curPos,endPos-curPos);
//ItemList:=Trim(Copy(HTML,curPos,endPos-curPos));
//LogMessage(#13+' Parse results ('+IntToStr(curPos)+','+IntToStr(endPos)+') complex ItemList:'+ItemList+'||'+#13);
if (Length(ItemList)>0) then begin
ItemValue0:=TextBetWeenFirst(ItemList,'<h3 itemprop="name">','<span class="titlereference-title-year">');
if ItemValue0 <> '' then LogMessage(' Get result ItemValue0:'+ItemValue0+'||');
if ItemValue0 <> '' then ItemList2:=ItemList2+ItemValue0+' ';
ItemValue10:=TextBetWeenFirst(ItemList,'<span class="titlereference-title-year">','</span>');
if ItemValue10 <> '' then LogMessage(' Get result ItemValue10:'+ItemValue10+'||');
if ItemValue10 <> '' then ItemList2:=ItemList2+ItemValue10+#13;
ItemValue1:=TextBetWeenFirst(ItemList,'</h3>','</span>');
if ItemValue1 <> '' then LogMessage(' Get result ItemValue1:'+ItemValue1+'||');
debug_pos1:=Pos('if (',ItemValue1);
if debug_pos1 >0 then ItemValue1 := Copy(ItemValue1,0,debug_pos1-1);
if ItemValue1 <> '' then LogMessage(' Get result ItemValue1a:'+ItemValue1+'||');
if ItemValue1 <> '' then ItemList2:=ItemList2+ItemValue1+#13;
ItemValue11:=HTMLValue(HTML,curPos,0,'<ul class="ipl-inline-list">','</ul>');
if ItemValue11 <> '' then LogMessage(' Get result ItemValue11:'+ItemValue11+'||');
ItemValue11:=StringReplace(ItemValue11,' ',' '+#8729+' ',True,False,True);
ItemValue11:=StringReplace(ItemValue11,' ',' '+#8729+' ',True,False,True);
ItemValue11:=StringReplace(ItemValue11,' ',' '+#8729+' ',True,False,True);
ItemValue11:=StringReplace(ItemValue11,' ','',True,False,True);
if ItemValue11 <> '' then ItemList2:=ItemList2+ItemValue11+#13;
ItemValue2:=TextBetWeenFirst(ItemList,'<span class="ipl-rating-star__rating">','</span>');
if ItemValue2 <> '' then LogMessage(' Get result ItemValue2:'+ItemValue2+'||');
if ItemValue2 <> '' then ItemList2:=ItemList2+ItemValue2;
ItemValue12:=TextBetWeenFirst(ItemList,'<span class="ipl-rating-star__total-votes">','</span>');
if ItemValue12 <> '' then LogMessage(' Get result ItemValue12:'+ItemValue12+'||');
if ItemValue12 <> '' then ItemList2:=ItemList2+' '+#8226+' '+ItemValue12;
//Write to ~features~ field
//if (Length(ItemList2)>0) then begin
// AddCustomFieldValueByName('Imdb Title 1',ItemList2); //Ivek23 CustomField ~ImdbTechSpecs~ for ~features~
LogMessage(' Get result Movie ~Features~ (CF~ImdbTechSpecs~):'+ItemList2+'||');
//End;
//ItemList2:=ItemValue0+' '+ItemValue10+#13+ItemValue1+#13+ItemValue11+#13+ItemValue2+' '+#8226+' '+ItemValue12;
If ItemList2 <> '' then AddCustomFieldValueByName('Imdb Title 1',ItemList2);
End;
End;
//*)
//Get "Storyline" as ~description~ **
curPos:=Pos('<section class="titlereference-section-overview">',HTML); //WEB_SPECIFIC.
If 0<curPos then begin
ItemValue22:=TextBetWeen(HTML,'<div>','</div>',false,curPos); //Strings which opens/closes the data. WEB_SPECIFIC
//ItemValue:=StringReplace(ItemValue, 'Edit', '', true, false, true); //Cleaning. WEB_SPECIFIC.
//ItemValue:=StringReplace(ItemValue, 'Industry information at your fingertips', '', true, false, true); //Cleaning. WEB_SPECIFIC.
//ItemValue:=StringReplace(ItemValue, 'Some parts of this page won'+#39+'t work property. Please reload or try later.', '', true, false, true); //Cleaning. WEB_SPECIFIC.
curPos:=Pos('Season',ItemValue22); //WEB_SPECIFIC.
If 0<curPos then ItemValue22:=Copy(ItemValue22,0,curPos-1);
curPos:=Pos('Seasons',ItemValue22); //WEB_SPECIFIC.
If 0<curPos then ItemValue22:=Copy(ItemValue22,0,curPos-1);
//AddFieldValueXML('description',ItemValue22);
if ItemValue22 <> '' then LogMessage(' Get result description2:'+#13+ItemValue22+'||');
End;
//Get "Plot Summary" as ~description~
curPos:=Pos('<td class="ipl-zebra-list__label">Plot Summary</td>',HTML); //WEB_SPECIFIC.
If 0<curPos then begin
ItemValue:=TextBetWeen(HTML,'<p>','<p>',false,curPos); //Strings which opens/closes the data. WEB_SPECIFIC
ItemValue:=StringReplace(ItemValue, 'Edit', '', true, false, true); //Cleaning. WEB_SPECIFIC.
ItemValue:=StringReplace(ItemValue, 'Industry information at your fingertips', '', true, false, true); //Cleaning. WEB_SPECIFIC.
ItemValue:=StringReplace(ItemValue, 'Some parts of this page won'+#39+'t work property. Please reload or try later.', '', true, false, true); //Cleaning. WEB_SPECIFIC.
curPos:=Pos('—',ItemValue); //WEB_SPECIFIC.
If 0<curPos then ItemValue:=Copy(ItemValue,0,curPos-1);
curPos:=Pos('Written by ',ItemValue); //WEB_SPECIFIC.
If 0<curPos then ItemValue:=Copy(ItemValue,0,curPos-1);
curPos:=Pos('Plot ',ItemValue); //WEB_SPECIFIC.
If 0<curPos then ItemValue:=Copy(ItemValue,0,curPos-1);
//AddFieldValueXML('description',ItemValue);
LogMessage(' Get result description:'+#13+ItemValue+'||');
End;
if (ItemValue = '') AND (ItemValue22 <> '') then
AddFieldValueXML('description',ItemValue22);
if (ItemValue <> '') AND (ItemValue22 <> '') then
AddFieldValueXML('description',ItemValue);
//Get ~tags~ "keywords" (field with several values in a comma separated list)
If Not(GET_FULL_PLOTKEYWORDS) Then Begin
curPos:=Pos('<td class="ipl-zebra-list__label">Plot Keywords</td>',HTML); //WEB_SPECIFIC.IC.
If 0<curPos Then Begin
EndPos:=curPos;
ItemValue:=HTMLValues(HTML,'<td class="ipl-zebra-list__label">Plot Keywords</td>','</ul>','<li class="ipl-inline-list__item">','</li>',', ',endPos);
curPos:=Pos('See All',ItemValue); //WEB_SPECIFIC.
If 0<curPos then ItemValue:=Copy(ItemValue,0,curPos-1);
AddFieldValueXML('tags',ItemValue);
if ItemValue <> '' then LogMessage(' Get results Tags:'+ItemValue+'||');
End;
End;
//Get ~tagline~
curPos:=Pos('<td class="ipl-zebra-list__label">Taglines</td>',HTML); //WEB_SPECIFIC.
If 0<curPos then begin
ItemValue:=TextBetWeen(HTML,'<td>','<td>',false,curPos); //Strings which opens/closes the data. WEB_SPECIFIC
ItemValue:=StringReplace(ItemValue, 'Edit', '', true, false, true); //Cleaning. WEB_SPECIFIC.
curPos:=Pos('See more',ItemValue); //WEB_SPECIFIC.
If 0<curPos then ItemValue:=Copy(ItemValue,0,curPos-1);
AddFieldValueXML('tagline',ItemValue);
if ItemValue <> '' then LogMessage(' Get result tagline:'+ItemValue+'||');
End;
LogMessage('Function ParsePage_IMDBMovieREFERENCE END=====================||');
End; //BlockClose
//Get "Plot Summary" as ~description~
curPos:=Pos('<td class="ipl-zebra-list__label">Plot Summary</td>',HTML); //WEB_SPECIFIC.
If 0<curPos then begin
ItemValue:=TextBetWeen(HTML,'<p>','<p>',false,curPos); //Strings which opens/closes the data. WEB_SPECIFIC
ItemValue:=StringReplace(ItemValue, 'Edit', '', true, false, true); //Cleaning. WEB_SPECIFIC.
ItemValue:=StringReplace(ItemValue, 'Industry information at your fingertips', '', true, false, true); //Cleaning. WEB_SPECIFIC.
ItemValue:=StringReplace(ItemValue, 'Some parts of this page won'+#39+'t work property. Please reload or try later.', '', true, false, true); //Cleaning. WEB_SPECIFIC.
curPos:=Pos('—',ItemValue); //WEB_SPECIFIC.
If 0<curPos then ItemValue:=Copy(ItemValue,0,curPos-1);
curPos:=Pos('Written by ',ItemValue); //WEB_SPECIFIC.
If 0<curPos then ItemValue:=Copy(ItemValue,0,curPos-1);
curPos:=Pos('Plot ',ItemValue); //WEB_SPECIFIC.
If 0<curPos then ItemValue:=Copy(ItemValue,0,curPos-1);
//AddFieldValueXML('description',ItemValue);
LogMessage(' Get result description:'+#13+ItemValue+'||');
End;
The Black Phone (2021) -- Description added to database after download is similar to the Description presented on IMDB's site for this movie but it is not the same.
Example:
Downloaded Description added to database:
Finney Blake is a shy but clever 13-year-old boy who is abducted by a sadistic killer and trapped in a soundproof basement where screaming is of no use. When a disconnected phone on the wall begins to ring, Finney discovers that he can hear the voices of the killer's previous victims. And they are dead-set on making sure that what happened to them doesn't happen to Finney.
The Black Phone (2021) -- Description added to database after download is similar to the Description presented on IMDB's site for this movie but it is not the same.
Example:
Description given on IMDB's site:
After being abducted by a child killer and locked in a soundproof basement, a 13-year-old boy starts receiving calls on a disconnected phone from the killer's previous victims.