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
- The user starts the program by clicking the "Start Bot" button in the GUI.
- The program opens Google Chrome and navigates to the specified URL.
- It waits for the required elements to load and interacts with them (e.g., clicking the "Run" button).
- It switches to a new tab and handles iframes to click the play button on the YouTube video.
- The program waits for a specified time to allow the video to play.
- After the video completes, the tab is closed and the program switches back to the main tab.
- If an error occurs or a specific CAPTCHA verification element is detected, the program stops and logs the error.
- 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).
- you must install selenium and web mananger the commande use:
- pip install selenium
- pip install webdriver-manager
Instructions for Use
- Ensure you have Python and the required packages installed (Selenium, WebDriverManager, Tkinter).
- Download the source code from the provided link and extract it to your desired location.
- 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 Datato your path. - Run the program by executing the Python script.
- In the GUI, click the "Start Bot" button to begin the automated task.
- 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.
0 تعليقات