News:

SMF - Just Installed!

Main Menu

Recent posts

#51
Talk / Re: Videodb.info news
Last post by Ivek23 - 11 25 May, 2026, 11:51:12 AM
#52
PVD Python Scripts / Re: Python (+Selenium) Chrome ...
Last post by Ivek23 - 8 24 May, 2026, 08:04:11 AM
Added archived "Internet Archive" Python (+Selenium) Chrome general script page (afrocuban user) in pdf format.
#53
PVD Python Scripts / Re: Python (+Selenium) Chrome ...
Last post by Ivek23 - 8 24 May, 2026, 08:01:44 AM
You also need to install this library for python to work successfully and download information from the Imdb website.

QuoteB 1. pip install requests beautifulsoup4
#54
PVD Python Scripts / Python (+Selenium) Chrome gene...
Last post by Ivek23 - 8 24 May, 2026, 08:00:46 AM
This is copied from the archived "Internet Archive" Python (+Selenium) Chrome general script page (afrocuban user)



This is fork and upgrade of Ivek's selenium script found here:

Quotehttp://mailmirdoch.net/index.php?topic=60.0

For this to work ensure that:

QuoteA. You installed python
B. You installed selenium by

quote]pip install selenium
QuoteC. You have your Chrome bin on a PATH
D. You have Python folder on your PATH
E. pythonw.exe is not missing, or it's containing folder is on the PATH

This script:
Quote1. Uses Chrome browser instead Firefox
2. Uses chromedriver.exe instead geckodriver
3. Starts chromedriver.exe silently
4. Silently invokes browser in a headless mode (no pop-up windows of browser)
5. Scrapes .htm page of a given url
6. No path is needed to set manually inside the script - it is set to be relative to the path of selenium script!

For using relative path, ensure:

Quote6A. You put this script into "Scripts" folder of your PVD instance.
6B. You put appropirate chromedriver.exe to the "Script" folder, too.

To silently invoke selenium script itself by PVD's .psf script (no pop-up windows of selenium script's cmd window), be sure to use pythonw.exe instead of python.exe, like this for example:

QuoteFileExecute('pythonw.exe', '"' + ScriptPath + 'selenium_script-Chrome.py" "' + URL + '" "' + ScriptPath + BASE_DOWNLOAD_FILE_NO_BOM + '"');

Now, the last one will probably be ensured by those who maintain corresponding scripts if interested in, and for now, those are Ivek and me, but be sure to check if it's there anyway.

From this point on, everything is automated and headless.[/quote]
#55
PVD Python Scripts / Re: Python scripts documentati...
Last post by Ivek23 - 7 24 May, 2026, 07:38:21 AM
Python Selenium script

Python Selenium script, which is used together with IMDB_[EN][HTTPS]_TEST_Aka script is added here. Python Selenium script unzip and add it to the Scripts folder of the program.

Python Selenium script called selenium_aw_script.py exactly the same as selenium_script.py except that this script is very useful for imdb websites where there are many more buttons, like awards or other similar pages. It is also useful for the new IMDB_People_[EN][HTTPS]_TEST_2_full script, where it downloads all pages with information, where it is also necessary to open more more buttons.

Edit it according to the instructions for use are in the first post above.

Added several different Python Selenium scripts and archived "Internet Archive" Python scripts documentation and instructions page in pdf format.
#56
PVD Python Scripts / Python scripts documentation a...
Last post by Ivek23 - 7 24 May, 2026, 07:17:49 AM
Documentation and instructions for using Python scripts

The script is intended to automate access to IMDb websites, where it:

  • Clicks on the "Select Your Preferences" pop-up window so that the page can continue loading.
  • Clicks on all "More" buttons to expand all hidden information on the page.
  • Saves the entire source code (HTML) of the page to a file for further processing.

Requirements

  • Python: Python 3.x installed on your computer.
  • Selenium: Browser automation library.
  • Geckodriver: Driver for using Firefox browser with Selenium(or other driver for other browser, if available).
  • Firefox browser: Firefox browser installed(or other browser).

Environmental preparation


    Installing libraries: Install the Selenium library using the command:

    pip install selenium

    Downloading Geckodriver (or other driver for other browser, if available):
    Download geckodriver from the official site: Geckodriver Releases.
    Unzip the file and save the path to the geckodriver.exe program.

    Adjusting the path in the script:
        Set the correct paths in the script:
            gecko_path: Path to the geckodriver.exe file.
            pvd_path: Path to your PVD folder.
            log_path: Path to the log file.


How to use the script


    Calling the script from the command line:
        You run the script with the following command:

    python script_name.py (for example "selenium_aka_script.py")

    Replace "https://www.imdb.com/title/tt1234567/" with the actual URL of the IMDb page (or the script will use the URL from the database if the URL already exists there).


Script functionalities:

    When loading the page, it first checks if the "Select Your Preferences" window appears, and closes it by clicking the "Accept" button.

    Clicks all visible "More" buttons to expand additional information (e.g., a list of actors or similar movies).

    After clicking all buttons, it saves the entire page to the file downpage-UTF8_NO_BOM.htm, which is located in the Scripts/Tmp folder.


Results:

   The entire page is saved as an HTML file in the folder:

C:\Program Files (x86)\Personal Video Database/Scripts/Tmp/  (or wherever your PVD folder with the installed program is)

The log file that records all events is located in:

        C:\Program Files (x86)\Personal Video Database/Scripts/python_script.log  (or wherever your PVD folder with the installed program is)


A more detailed explanation of the functionality

    Closing the pop-up window:
        The script waits up to 10 seconds for the "Select Your Preferences" window to appear.
        It looks for the "Accept" button and clicks it.
        If the window is not displayed, it continues without error.

    Clicking "More" buttons:
        The script continuously searches for "More" buttons on the page.
        When it finds them, it clicks them one by one and waits for additional content to load.
        This process is repeated until all "More" buttons have been clicked.

    Saving the page:
        Saves the entire page to a file in UTF-8 format after clicking all buttons.

    Logging:
        The log file records all important events, such as a successful button click, any errors, or the unavailability of a pop-up window.


Common Problems and Solutions

   Geckodriver not found:
        Check if the gecko_path is set correctly.
Make sure geckodriver.exe is compatible with your version of Firefox.

    Pop-up window does not close:
        Check if the "Accept" button attributes have been changed on the IMDb page.
        Update the XPath for the button if there have been any changes.

    Log file not created:
        Check the write permissions on the Scripts folder.


Example of a log file

Quote2024-12-19 12:00:00 - INFO - Starting the Python script.
2024-12-19 12:00:01 - INFO - Using IMDb URL: https://www.imdb.com/title/tt1234567/
2024-12-19 12:00:05 - INFO - Page https://www.imdb.com/title/tt1234567/ loaded successfully.
2024-12-19 12:00:06 - INFO - 'Select Your Preferences' popup detected.
2024-12-19 12:00:07 - INFO - Clicked on the 'Accept' button to close the popup.
2024-12-19 12:00:10 - INFO - Clicked a 'More' button.
2024-12-19 12:00:12 - INFO - HTML saved to file: D:/MyPVD/PVD_0.9.9.21_MOD-Simple AllMovies/Scripts/Tmp/downpage-UTF8_NO_BOM.htm
2024-12-19 12:00:15 - INFO - Browser closed.
#57
PVD Users / PVD Users
Last post by Ivek23 - 3 18 May, 2026, 03:15:49 PM
Notice to old registered users of Personal Video Database (videodb.info)

All old registered users of Personal Video Database (videodb.info) should register on this forum with the same username and password and a valid email address, so that the moderators know that you were really registered there before.

Others who try to register with some strange usernames will be treated as spam or fake users who write and send spam mail or messages. Also, everyone who has unusual email addresses will be treated the same, especially those who use mainly Russian and similar spam or temporary email extensions for their email addresses.

#58
Hilfe / Scripting manual
Last post by afrocuban - 11 17 May, 2026, 11:14:21 AM
This is my local backup of a scripting manual from the wayback machine. I am not sure how we could recreate a wiki on this forum...
#59
Brainstorm / Re: What makes PVD slow?
Last post by afrocuban01 - 1 16 May, 2026, 01:59:01 PM
I think PVD is essentially slow because it's a 32-bit app and it cannot work with more than 2GB of memory, so at the very end it will crash when the task needs more than that: for example if you want to change the way images are stored - in or out of PVD, no matter how small images are.

Also, it'll get painfully slow if the amount of characters to a field is huge. Try to import 50k characters into any "memo" field for any movie (and there are cases on IMDb that has huge amount of chars, synopsis page for example), and you'll know what I mean.

So, at some point nothing can help with the slowness, not even converting to some other DB...  :(
#60
Talk / Re: Hello
Last post by afrocuban01 - 1 16 May, 2026, 01:31:31 PM
Test if I can reply.