English > Support

Imdb People script issues

<< < (3/9) > >>

afrocuban:

Thanks Ivek!


I never knew about custom fields.


I also didn't know how would database know that there are more awards on the page so it will not populate what is already offered to it:

Event=Ariel Awards, Mexico, Award= Golden Ariel, Category=Best Picture (Mejor Película), Recipient=Roma, Year=2019, Won: True
It clearly says that it is added to database and it contains all the parameters defined by the procedure.


But I'll try to parse all awards and events to check if it works then...


Regarding th function you sent, I started from it actually, but with no luck. I couldn't revise it in a meaningful way to get desired result (mainly due to TextBetWeen), so I had to start from scratch manually parsing html content.

Ivek23:

--- Quote ---(22.12.2024 21:12:36) Compiling script: IMDB_People_[EN][HTTPS].psf
(22.12.2024 21:12:36) Script compiled successfully: IMDB_People_[EN][HTTPS].psf
[Hint] (492:7): Variable 'CURPOS' never used
[Hint] (493:7): Variable 'ITEMVALUE' never used
[Hint] (493:7): Variable 'IMAGEFILE' never used
[Hint] (494:7): Variable 'NAME' never used
[Hint] (494:7): Variable 'PREVIEWURL' never used
[Hint] (582:5): Variable 'CURPOS' never used
[Hint] (582:5): Variable 'ENDPOS' never used
[Hint] (582:5): Variable 'DEBUG_POS1' never used
[Hint] (582:5): Variable 'INDEX' never used
[Hint] (583:5): Variable 'PHOTOURL' never used
[Hint] (583:5): Variable 'ITEMVALUE' never used
[Hint] (583:5): Variable 'ITEMLIST' never used
[Hint] (583:5): Variable 'IMAGEFILE' never used
[Hint] (584:2): Variable 'PERSONID' never used
[Hint] (584:2): Variable 'ITEMVALUE0' never used
[Hint] (584:2): Variable 'ITEMVALUE1' never used
[Hint] (584:2): Variable 'ITEMVALUE2' never used
[Hint] (584:2): Variable 'ITEMVALUE3' never used
[Hint] (585:2): Variable 'JOBTITLE' never used
[Hint] (585:2): Variable 'ALTNAMES' never used
[Hint] (585:2): Variable 'ALTNAMES1' never used
[Hint] (585:2): Variable 'DEATHAGE' never used
[Hint] (586:2): Variable 'ITEMLIST0' never used
[Hint] (586:2): Variable 'ITEMLIST1' never used
[Hint] (586:2): Variable 'ITEMLIST2' never used
[Hint] (586:2): Variable 'ITEMLIST4' never used
[Hint] (587:2): Variable 'TITLE' never used
[Hint] (587:2): Variable 'ROLE' never used
[Hint] (587:2): Variable 'YEAR' never used
[Hint] (587:2): Variable 'MOVIEURL' never used
[Warning] (852:57): "True and" is not needed
[Warning] (852:29): "True and" is not needed
(22.12.2024 21:12:36) Executing script binary
(22.12.2024 21:12:36) Script loaded: IMDB_People_[EN][HTTPS].psf 1.4.3.5
(22.12.2024 21:12:37) Loading database: D:\MyTest-PVD\Nova mapa (5)\PersonalVideoDBP11\MOVIES33B1B22.pvd
(22.12.2024 21:12:38) Person -> LoadStatic -> 0ms
(22.12.2024 21:12:38) Person -> LoadMultivalues -> 0ms
(22.12.2024 21:12:38) Person -> LoadFilms -> 0ms
(22.12.2024 21:12:38) Person -> LoadAwards -> 0ms
(22.12.2024 21:12:38) Person -> LoadImages -> 0ms
(22.12.2024 21:12:40) Compiling script: IMDB_People_[EN][HTTPS].psf
(22.12.2024 21:12:40) Script compiled successfully: IMDB_People_[EN][HTTPS].psf
[Hint] (492:7): Variable 'CURPOS' never used
[Hint] (493:7): Variable 'ITEMVALUE' never used
[Hint] (493:7): Variable 'IMAGEFILE' never used
[Hint] (494:7): Variable 'NAME' never used
[Hint] (494:7): Variable 'PREVIEWURL' never used
[Hint] (582:5): Variable 'CURPOS' never used
[Hint] (582:5): Variable 'ENDPOS' never used
[Hint] (582:5): Variable 'DEBUG_POS1' never used
[Hint] (582:5): Variable 'INDEX' never used
[Hint] (583:5): Variable 'PHOTOURL' never used
[Hint] (583:5): Variable 'ITEMVALUE' never used
[Hint] (583:5): Variable 'ITEMLIST' never used
[Hint] (583:5): Variable 'IMAGEFILE' never used
[Hint] (584:2): Variable 'PERSONID' never used
[Hint] (584:2): Variable 'ITEMVALUE0' never used
[Hint] (584:2): Variable 'ITEMVALUE1' never used
[Hint] (584:2): Variable 'ITEMVALUE2' never used
[Hint] (584:2): Variable 'ITEMVALUE3' never used
[Hint] (585:2): Variable 'JOBTITLE' never used
[Hint] (585:2): Variable 'ALTNAMES' never used
[Hint] (585:2): Variable 'ALTNAMES1' never used
[Hint] (585:2): Variable 'DEATHAGE' never used
[Hint] (586:2): Variable 'ITEMLIST0' never used
[Hint] (586:2): Variable 'ITEMLIST1' never used
[Hint] (586:2): Variable 'ITEMLIST2' never used
[Hint] (586:2): Variable 'ITEMLIST4' never used
[Hint] (587:2): Variable 'TITLE' never used
[Hint] (587:2): Variable 'ROLE' never used
[Hint] (587:2): Variable 'YEAR' never used
[Hint] (587:2): Variable 'MOVIEURL' never used
[Warning] (852:57): "True and" is not needed
[Warning] (852:29): "True and" is not needed
(22.12.2024 21:12:40) Executing script binary
(22.12.2024 21:12:40) Prijava v...
(22.12.2024 21:12:40) Person -> LoadStatic -> 0ms
(22.12.2024 21:12:40) Person -> LoadMultivalues -> 0ms
(22.12.2024 21:12:40) Person -> LoadFilms -> 0ms
(22.12.2024 21:12:40) Person -> LoadAwards -> 0ms
(22.12.2024 21:12:40) Person -> LoadImages -> 0ms
(22.12.2024 21:12:40) Function GetDownloadURL BEGIN======================|
(22.12.2024 21:12:40) Global Var-Mode|0|
(22.12.2024 21:12:40) Global Var-DownloadURL||
(22.12.2024 21:12:40) Person -> LoadStatic -> 0ms
(22.12.2024 21:12:40) Person -> LoadMultivalues -> 0ms
(22.12.2024 21:12:40) Person -> LoadFilms -> 0ms
(22.12.2024 21:12:40) Person -> LoadAwards -> 0ms
(22.12.2024 21:12:40) Person -> LoadImages -> 0ms
(22.12.2024 21:12:40) Stored URL is:http://www.imdb.com/name/nm0190859/awards/||
(22.12.2024 21:12:40) * Stored URL is:http://www.imdb.com/name/nm0190859/awards//||
(22.12.2024 21:12:40)       IMDB URL.
(22.12.2024 21:12:40)       Parse stored information DownloadURL:https://www.imdb.com/name/nm0190859/||
(22.12.2024 21:12:40) Function GetDownloadURL END====================== with Mode=1 Result=D:\MyTest-PVD\Nova mapa (5)\PersonalVideoDBP11\portable.bat|
(22.12.2024 21:12:40) Iskanje ljudi informacij za: Alfonso Cuarón
(22.12.2024 21:12:40) Function ParsePage BEGIN======================|
(22.12.2024 21:12:40) Global Var-Mode|1|
(22.12.2024 21:12:40) Global Var-DownloadURL|https://www.imdb.com/name/nm0190859/|
(22.12.2024 21:12:40) Local Var-URL||
(22.12.2024 21:12:40)   ParsePage mode smNormal|1|. Getting provider data for PersonID|nm0190859|
(22.12.2024 21:12:40)       Function DownloadPage BEGIN======================|
(22.12.2024 21:12:40)       Global Var-DownloadURL|https://www.imdb.com/name/nm0190859/|
(22.12.2024 21:12:40)             Local Var-URL|https://www.imdb.com/name/nm0190859/|
(22.12.2024 21:12:40)             Waiting 1s for delete:D:\MyTest-PVD\Nova mapa (5)\PersonalVideoDBP11\Scripts\Tmp\downpage-UTF8_NO_BOM.htm
(22.12.2024 21:12:41)             Download with PVdBDownPage in file:|D:\MyTest-PVD\Nova mapa (5)\PersonalVideoDBP11\Scripts\Tmp\downpage-UTF8_NO_BOM.htm the information of:|https://www.imdb.com/name/nm0190859/||
(22.12.2024 21:12:41)             Waiting 2s for exists of:D:\MyTest-PVD\Nova mapa (5)\PersonalVideoDBP11\Scripts\Tmp\downpage-UTF8_NO_BOM.htm
(22.12.2024 21:12:43)             Waiting 2s for exists of:D:\MyTest-PVD\Nova mapa (5)\PersonalVideoDBP11\Scripts\Tmp\downpage-UTF8_NO_BOM.htm
(22.12.2024 21:12:45)             Now present complete page file: D:\MyTest-PVD\Nova mapa (5)\PersonalVideoDBP11\Scripts\Tmp\downpage-UTF8_NO_BOM.htm
(22.12.2024 21:12:45)       Function DownloadPage END======================|
(22.12.2024 21:12:45) Function ParsePage_IMDBPersonBASE BEGIN======================|
(22.12.2024 21:12:45) Function ParsePage_IMDBPersonBASE END=====================||
(22.12.2024 21:12:45)       Function DownloadPage BEGIN======================|
(22.12.2024 21:12:45)       Global Var-DownloadURL|https://www.imdb.com/name/nm0190859/awards/|
(22.12.2024 21:12:45)             Local Var-URL|https://www.imdb.com/name/nm0190859/awards/|
(22.12.2024 21:12:46)             Waiting 1s for delete:D:\MyTest-PVD\Nova mapa (5)\PersonalVideoDBP11\Scripts\Tmp\downpage-UTF8_NO_BOM.htm
(22.12.2024 21:12:47)             Download with PVdBDownPage in file:|D:\MyTest-PVD\Nova mapa (5)\PersonalVideoDBP11\Scripts\Tmp\downpage-UTF8_NO_BOM.htm the information of:|https://www.imdb.com/name/nm0190859/awards/||
(22.12.2024 21:12:47)             Waiting 2s for exists of:D:\MyTest-PVD\Nova mapa (5)\PersonalVideoDBP11\Scripts\Tmp\downpage-UTF8_NO_BOM.htm
(22.12.2024 21:12:49)             Waiting 2s for exists of:D:\MyTest-PVD\Nova mapa (5)\PersonalVideoDBP11\Scripts\Tmp\downpage-UTF8_NO_BOM.htm
(22.12.2024 21:12:51)             Waiting 2s for exists of:D:\MyTest-PVD\Nova mapa (5)\PersonalVideoDBP11\Scripts\Tmp\downpage-UTF8_NO_BOM.htm
(22.12.2024 21:12:53)             Now present complete page file: D:\MyTest-PVD\Nova mapa (5)\PersonalVideoDBP11\Scripts\Tmp\downpage-UTF8_NO_BOM.htm
(22.12.2024 21:12:53)       Function DownloadPage END======================|
(22.12.2024 21:12:53) Function ParsePage_IMDBPeopleAWARDS BEGIN=====================||
(22.12.2024 21:12:53) Initial HTML snippet: <!DOCTYPE html><html lang="en-US" xmlns:og="http://opengraphprotocol.org/schema/" xmlns:fb="http://www.facebook.com/2008/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.addEventListener('load', (event) => {
        if (typeof window.csa !== 'undefined' && typeof window.csa === 'function') {
            var csaLatencyPlugin = window.csa('Content', {
             
(22.12.2024 21:12:53) Parsed Event: Ariel Awards, Mexico
(22.12.2024 21:12:53) Parsed Award:  Golden Ariel
(22.12.2024 21:12:53) Parsed Category: Best Picture (Mejor Película)
(22.12.2024 21:12:53) Parsed Recipient: Roma
(22.12.2024 21:12:53) Parsed Year: 2019
(22.12.2024 21:12:53) Parsed Won: True
(22.12.2024 21:12:53) Before calling AddAward with parameters:
(22.12.2024 21:12:53) Event: Ariel Awards, Mexico
(22.12.2024 21:12:53) Award:  Golden Ariel
(22.12.2024 21:12:53) Category: Best Picture (Mejor Película)
(22.12.2024 21:12:53) Recipient: Roma
(22.12.2024 21:12:53) Year: 2019
(22.12.2024 21:12:53) Won: True
(22.12.2024 21:12:53) AddAward executed successfully.
(22.12.2024 21:12:53) IMDb People Awards added Event=Ariel Awards, Mexico, Award= Golden Ariel, Category=Best Picture (Mejor Película), Recipient=Roma, Year=2019, Won=True
(22.12.2024 21:12:53) Added Award to Database: Event=Ariel Awards, Mexico, Award= Golden Ariel, Category=Best Picture (Mejor Película), Recipient=Roma, Year=2019, Won: True
(22.12.2024 21:12:53) Parsed Award:  Silver Ariel
(22.12.2024 21:12:53) Parsed Category: Best Editing (Mejor Edición)
(22.12.2024 21:12:53) Parsed Recipient: Roma
(22.12.2024 21:12:53) Parsed Year: 2019
(22.12.2024 21:12:53) Parsed Won: True
(22.12.2024 21:12:53) Before calling AddAward with parameters:
(22.12.2024 21:12:53) Event: Ariel Awards, Mexico
(22.12.2024 21:12:53) Award:  Silver Ariel
(22.12.2024 21:12:53) Category: Best Editing (Mejor Edición)
(22.12.2024 21:12:53) Recipient: Roma
(22.12.2024 21:12:53) Year: 2019
(22.12.2024 21:12:53) Won: True
(22.12.2024 21:12:53) AddAward executed successfully.
(22.12.2024 21:12:53) IMDb People Awards added Event=Ariel Awards, Mexico, Award= Silver Ariel, Category=Best Editing (Mejor Edición), Recipient=Roma, Year=2019, Won=True
(22.12.2024 21:12:53) Added Award to Database: Event=Ariel Awards, Mexico, Award= Silver Ariel, Category=Best Editing (Mejor Edición), Recipient=Roma, Year=2019, Won: True
(22.12.2024 21:12:53) Parsed Award:  Silver Ariel
(22.12.2024 21:12:53) Parsed Category: Best Screenplay Written Directly for the Screen (Mejor Guión Cinematográfico Original)
(22.12.2024 21:12:53) Parsed Recipient: Roma
(22.12.2024 21:12:53) Error: Year not found.
(22.12.2024 21:12:53) Parsed Won: True
(22.12.2024 21:12:53) Before calling AddAward with parameters:
(22.12.2024 21:12:53) Event: Ariel Awards, Mexico
(22.12.2024 21:12:53) Award:  Silver Ariel
(22.12.2024 21:12:53) Category: Best Screenplay Written Directly for the Screen (Mejor Guión Cinematográfico Original)
(22.12.2024 21:12:53) Recipient: Roma
(22.12.2024 21:12:53) Year: 2019
(22.12.2024 21:12:53) Won: True
(22.12.2024 21:12:53) AddAward executed successfully.
(22.12.2024 21:12:53) IMDb People Awards added Event=Ariel Awards, Mexico, Award= Silver Ariel, Category=Best Screenplay Written Directly for the Screen (Mejor Guión Cinematográfico Original), Recipient=Roma, Year=2019, Won=True
(22.12.2024 21:12:53) Added Award to Database: Event=Ariel Awards, Mexico, Award= Silver Ariel, Category=Best Screenplay Written Directly for the Screen (Mejor Guión Cinematográfico Original), Recipient=Roma, Year=2019, Won: True
(22.12.2024 21:12:53) Parsed Award:  Golden Ariel
(22.12.2024 21:12:53) Parsed Category: Best Picture (Mejor Película)
(22.12.2024 21:12:53) Parsed Recipient: Roma
(22.12.2024 21:12:53) Parsed Year: 2019
(22.12.2024 21:12:53) Parsed Won: True
(22.12.2024 21:12:53) Before calling AddAward with parameters:
(22.12.2024 21:12:53) Event: Ariel Awards, Mexico
(22.12.2024 21:12:53) Award:  Golden Ariel
(22.12.2024 21:12:53) Category: Best Picture (Mejor Película)
(22.12.2024 21:12:53) Recipient: Roma
(22.12.2024 21:12:53) Year: 2019
(22.12.2024 21:12:53) Won: True
(22.12.2024 21:12:53) AddAward executed successfully.
(22.12.2024 21:12:53) IMDb People Awards added Event=Ariel Awards, Mexico, Award= Golden Ariel, Category=Best Picture (Mejor Película), Recipient=Roma, Year=2019, Won=True
(22.12.2024 21:12:53) Added Award to Database: Event=Ariel Awards, Mexico, Award= Golden Ariel, Category=Best Picture (Mejor Película), Recipient=Roma, Year=2019, Won: True
(22.12.2024 21:12:53) Parsed Award:  Silver Ariel
(22.12.2024 21:12:53) Parsed Category: Best Editing (Mejor Edición)
(22.12.2024 21:12:53) Parsed Recipient: Roma
(22.12.2024 21:12:53) Parsed Year: 2019
(22.12.2024 21:12:53) Parsed Won: True
(22.12.2024 21:12:53) Before calling AddAward with parameters:
(22.12.2024 21:12:53) Event: Ariel Awards, Mexico
(22.12.2024 21:12:53) Award:  Silver Ariel
(22.12.2024 21:12:53) Category: Best Editing (Mejor Edición)
(22.12.2024 21:12:53) Recipient: Roma
(22.12.2024 21:12:53) Year: 2019
(22.12.2024 21:12:53) Won: True
(22.12.2024 21:12:53) AddAward executed successfully.
(22.12.2024 21:12:53) IMDb People Awards added Event=Ariel Awards, Mexico, Award= Silver Ariel, Category=Best Editing (Mejor Edición), Recipient=Roma, Year=2019, Won=True
(22.12.2024 21:12:53) Added Award to Database: Event=Ariel Awards, Mexico, Award= Silver Ariel, Category=Best Editing (Mejor Edición), Recipient=Roma, Year=2019, Won: True
(22.12.2024 21:12:53) Parsed Award:  Silver Ariel
(22.12.2024 21:12:53) Parsed Category: Best Screenplay Written Directly for the Screen (Mejor Guión Cinematográfico Original)
(22.12.2024 21:12:53) Parsed Recipient: Roma
(22.12.2024 21:12:53) Error: Year not found.
(22.12.2024 21:12:53) Parsed Won: True
(22.12.2024 21:12:53) Before calling AddAward with parameters:
(22.12.2024 21:12:53) Event: Ariel Awards, Mexico
(22.12.2024 21:12:53) Award:  Silver Ariel
(22.12.2024 21:12:53) Category: Best Screenplay Written Directly for the Screen (Mejor Guión Cinematográfico Original)
(22.12.2024 21:12:53) Recipient: Roma
(22.12.2024 21:12:53) Year: 2019
(22.12.2024 21:12:53) Won: True
(22.12.2024 21:12:53) AddAward executed successfully.
(22.12.2024 21:12:53) IMDb People Awards added Event=Ariel Awards, Mexico, Award= Silver Ariel, Category=Best Screenplay Written Directly for the Screen (Mejor Guión Cinematográfico Original), Recipient=Roma, Year=2019, Won=True
(22.12.2024 21:12:53) Added Award to Database: Event=Ariel Awards, Mexico, Award= Silver Ariel, Category=Best Screenplay Written Directly for the Screen (Mejor Guión Cinematográfico Original), Recipient=Roma, Year=2019, Won: True
(22.12.2024 21:12:53) Parsed Award:  Golden Ariel
(22.12.2024 21:12:53) Parsed Category: Best Picture (Mejor Película)
(22.12.2024 21:12:53) Parsed Recipient: Roma
(22.12.2024 21:12:53) Parsed Year: 2019
(22.12.2024 21:12:53) Parsed Won: True
(22.12.2024 21:12:53) Before calling AddAward with parameters:
(22.12.2024 21:12:53) Event: Ariel Awards, Mexico
(22.12.2024 21:12:53) Award:  Golden Ariel
(22.12.2024 21:12:53) Category: Best Picture (Mejor Película)
(22.12.2024 21:12:53) Recipient: Roma
(22.12.2024 21:12:53) Year: 2019
(22.12.2024 21:12:53) Won: True
(22.12.2024 21:12:53) AddAward executed successfully.
(22.12.2024 21:12:53) IMDb People Awards added Event=Ariel Awards, Mexico, Award= Golden Ariel, Category=Best Picture (Mejor Película), Recipient=Roma, Year=2019, Won=True
(22.12.2024 21:12:53) Added Award to Database: Event=Ariel Awards, Mexico, Award= Golden Ariel, Category=Best Picture (Mejor Película), Recipient=Roma, Year=2019, Won: True
(22.12.2024 21:12:53) Parsed Award:  Silver Ariel
(22.12.2024 21:12:53) Parsed Category: Best Editing (Mejor Edición)
(22.12.2024 21:12:53) Parsed Recipient: Roma
(22.12.2024 21:12:53) Parsed Year: 2019
(22.12.2024 21:12:53) Parsed Won: True
(22.12.2024 21:12:53) Before calling AddAward with parameters:
(22.12.2024 21:12:53) Event: Ariel Awards, Mexico
(22.12.2024 21:12:53) Award:  Silver Ariel
(22.12.2024 21:12:53) Category: Best Editing (Mejor Edición)
(22.12.2024 21:12:53) Recipient: Roma
(22.12.2024 21:12:53) Year: 2019
(22.12.2024 21:12:53) Won: True
(22.12.2024 21:12:53) AddAward executed successfully.
(22.12.2024 21:12:53) IMDb People Awards added Event=Ariel Awards, Mexico, Award= Silver Ariel, Category=Best Editing (Mejor Edición), Recipient=Roma, Year=2019, Won=True
(22.12.2024 21:12:53) Added Award to Database: Event=Ariel Awards, Mexico, Award= Silver Ariel, Category=Best Editing (Mejor Edición), Recipient=Roma, Year=2019, Won: True
(22.12.2024 21:12:53) Parsed Award:  Silver Ariel
(22.12.2024 21:12:53) Parsed Category: Best Screenplay Written Directly for the Screen (Mejor Guión Cinematográfico Original)
(22.12.2024 21:12:53) Parsed Recipient: Roma
(22.12.2024 21:12:53) Error: Year not found.
(22.12.2024 21:12:53) Parsed Won: True
(22.12.2024 21:12:53) Before calling AddAward with parameters:
(22.12.2024 21:12:53) Event: Ariel Awards, Mexico
(22.12.2024 21:12:53) Award:  Silver Ariel
(22.12.2024 21:12:53) Category: Best Screenplay Written Directly for the Screen (Mejor Guión Cinematográfico Original)
(22.12.2024 21:12:53) Recipient: Roma
(22.12.2024 21:12:53) Year: 2019
(22.12.2024 21:12:53) Won: True
(22.12.2024 21:12:53) AddAward executed successfully.
(22.12.2024 21:12:53) IMDb People Awards added Event=Ariel Awards, Mexico, Award= Silver Ariel, Category=Best Screenplay Written Directly for the Screen (Mejor Guión Cinematográfico Original), Recipient=Roma, Year=2019, Won=True
(22.12.2024 21:12:53) Added Award to Database: Event=Ariel Awards, Mexico, Award= Silver Ariel, Category=Best Screenplay Written Directly for the Screen (Mejor Guión Cinematográfico Original), Recipient=Roma, Year=2019, Won: True
(22.12.2024 21:12:53) Parsed Award:  Golden Ariel
(22.12.2024 21:12:53) Parsed Category: Best Picture (Mejor Película)
(22.12.2024 21:12:53) Parsed Recipient: Roma
(22.12.2024 21:12:53) Parsed Year: 2019
(22.12.2024 21:12:53) Parsed Won: True
(22.12.2024 21:12:53) Before calling AddAward with parameters:
(22.12.2024 21:12:53) Event: Ariel Awards, Mexico
(22.12.2024 21:12:53) Award:  Golden Ariel
(22.12.2024 21:12:53) Category: Best Picture (Mejor Película)
(22.12.2024 21:12:53) Recipient: Roma
(22.12.2024 21:12:53) Year: 2019
(22.12.2024 21:12:53) Won: True
(22.12.2024 21:12:53) AddAward executed successfully.
(22.12.2024 21:12:53) IMDb People Awards added Event=Ariel Awards, Mexico, Award= Golden Ariel, Category=Best Picture (Mejor Película), Recipient=Roma, Year=2019, Won=True
(22.12.2024 21:12:53) Added Award to Database: Event=Ariel Awards, Mexico, Award= Golden Ariel, Category=Best Picture (Mejor Película), Recipient=Roma, Year=2019, Won: True
--- End quote ---

Above is a part of the log output where it is visible that the Function ParsePage_IMDBPeopleAWARDS does not close. I had this in mind before, that the part of the code that would end the Function ParsePage_IMDBPeopleAWARDS is missing.

Ivek23:
Here is the IMDB_People_[EN][HTTPS]_Awards script, which now correctly transfers Awards data to the awards field for the 'Chico' Hernandez person from the url added below using a Python Selenium script

https://www.imdb.com/name/nm0379491/awards/

I have corrected or added some parts of the code to your code and it works.

Python Selenium script instructions and code will be published probably by the new year in the Integrating Selenium to PVD topic.

http://www.videodb.info/forum_en/index.php/topic,4357.0.html

afrocuban:

--- Quote from: Ivek23 on December 22, 2024, 09:36:31 pm ---
Above is a part of the log output where it is visible that the Function ParsePage_IMDBPeopleAWARDS does not close. I had this in mind before, that the part of the code that would end the Function ParsePage_IMDBPeopleAWARDS is missing.

--- End quote ---

Wow! Strange things happen! Now I realize what you meant, but it never occur to me since it didn't loop in my case, that's why I didn't understand!


--- Quote from: Ivek23 on December 23, 2024, 01:29:13 pm ---Here is the IMDB_People_[EN][HTTPS]_Awards script, which now correctly transfers Awards data to the awards field for the 'Chico' Hernandez person from the url added below using a Python Selenium script

https://www.imdb.com/name/nm0379491/awards/

I have corrected or added some parts of the code to your code and it works.

Python Selenium script instructions and code will be published probably by the new year in the Integrating Selenium to PVD topic.

http://www.videodb.info/forum_en/index.php/topic,4357.0.html

--- End quote ---

Thanks! It's so great that you are willing to look in the code I provide AND HELP! I'm still testing it, and it looks that it properly parses awards inside events, but it always takes the name of the first event (In your case, person had only one award, but in my case there are multiple, and the first is "Ariel Awards, Mexico" and we can see in the log that there are also Oscars, ALMA Awards, and others after that I didn't post, but all added to event "Ariel Awards, Mexico" event):


--- Quote ---12/23/2024 8:34:38 PM) Parsed Event: Ariel Awards, Mexico
(12/23/2024 8:34:38 PM) Parsed Award:  Golden Ariel
(12/23/2024 8:34:38 PM) Parsed Category: Best Picture (Mejor Película)
(12/23/2024 8:34:38 PM) Parsed Recipient: Roma
(12/23/2024 8:34:38 PM) Parsed Year: 2019
(12/23/2024 8:34:38 PM) Parsed Won: True
(12/23/2024 8:34:38 PM) Before calling AddAward with parameters:
(12/23/2024 8:34:38 PM) Event: Ariel Awards, Mexico
(12/23/2024 8:34:38 PM) Award:  Golden Ariel
(12/23/2024 8:34:38 PM) Category: Best Picture (Mejor Película)
(12/23/2024 8:34:38 PM) Recipient: Roma
(12/23/2024 8:34:38 PM) Year: 2019
(12/23/2024 8:34:38 PM) Won: True
(12/23/2024 8:34:38 PM) AddAward executed successfully.
(12/23/2024 8:34:38 PM) Added Award to Database: Event=Ariel Awards, Mexico, Award= Golden Ariel, Category=Best Picture (Mejor Película), Recipient=Roma, Year=2019, Won: True
(12/23/2024 8:34:38 PM) Parsed Award:  Silver Ariel
(12/23/2024 8:34:38 PM) Parsed Category: Best Original Story (Mejor Argumento Original)
(12/23/2024 8:34:38 PM) Parsed Recipient: Love in the Time of Hysteria
(12/23/2024 8:34:38 PM) Parsed Year: 1992
(12/23/2024 8:34:38 PM) Parsed Won: True
(12/23/2024 8:34:38 PM) Before calling AddAward with parameters:
(12/23/2024 8:34:38 PM) Event: Ariel Awards, Mexico
(12/23/2024 8:34:38 PM) Award:  Silver Ariel
(12/23/2024 8:34:38 PM) Category: Best Original Story (Mejor Argumento Original)
(12/23/2024 8:34:38 PM) Recipient: Love in the Time of Hysteria
(12/23/2024 8:34:38 PM) Year: 1992
(12/23/2024 8:34:38 PM) Won: True
(12/23/2024 8:34:38 PM) AddAward executed successfully.
(12/23/2024 8:34:38 PM) Added Award to Database: Event=Ariel Awards, Mexico, Award= Silver Ariel, Category=Best Original Story (Mejor Argumento Original), Recipient=Love in the Time of Hysteria, Year=1992, Won: True
(12/23/2024 8:34:38 PM) Parsed Award:  Oscar
(12/23/2024 8:34:38 PM) Parsed Category: Best Achievement in Cinematography
(12/23/2024 8:34:38 PM) Parsed Recipient: Roma
(12/23/2024 8:34:38 PM) Parsed Year: 2019
(12/23/2024 8:34:38 PM) Parsed Won: True
(12/23/2024 8:34:38 PM) Before calling AddAward with parameters:
(12/23/2024 8:34:38 PM) Event: Ariel Awards, Mexico
(12/23/2024 8:34:38 PM) Award:  Oscar
(12/23/2024 8:34:38 PM) Category: Best Achievement in Cinematography
(12/23/2024 8:34:38 PM) Recipient: Roma
(12/23/2024 8:34:38 PM) Year: 2019
(12/23/2024 8:34:38 PM) Won: True
(12/23/2024 8:34:38 PM) AddAward executed successfully.
(12/23/2024 8:34:38 PM) Added Award to Database: Event=Ariel Awards, Mexico, Award= Oscar, Category=Best Achievement in Cinematography, Recipient=Roma, Year=2019, Won: True
(12/23/2024 8:34:38 PM) Parsed Award:  Oscar
(12/23/2024 8:34:38 PM) Parsed Category: Best Achievement in Film Editing
(12/23/2024 8:34:38 PM) Parsed Recipient: Gravity
(12/23/2024 8:34:38 PM) Parsed Year: 2007
(12/23/2024 8:34:38 PM) Parsed Won: True
(12/23/2024 8:34:38 PM) Before calling AddAward with parameters:
(12/23/2024 8:34:38 PM) Event: Ariel Awards, Mexico
(12/23/2024 8:34:38 PM) Award:  Oscar
(12/23/2024 8:34:38 PM) Category: Best Achievement in Film Editing
(12/23/2024 8:34:38 PM) Recipient: Gravity
(12/23/2024 8:34:38 PM) Year: 2007
(12/23/2024 8:34:38 PM) Won: True
(12/23/2024 8:34:38 PM) AddAward executed successfully.
(12/23/2024 8:34:38 PM) Added Award to Database: Event=Ariel Awards, Mexico, Award= Oscar, Category=Best Achievement in Film Editing, Recipient=Gravity, Year=2007, Won: True
(12/23/2024 8:34:38 PM) Parsed Award:  Saturn Award
(12/23/2024 8:34:38 PM) Parsed Category: Best Writing
(12/23/2024 8:34:38 PM) Parsed Recipient: Gravity
(12/23/2024 8:34:38 PM) Parsed Year: 2014
(12/23/2024 8:34:38 PM) Parsed Won: True
(12/23/2024 8:34:38 PM) Before calling AddAward with parameters:
(12/23/2024 8:34:38 PM) Event: Ariel Awards, Mexico
(12/23/2024 8:34:38 PM) Award:  Saturn Award
(12/23/2024 8:34:38 PM) Category: Best Writing
(12/23/2024 8:34:38 PM) Recipient: Gravity
(12/23/2024 8:34:38 PM) Year: 2014
(12/23/2024 8:34:38 PM) Won: True
(12/23/2024 8:34:38 PM) AddAward executed successfully.
(12/23/2024 8:34:38 PM) Added Award to Database: Event=Ariel Awards, Mexico, Award= Saturn Award, Category=Best Writing, Recipient=Gravity, Year=2014, Won: True
(12/23/2024 8:34:38 PM) Parsed Award:  ALMA Award
(12/23/2024 8:34:38 PM) Parsed Category: Outstanding Screenplay - Motion Picture
(12/23/2024 8:34:38 PM) Parsed Recipient: Children of Men
(12/23/2024 8:34:38 PM) Parsed Year: 1999
(12/23/2024 8:34:38 PM) Parsed Won: True

--- End quote ---


Fortunately, or unfortunately, I'm testing with Alfonso Cuaron, https://www.imdb.com/name/nm0190859/ who has 152 events and several hundred awards, so it should vocer all the cases to be tested.


ONE MORE IMPORTANT THING TO NOTE:
For some reason, PVD and script won't work (at least for me) if I manually set the page to be parsed by Function ParsePage_IMDBPeopleAWARDS, like this for example:


--- Quote ---// Parse Awards provider page = BASE_URL_AWARD_PERSON
If GET_FULL_AWARDS Then Begin
  LogMessage('Starting to parse awards page.');
  HTML := ('Tmp\UTF8_NO_BOM-Awards.mhtml');
  LogMessage('Read awards page from file: ' + Copy(HTML, 1, 500)); // Log the file content
--- End quote ---

--- Code: ---(I can't remember if this is proper syntax, but I set it properly at the time of the testing, whatever it was)
--- End code ---


it wouldn't work without downloading so I had to fake downloading with completely new function:



--- Quote ---Function DownloadPage1(URL:AnsiString; FileName:AnsiString):String;
Var
  ScriptPath, WebText: String;
Begin
  LogMessage(Chr(9)+Chr(9)+'Function DownloadPage1 BEGIN======================|');
  LogMessage(Chr(9)+Chr(9)+'Global Var-DownloadURL|'+URL+'|');
  LogMessage(Chr(9)+Chr(9)+'      Local Var-URL|'+URL+'|');
  ScriptPath := GetAppPath + 'Scripts\';


  // Directly read the existing file instead of downloading
  If FileExists(ScriptPath + FileName) Then Begin
    LogMessage(Chr(9)+Chr(9)+'      File already exists: '+ScriptPath + FileName);
    WebText := FileToString(ScriptPath + FileName);
    WebText := ConvertEncoding(WebText, 65001);  // Convert to UTF-8
    Result := WebText;
    LogMessage(Chr(9)+Chr(9)+'      Read file content successfully.');
  End Else Begin
    LogMessage(Chr(9)+Chr(9)+'      File does not exist: '+ScriptPath + FileName);
    Result := '';
  End;


  LogMessage(Chr(9)+Chr(9)+'Function DownloadPage1 END======================|');
End;
--- End quote ---




and then to "call downloading"


--- Quote ---
// Parse Awards provider page = BASE_URL_AWARD_PERSON
If GET_FULL_AWARDS Then Begin
  LogMessage('Starting to parse awards page.');
  HTML := DownloadPage1(DownloadURL, 'Tmp\UTF8_NO_BOM-Awards.mhtml');
  LogMessage('Read awards page from file: ' + Copy(HTML, 1, 500)); // Log the file content
 

--- End quote ---


When I reach the phase of passing URL TO SELENIUM TO DOWNLOAD THE PAGE, I'm still not sure how it will work in .psf: will I have to fake download after Selenium passes back the page, or whatever. For someone not knowing how to code, this is too much to comprehend without actual trials.

afrocuban:
Your code also loops:



--- Quote ---1372: (12/23/2024 9:53:57 PM) Parsed Award:  Dorian Award
   Line   1379: (12/23/2024 9:53:57 PM) Award:  Dorian Award
   Line   1385: (12/23/2024 9:53:57 PM) Added Award to Database: Event=Ariel Awards, Mexico, Award= Dorian Award, Category=Screenplay of the Year, Recipient=Roma, Year=2014, Won: True
   Line   2646: (12/23/2024 9:53:59 PM) Parsed Award:  Dorian Award
   Line   2653: (12/23/2024 9:53:59 PM) Award:  Dorian Award
   Line   2659: (12/23/2024 9:53:59 PM) Added Award to Database: Event=Ariel Awards, Mexico, Award= Dorian Award, Category=Screenplay of the Year, Recipient=Roma, Year=2014, Won: True
   Line   3920: (12/23/2024 9:54:01 PM) Parsed Award:  Dorian Award
   Line   3927: (12/23/2024 9:54:01 PM) Award:  Dorian Award
   Line   3933: (12/23/2024 9:54:01 PM) Added Award to Database: Event=Ariel Awards, Mexico, Award= Dorian Award, Category=Screenplay of the Year, Recipient=Roma, Year=2014, Won: True
   Line   5194: (12/23/2024 9:54:02 PM) Parsed Award:  Dorian Award
   Line   5201: (12/23/2024 9:54:02 PM) Award:  Dorian Award
   Line   5207: (12/23/2024 9:54:02 PM) Added Award to Database: Event=Ariel Awards, Mexico, Award= Dorian Award, Category=Screenplay of the Year, Recipient=Roma, Year=2014, Won: True
   Line   6468: (12/23/2024 9:54:04 PM) Parsed Award:  Dorian Award
   Line   6475: (12/23/2024 9:54:04 PM) Award:  Dorian Award
   Line   6481: (12/23/2024 9:54:04 PM) Added Award to Database: Event=Ariel Awards, Mexico, Award= Dorian Award, Category=Screenplay of the Year, Recipient=Roma, Year=2014, Won: True
   Line   7742: (12/23/2024 9:54:06 PM) Parsed Award:  Dorian Award
   Line   7749: (12/23/2024 9:54:06 PM) Award:  Dorian Award
   Line   7755: (12/23/2024 9:54:06 PM) Added Award to Database: Event=Ariel Awards, Mexico, Award= Dorian Award, Category=Screenplay of the Year, Recipient=Roma, Year=2014, Won: True
   Line   9016: (12/23/2024 9:54:08 PM) Parsed Award:  Dorian Award
   Line   9023: (12/23/2024 9:54:08 PM) Award:  Dorian Award
   Line   9029: (12/23/2024 9:54:08 PM) Added Award to Database: Event=Ariel Awards, Mexico, Award= Dorian Award, Category=Screenplay of the Year, Recipient=Roma, Year=2014, Won: True
   Line  10290: (12/23/2024 9:54:09 PM) Parsed Award:  Dorian Award
   Line  10297: (12/23/2024 9:54:09 PM) Award:  Dorian Award
   Line  10303: (12/23/2024 9:54:09 PM) Added Award to Database: Event=Ariel Awards, Mexico, Award= Dorian Award, Category=Screenplay of the Year, Recipient=Roma, Year=2014, Won: True
   Line  11564: (12/23/2024 9:54:11 PM) Parsed Award:  Dorian Award
   Line  11571: (12/23/2024 9:54:11 PM) Award:  Dorian Award
   Line  11577: (12/23/2024 9:54:11 PM) Added Award to Database: Event=Ariel Awards, Mexico, Award= Dorian Award, Category=Screenplay of the Year, Recipient=Roma, Year=2014, Won: True
   Line  12838: (12/23/2024 9:54:13 PM) Parsed Award:  Dorian Award
   Line  12845: (12/23/2024 9:54:13 PM) Award:  Dorian Award
   Line  12851: (12/23/2024 9:54:13 PM) Added Award to Database: Event=Ariel Awards, Mexico, Award= Dorian Award, Category=Screenplay of the Year, Recipient=Roma, Year=2014, Won: True
   Line  14112: (12/23/2024 9:54:15 PM) Parsed Award:  Dorian Award
   Line  14119: (12/23/2024 9:54:15 PM) Award:  Dorian Award
   Line  14125: (12/23/2024 9:54:15 PM) Added Award to Database: Event=Ariel Awards, Mexico, Award= Dorian Award, Category=Screenplay of the Year, Recipient=Roma, Year=2014, Won: True
   Line  15386: (12/23/2024 9:54:17 PM) Parsed Award:  Dorian Award
   Line  15393: (12/23/2024 9:54:17 PM) Award:  Dorian Award
   Line  15399: (12/23/2024 9:54:17 PM) Added Award to Database: Event=Ariel Awards, Mexico, Award= Dorian Award, Category=Screenplay of the Year, Recipient=Roma, Year=2014, Won: True
   Line  16660: (12/23/2024 9:54:18 PM) Parsed Award:  Dorian Award
   Line  16667: (12/23/2024 9:54:18 PM) Award:  Dorian Award
   Line  16673: (12/23/2024 9:54:18 PM) Added Award to Database: Event=Ariel Awards, Mexico, Award= Dorian Award, Category=Screenplay of the Year, Recipient=Roma, Year=2014, Won: True
   Line  17934: (12/23/2024 9:54:20 PM) Parsed Award:  Dorian Award
   Line  17941: (12/23/2024 9:54:20 PM) Award:  Dorian Award
   Line  17947: (12/23/2024 9:54:20 PM) Added Award to Database: Event=Ariel Awards, Mexico, Award= Dorian Award, Category=Screenplay of the Year, Recipient=Roma, Year=2014, Won: True
   Line  19208: (12/23/2024 9:54:21 PM) Parsed Award:  Dorian Award
   Line  19215: (12/23/2024 9:54:21 PM) Award:  Dorian Award
   Line  19221: (12/23/2024 9:54:21 PM) Added Award to Database: Event=Ariel Awards, Mexico, Award= Dorian Award, Category=Screenplay of the Year, Recipient=Roma, Year=2014, Won: True
   Line  20482: (12/23/2024 9:54:23 PM) Parsed Award:  Dorian Award
   Line  20489: (12/23/2024 9:54:23 PM) Award:  Dorian Award
   Line  20495: (12/23/2024 9:54:23 PM) Added Award to Database: Event=Ariel Awards, Mexico, Award= Dorian Award, Category=Screenplay of the Year, Recipient=Roma, Year=2014, Won: True
   Line  21756: (12/23/2024 9:54:25 PM) Parsed Award:  Dorian Award
   Line  21763: (12/23/2024 9:54:25 PM) Award:  Dorian Award
   Line  21769: (12/23/2024 9:54:25 PM) Added Award to Database: Event=Ariel Awards, Mexico, Award= Dorian Award, Category=Screenplay of the Year, Recipient=Roma, Year=2014, Won: True
   Line  23030: (12/23/2024 9:54:26 PM) Parsed Award:  Dorian Award
   Line  23037: (12/23/2024 9:54:27 PM) Award:  Dorian Award
   Line  23043: (12/23/2024 9:54:27 PM) Added Award to Database: Event=Ariel Awards, Mexico, Award= Dorian Award, Category=Screenplay of the Year, Recipient=Roma, Year=2014, Won: True
   Line  24304: (12/23/2024 9:54:28 PM) Parsed Award:  Dorian Award
   Line  24311: (12/23/2024 9:54:28 PM) Award:  Dorian Award
   Line  24317: (12/23/2024 9:54:28 PM) Added Award to Database: Event=Ariel Awards, Mexico, Award= Dorian Award, Category=Screenplay of the Year, Recipient=Roma, Year=2014, Won: True
   Line  25578: (12/23/2024 9:54:30 PM) Parsed Award:  Dorian Award
   Line  25585: (12/23/2024 9:54:30 PM) Award:  Dorian Award
   Line  25591: (12/23/2024 9:54:30 PM) Added Award to Database: Event=Ariel Awards, Mexico, Award= Dorian Award, Category=Screenplay of the Year, Recipient=Roma, Year=2014, Won: True
   Line  26852: (12/23/2024 9:54:32 PM) Parsed Award:  Dorian Award
   Line  26859: (12/23/2024 9:54:32 PM) Award:  Dorian Award
   Line  26865: (12/23/2024 9:54:32 PM) Added Award to Database: Event=Ariel Awards, Mexico, Award= Dorian Award, Category=Screenplay of the Year, Recipient=Roma, Year=2014, Won: True
   Line  28126: (12/23/2024 9:54:33 PM) Parsed Award:  Dorian Award
   Line  28133: (12/23/2024 9:54:33 PM) Award:  Dorian Award
   Line  28139: (12/23/2024 9:54:33 PM) Added Award to Database: Event=Ariel Awards, Mexico, Award= Dorian Award, Category=Screenplay of the Year, Recipient=Roma, Year=2014, Won: True
   Line  29400: (12/23/2024 9:54:35 PM) Parsed Award:  Dorian Award
   Line  29407: (12/23/2024 9:54:35 PM) Award:  Dorian Award
   Line  29413: (12/23/2024 9:54:35 PM) Added Award to Database: Event=Ariel Awards, Mexico, Award= Dorian Award, Category=Screenplay of the Year, Recipient=Roma, Year=2014, Won: True
   Line  30674: (12/23/2024 9:54:37 PM) Parsed Award:  Dorian Award
   Line  30681: (12/23/2024 9:54:37 PM) Award:  Dorian Award
   Line  30687: (12/23/2024 9:54:37 PM) Added Award to Database: Event=Ariel Awards, Mexico, Award= Dorian Award, Category=Screenplay of the Year, Recipient=Roma, Year=2014, Won: True
   Line  31948: (12/23/2024 9:54:39 PM) Parsed Award:  Dorian Award
   Line  31955: (12/23/2024 9:54:39 PM) Award:  Dorian Award
   Line  31961: (12/23/2024 9:54:39 PM) Added Award to Database: Event=Ariel Awards, Mexico, Award= Dorian Award, Category=Screenplay of the Year, Recipient=Roma, Year=2014, Won: True
   Line  33222: (12/23/2024 9:54:41 PM) Parsed Award:  Dorian Award
   Line  33229: (12/23/2024 9:54:41 PM) Award:  Dorian Award
   Line  33235: (12/23/2024 9:54:41 PM) Added Award to Database: Event=Ariel Awards, Mexico, Award= Dorian Award, Category=Screenplay of the Year, Recipient=Roma, Year=2014, Won: True
   Line  34496: (12/23/2024 9:54:43 PM) Parsed Award:  Dorian Award
   Line  34503: (12/23/2024 9:54:43 PM) Award:  Dorian Award
   Line  34509: (12/23/2024 9:54:43 PM) Added Award to Database: Event=Ariel Awards, Mexico, Award= Dorian Award, Category=Screenplay of the Year, Recipient=Roma, Year=2014, Won: True
   Line  35770: (12/23/2024 9:54:44 PM) Parsed Award:  Dorian Award
   Line  35777: (12/23/2024 9:54:44 PM) Award:  Dorian Award
   Line  35783: (12/23/2024 9:54:44 PM) Added Award to Database: Event=Ariel Awards, Mexico, Award= Dorian Award, Category=Screenplay of the Year, Recipient=Roma, Year=2014, Won: True
   Line  37044: (12/23/2024 9:54:46 PM) Parsed Award:  Dorian Award
   Line  37051: (12/23/2024 9:54:46 PM) Award:  Dorian Award
   Line  37057: (12/23/2024 9:54:46 PM) Added Award to Database: Event=Ariel Awards, Mexico, Award= Dorian Award, Category=Screenplay of the Year, Recipient=Roma, Year=2014, Won: True
   Line  38318: (12/23/2024 9:54:48 PM) Parsed Award:  Dorian Award
   Line  38325: (12/23/2024 9:54:48 PM) Award:  Dorian Award
   Line  38331: (12/23/2024 9:54:48 PM) Added Award to Database: Event=Ariel Awards, Mexico, Award= Dorian Award, Category=Screenplay of the Year, Recipient=Roma, Year=2014, Won: True
   Line  39592: (12/23/2024 9:54:50 PM) Parsed Award:  Dorian Award
   Line  39599: (12/23/2024 9:54:50 PM) Award:  Dorian Award
   Line  39605: (12/23/2024 9:54:50 PM) Added Award to Database: Event=Ariel Awards, Mexico, Award= Dorian Award, Category=Screenplay of the Year, Recipient=Roma, Year=2014, Won: True
   Line  40866: (12/23/2024 9:54:52 PM) Parsed Award:  Dorian Award
   Line  40873: (12/23/2024 9:54:52 PM) Award:  Dorian Award
   Line  40879: (12/23/2024 9:54:52 PM) Added Award to Database: Event=Ariel Awards, Mexico, Award= Dorian Award, Category=Screenplay of the Year, Recipient=Roma, Year=2014, Won: True
   Line  42140: (12/23/2024 9:54:54 PM) Parsed Award:  Dorian Award
   Line  42147: (12/23/2024 9:54:54 PM) Award:  Dorian Award
--- End quote ---


so that's one more thing to resolve

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version