English > Support
IMDb
afrocuban:
--- Quote from: Ivek23 on December 13, 2023, 10:33:45 am ---Imdb.com[EN][HTTPS]_Search script attached.
--- End quote ---
Executing the script causes the error on my side
Ivek23:
--- Quote from: afrocuban on December 14, 2023, 01:49:32 am ---
--- Quote from: Ivek23 on December 13, 2023, 08:37:53 am ---
Yes, maybe this will help you. If any field was left blank as in this example, it will not be visible.
--- End quote ---
Thanks, but I wasn't clear. My goal is something else.
As you know(?), at the moment IMDb script doesn't import IMDb reviews/user comments.
Instead, the script fills in the field with:
--- Code: ---fbml"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><script>if(typeof uet === 'function'){ uet('bb', 'LoadTitle', {wb: 1}); }</script><script>window.addEventListen
--- End code ---
I want to avoid this and to be able to set importing for this/custom field to be "Do nothing" or "Set if empty", like for the default fields in the screenshot.
Is that possible?
--- End quote ---
--- Code: --- //Get ~User Reviews~
curPos:=Pos('<h3 class="ipc-title__text">User reviews',HTML); //WEB_SPECIFIC.
If 0<curPos then begin
curPos:=PosFrom('</button><div class="ipc-overflowText--children"><div class="ipc-html-content ipc-html-content--base" role="presentation"><div class="ipc-html-content-inner-div">',HTML,curPos)+Length('</button><div class="ipc-overflowText--children"><div class="ipc-html-content ipc-html-content--base" role="presentation"><div class="ipc-html-content-inner-div">'); //Strings which opens/closes the data. WEB_SPECIFIC;
EndPos:=PosFrom('</div></div></div><div class="ipc-list-card__actions"><div data-testid="review-actions" class="',HTML,curPos); //Strings which opens/closes the data. WEB_SPECIFIC
ItemValue:=Copy(HTML,curPos,endPos-curPos); //Strings which opens/closes the data. WEB_SPECIFIC
ItemValue:=StringReplace(ItemValue,':)','',True,False,True);
ItemValue:=StringReplace(ItemValue,'=)','',True,False,True);
curPos:=Pos('<!DOCTYPE html>',ItemValue);
If 0<curPos then ItemValue:=Copy(ItemValue,0,curPos-1);
curPos:=Pos('er('+#39+'load'+#39,ItemValue);
If 0<curPos then ItemValue:=Copy(ItemValue,0,curPos-1);
curPos:=Pos('Find showtimes, ',ItemValue);
If 0<curPos then ItemValue:=Copy(ItemValue,0,curPos-1);
ItemValue:=StringReplace(ItemValue,'</div>','',True,False,True);
ItemValue:=StringReplace(ItemValue,'<ul><li>','',True,False,True);
ItemValue:=StringReplace(ItemValue,'</li></ul>','',True,False,True);
AddCustomFieldValueByName('User Reviews',ItemValue);
AddCustomFieldValueByName('User Comments',ItemValue);
if ItemValue <> '' then LogMessage(' Get result User Reviews (CF~User Reviews~): <br>'+ItemValue+'||');
End;
--- End code ---
Here is the code for IMDb reviews/user comments. Replace this code in the script, it should fix the problem.
--- Quote from: afrocuban on December 14, 2023, 01:49:32 am ---Is that possible?
--- End quote ---
Not possible.
Ivek23:
--- Quote from: afrocuban on December 14, 2023, 02:26:07 am ---
--- Quote from: Ivek23 on December 13, 2023, 10:33:45 am ---Imdb.com[EN][HTTPS]_Search script attached.
--- End quote ---
Executing the script causes the error on my side
--- End quote ---
Here I need the title and url link of the movie so I can check what's wrong.
Ivek23:
The Imdb.com[EN][HTTPS]_Search_adv script is made in the same way as the Imdb.com[EN][HTTPS]_Search script but with the difference that the Advanced search list of search results is displayed.
You can use it if the Imdb.com[EN][HTTPS]_Search script may not show you results or may not add the correct url in case there are multiple movie titles of the same title.
The Imdb.com[EN][HTTPS]_Search_adv script also displays more hits in the list of search results.
The exact year of release of the movies is also correctly transferred here. Works in all PVD versions.
Imdb.com[EN][HTTPS]_Search_adv script attached.
afrocuban:
--- Quote from: Ivek23 on December 14, 2023, 10:16:45 am ---
--- Quote from: afrocuban on December 14, 2023, 02:26:07 am ---
--- Quote from: Ivek23 on December 13, 2023, 10:33:45 am ---Imdb.com[EN][HTTPS]_Search script attached.
--- End quote ---
Executing the script causes the error on my side
--- End quote ---
Here I need the title and url link of the movie so I can check what's wrong.
--- End quote ---
Hello Ivek. It's the same with any existing entry that doesn't have imdb url (logically, yet to be searched for the title to get it's url).
For example, https://www.imdb.com/title/tt0072962/
It's the same for_adv.psf script
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version