Video Bot Program

Video Bot Program

This program automates the process of playing YouTube videos on a specific website using Selenium and Python. It iterates through the tasks, clicks the required buttons, and handles iframes to play the video. If a specific CAPTCHA verification element is detected, the program will stop.

Features

  • Automates interaction with web pages using Selenium WebDriver.
  • Uses Chrome browser with a user-specified profile to maintain session state.
  • Handles iframes to interact with embedded YouTube videos.
  • Logs activities and errors in a user-friendly interface.
  • Runs in a separate thread to keep the GUI responsive.

How It Works

  1. The user starts the program by clicking the "Start Bot" button in the GUI.
  2. The program opens Google Chrome and navigates to the specified URL.
  3. It waits for the required elements to load and interacts with them (e.g., clicking the "Run" button).
  4. It switches to a new tab and handles iframes to click the play button on the YouTube video.
  5. The program waits for a specified time to allow the video to play.
  6. After the video completes, the tab is closed and the program switches back to the main tab.
  7. If an error occurs or a specific CAPTCHA verification element is detected, the program stops and logs the error.
  8. Use the profile located at "C:/Users/ASUS/AppData/Local/Google/Chrome/User Data" i this this root because i use "ASUS" and select your default profile, which is usually named "Default" (the first Google account you use).
  9. you must install selenium and web mananger the commande use:
  10. pip install selenium
  11. pip install webdriver-manager

Instructions for Use

  1. Ensure you have Python and the required packages installed (Selenium, WebDriverManager, Tkinter).
  2. Download the source code from the provided link and extract it to your desired location.
  3. Update the Chrome profile path in the source code to match your local Chrome user profile path. For example, change C:/Users/ASUS/AppData/Local/Google/Chrome/User Data to your path.
  4. Run the program by executing the Python script.
  5. In the GUI, click the "Start Bot" button to begin the automated task.
  6. Monitor the log output in the GUI to see the progress and any errors that occur.

Note:

Make sure to update the file path in the source code to point to your local Chrome profile directory. This ensures the program uses your browser's session data and cookies.