Author Topic: IMDb  (Read 58184 times)

0 Members and 2 Guests are viewing this topic.

Offline afrocuban

  • Moderator
  • *****
  • Posts: 476
    • View Profile
Re: IMDb
« Reply #60 on: December 14, 2023, 02:26:07 am »
Imdb.com[EN][HTTPS]_Search script attached.

Executing the script causes the error on my side

Offline Ivek23

  • Global Moderator
  • *****
  • Posts: 2713
    • View Profile
Re: IMDb
« Reply #61 on: December 14, 2023, 10:14:28 am »

Yes, maybe this will help you. If any field was left blank as in this example, it will not be visible.

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: [Select]
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

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?

Code: [Select]
    //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;
Here is the code for IMDb reviews/user comments. Replace this code in the script, it should fix the problem.


Is that possible?
Not possible.
« Last Edit: December 14, 2023, 05:06:13 pm by Ivek23 »
Ivek23
Win 10 64bit (32bit)   PVD v0.9.9.21, PVD v1.0.2.7, PVD v1.0.2.7 + MOD


Offline Ivek23

  • Global Moderator
  • *****
  • Posts: 2713
    • View Profile
Re: IMDb
« Reply #62 on: December 14, 2023, 10:16:45 am »
Imdb.com[EN][HTTPS]_Search script attached.

Executing the script causes the error on my side

Here I need the title and url link of the movie so I can check what's wrong.

Ivek23
Win 10 64bit (32bit)   PVD v0.9.9.21, PVD v1.0.2.7, PVD v1.0.2.7 + MOD


Offline Ivek23

  • Global Moderator
  • *****
  • Posts: 2713
    • View Profile
Re: IMDb
« Reply #63 on: December 17, 2023, 11:06:41 am »
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.
Ivek23
Win 10 64bit (32bit)   PVD v0.9.9.21, PVD v1.0.2.7, PVD v1.0.2.7 + MOD


Offline afrocuban

  • Moderator
  • *****
  • Posts: 476
    • View Profile
Re: IMDb
« Reply #64 on: December 18, 2023, 11:33:28 pm »
Imdb.com[EN][HTTPS]_Search script attached.

Executing the script causes the error on my side

Here I need the title and url link of the movie so I can check what's wrong.



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

Offline afrocuban

  • Moderator
  • *****
  • Posts: 476
    • View Profile
Re: IMDb
« Reply #65 on: December 18, 2023, 11:35:34 pm »


Is that possible?
Not possible.



Thanks! Good to know to avoid banging my head off the wall, hahah.

Offline afrocuban

  • Moderator
  • *****
  • Posts: 476
    • View Profile
Re: IMDb
« Reply #66 on: December 18, 2023, 11:45:52 pm »

Instead, the script fills in the field with:
Code: [Select]
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

Code: [Select]
    //Get ~User Reviews~
...
Here is the code for IMDb reviews/user comments. Replace this code in the script, it should fix the problem.



Wow! Works like a charmmmm! Many, many thanks Ivek!

Offline Ivek23

  • Global Moderator
  • *****
  • Posts: 2713
    • View Profile
Re: IMDb
« Reply #67 on: December 19, 2023, 10:50:26 am »
Imdb.com[EN][HTTPS]_Search script attached.

Executing the script causes the error on my side

Here I need the title and url link of the movie so I can check what's wrong.



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

With the menu F for Fake movie title both search scripts find this title without problems even with proxy settings on.

I'm guessing that the problem must be on your side, but I don't know what exactly it is.
Ivek23
Win 10 64bit (32bit)   PVD v0.9.9.21, PVD v1.0.2.7, PVD v1.0.2.7 + MOD


Offline afrocuban

  • Moderator
  • *****
  • Posts: 476
    • View Profile
Re: IMDb
« Reply #68 on: December 19, 2023, 08:58:18 pm »
Thank you Ivek. It's the same for each movie without IMDb url. I have no idea where to start to track such an issue down

Offline afrocuban

  • Moderator
  • *****
  • Posts: 476
    • View Profile
Re: IMDb
« Reply #69 on: December 22, 2023, 08:17:14 pm »
I got some diagnose. Please check what is happening if any url is stored in the url field and running IMDb search after that:


Code: [Select]
(12/22/2023 8:19:44 PM) Compiling script: Imdb.com[EN][HTTPS]_Search_adv.psf
(12/22/2023 8:19:44 PM) Script compiled successfully: Imdb.com[EN][HTTPS]_Search_adv.psf
[Hint] (501:2): Variable 'CURPOS' never used
[Hint] (501:2): Variable 'ENDPOS' never used
[Hint] (502:2): Variable 'TMP' never used
[Hint] (502:2): Variable 'SEARCHSTR' never used
[Hint] (499:10): Variable 'Result' never used
[Hint] (594:2): Variable 'DEBUG_POS1' never used
(12/22/2023 8:19:44 PM) Executing script binary
(12/22/2023 8:19:44 PM) Logging in...
(12/22/2023 8:19:44 PM) Called GetCodePage
(12/22/2023 8:19:44 PM) Called GetCurrentMode
(12/22/2023 8:19:44 PM) GetCurrentMode: Search
(12/22/2023 8:19:44 PM) Called GetDownloadURL - Mode: 0
(12/22/2023 8:19:44 PM)  * DownloadURL:
http://www.filmaffinity.com/en/film220449.html || * Mode: 1
(12/22/2023 8:19:44 PM) Called GetBaseURL
(12/22/2023 8:19:44 PM) Searching movie information for: Luxembourg, Luxembourg
(12/22/2023 8:19:44 PM) Called GetCurrentMode
(12/22/2023 8:19:44 PM) GetCurrentMode: Normal
(12/22/2023 8:19:44 PM) Called ParsePage - Normal Mode
(12/22/2023 8:19:44 PM) Called ParseMoviePage
(12/22/2023 8:19:44 PM) Called GetMovieTitle
(12/22/2023 8:19:44 PM) GetMovieTitle:
(12/22/2023 8:19:44 PM) GetMovieTitle =>
(12/22/2023 8:19:44 PM) Called GetMovieYear
(12/22/2023 8:19:44 PM) GetMovieYear =>
(12/22/2023 8:19:44 PM)  * Provider data info retreived Ok in 2023-12-22 20:19:44| (~Updated~)
(12/22/2023 8:19:44 PM) Finish
« Last Edit: December 22, 2023, 08:20:38 pm by afrocuban »

Offline Ivek23

  • Global Moderator
  • *****
  • Posts: 2713
    • View Profile
Re: IMDb
« Reply #70 on: December 23, 2023, 09:28:47 am »
Imdb.com[EN][HTTPS]_Search_adv script or Imdb.com[EN][HTTPS]_Search script cannot find search results if there is already some other url link in the url field. In this case, I recommend using the IMDB_[EN][HTTPS]_Search -b script for advanced search results. You can use the IMDB_[EN][HTTPS]_Search -a script to simply search results. Both scripts will work for you even if there is already another url link in the url field.

IMDB_[EN][HTTPS]_Search -b script and IMDB_[EN][HTTPS]_Search -a script is  attached.
Ivek23
Win 10 64bit (32bit)   PVD v0.9.9.21, PVD v1.0.2.7, PVD v1.0.2.7 + MOD


Offline NetworkShark

  • Administrator
  • *****
  • Posts: 29
  • SysAdmin for Work? For Fun!
    • View Profile
Re: IMDb
« Reply #71 on: December 23, 2023, 09:39:46 am »
I got some diagnose. Please check what is happening if any url is stored in the url field and running IMDb search after that:


Code: [Select]
(12/22/2023 8:19:44 PM) Compiling script: Imdb.com[EN][HTTPS]_Search_adv.psf
(12/22/2023 8:19:44 PM) Script compiled successfully: Imdb.com[EN][HTTPS]_Search_adv.psf
[Hint] (501:2): Variable 'CURPOS' never used
[Hint] (501:2): Variable 'ENDPOS' never used
[Hint] (502:2): Variable 'TMP' never used
[Hint] (502:2): Variable 'SEARCHSTR' never used
[Hint] (499:10): Variable 'Result' never used
[Hint] (594:2): Variable 'DEBUG_POS1' never used
(12/22/2023 8:19:44 PM) Executing script binary
(12/22/2023 8:19:44 PM) Logging in...
(12/22/2023 8:19:44 PM) Called GetCodePage
(12/22/2023 8:19:44 PM) Called GetCurrentMode
(12/22/2023 8:19:44 PM) GetCurrentMode: Search
(12/22/2023 8:19:44 PM) Called GetDownloadURL - Mode: 0
(12/22/2023 8:19:44 PM)  * DownloadURL:
http://www.filmaffinity.com/en/film220449.html || * Mode: 1
(12/22/2023 8:19:44 PM) Called GetBaseURL
(12/22/2023 8:19:44 PM) Searching movie information for: Luxembourg, Luxembourg
(12/22/2023 8:19:44 PM) Called GetCurrentMode
(12/22/2023 8:19:44 PM) GetCurrentMode: Normal
(12/22/2023 8:19:44 PM) Called ParsePage - Normal Mode
(12/22/2023 8:19:44 PM) Called ParseMoviePage
(12/22/2023 8:19:44 PM) Called GetMovieTitle
(12/22/2023 8:19:44 PM) GetMovieTitle:
(12/22/2023 8:19:44 PM) GetMovieTitle =>
(12/22/2023 8:19:44 PM) Called GetMovieYear
(12/22/2023 8:19:44 PM) GetMovieYear =>
(12/22/2023 8:19:44 PM)  * Provider data info retreived Ok in 2023-12-22 20:19:44| (~Updated~)
(12/22/2023 8:19:44 PM) Finish

Thanks afrocuban, I made a bugfix to the script released a few posts earlier.
Now only if the urls are from IMDb are used for data retrieval.

Happy Holidays!
SysAdmin for Work? For Fun!

Offline Ivek23

  • Global Moderator
  • *****
  • Posts: 2713
    • View Profile
Re: IMDb
« Reply #72 on: December 23, 2023, 09:51:09 am »
Thanks for help and fix bug.
Ivek23
Win 10 64bit (32bit)   PVD v0.9.9.21, PVD v1.0.2.7, PVD v1.0.2.7 + MOD


Offline afrocuban

  • Moderator
  • *****
  • Posts: 476
    • View Profile
Re: IMDb
« Reply #73 on: December 23, 2023, 01:32:54 pm »


Thanks afrocuban, I made a bugfix to the script released a few posts earlier.
Now only if the urls are from IMDb are used for data retrieval.

Happy Holidays!


Thank you, NetworkShark and Ivek! Best wishes!


Just to let know NetworkShark, that his fix now works if there is one non-imdb link in it. But, if there are more than one links there (in my case, that would be AllMovie and FilmAffinity links), then it crashes PVD again.

Ivek's -b search script doesn't offer right result when multiple choices are, while -a search script offers the right movie among others.

Example:

http://www.imdb.com/title/tt0058724/


So, generally it looks -a search script is the best to use in order not to miss the result for the movie we are looking for.
« Last Edit: December 23, 2023, 01:57:08 pm by afrocuban »

Offline NetworkShark

  • Administrator
  • *****
  • Posts: 29
  • SysAdmin for Work? For Fun!
    • View Profile
Re: IMDb
« Reply #74 on: December 24, 2023, 09:53:54 am »
Thanks for help and fix bug.
I'm here to help! 8)



Thanks afrocuban, I made a bugfix to the script released a few posts earlier.
Now only if the urls are from IMDb are used for data retrieval.

Happy Holidays!


Thank you, NetworkShark and Ivek! Best wishes!


Just to let know NetworkShark, that his fix now works if there is one non-imdb link in it. But, if there are more than one links there (in my case, that would be AllMovie and FilmAffinity links), then it crashes PVD again.

Ivek's -b search script doesn't offer right result when multiple choices are, while -a search script offers the right movie among others.

Example:

http://www.imdb.com/title/tt0058724/


So, generally it looks -a search script is the best to use in order not to miss the result for the movie we are looking for.

Thank you afrocuban, you too!

I can't replicate the error, can you get the log?

Thanks,
Net
SysAdmin for Work? For Fun!

Offline Pacifist

  • User
  • ***
  • Posts: 68
    • View Profile
Re: IMDb
« Reply #75 on: March 09, 2024, 03:42:09 pm »
Is there any way to restore the addition of rewards? It takes a long time to fill it out manually  ??? ??? ???

Offline Ivek23

  • Global Moderator
  • *****
  • Posts: 2713
    • View Profile
Re: IMDb
« Reply #76 on: March 09, 2024, 07:30:51 pm »
Is there any way to restore the addition of rewards? It takes a long time to fill it out manually  ??? ??? ???

No, there is currently no way or option to resume adding rewards. Also, if there was a way to restore adding rewards, only 5 items per reward category could be fixed, unfortunately.
Ivek23
Win 10 64bit (32bit)   PVD v0.9.9.21, PVD v1.0.2.7, PVD v1.0.2.7 + MOD


Offline Pacifist

  • User
  • ***
  • Posts: 68
    • View Profile
Re: IMDb
« Reply #77 on: July 14, 2024, 10:41:06 am »
Hi!
Is it possible to get rid of artifacts in the "Comments" column? Example "Doctor Who" (TV Series 2023; https://www.imdb.com/title/tt31433814/)

Offline Ivek23

  • Global Moderator
  • *****
  • Posts: 2713
    • View Profile
Re: IMDb
« Reply #78 on: July 14, 2024, 02:17:23 pm »
Hi!
Is it possible to get rid of artifacts in the "Comments" column? Example "Doctor Who" (TV Series 2023; https://www.imdb.com/title/tt31433814/)

Yes, it would probably be possible if I knew which IMDb script you are using and it can handle this problem.
Ivek23
Win 10 64bit (32bit)   PVD v0.9.9.21, PVD v1.0.2.7, PVD v1.0.2.7 + MOD


Offline Pacifist

  • User
  • ***
  • Posts: 68
    • View Profile
Re: IMDb
« Reply #79 on: July 14, 2024, 07:54:19 pm »
Hi!
Is it possible to get rid of artifacts in the "Comments" column? Example "Doctor Who" (TV Series 2023; https://www.imdb.com/title/tt31433814/)

Yes, it would probably be possible if I knew which IMDb script you are using and it can handle this problem.
.bat
EXECUTE=IMDB_[EN][HTTPS](series).psf|IMDB_[EN][HTTPS].psf|IMDB_[EN][HTTPS]_(Connections).psf|IMDB_[EN][HTTPS]_(Cast&Crew).psf|IMDB_[EN][HTTPS]_(Plot Keywords).psf|IMDB_[EN][HTTPS](episodes).psf
I’ll be grateful if you can tell me what I can throw out of this?
« Last Edit: July 14, 2024, 07:58:26 pm by Pacifist »

 

anything