update readme

This commit is contained in:
Emi
2025-07-07 17:42:41 -03:00
parent 8972dc6aa0
commit 62d39224ca

184
README.md
View File

@@ -2,17 +2,93 @@
This script automates the process of deleting videos from your YouTube "Watch Later" playlist using PyAutoGUI. This script automates the process of deleting videos from your YouTube "Watch Later" playlist using PyAutoGUI.
## Instructions (English) 🇬🇧 ---
### 🖼️ Browser Image ## Requirements 📦
Replace the browser icon image in the `img` folder with a screenshot of your browser's icon. Make sure the filename matches the value of the `browser_img` variable in `script.py` (e.g., `brave.png` for Brave browser).
### ⏱️ Adjust Timing - Python **3.11.10** 🐍
The script uses `sleep` and `duration` values to wait for your PC to respond. You may need to increase or decrease these values depending on your computer's speed and internet connection.
### ▶️ Run the Script ---
For the script to work, it is essential that you have your browser pinned to your taskbar, otherwise you will not be able to find the icon.
Execute the script and follow the on-screen instructions. Press `q` at any time to stop the script. ## Setup & Usage (English) 🇬🇧
### ⚙️ Requirements
- Python **3.11.10** 🐍
### 1⃣ Create a Virtual Environment
**With `venv`:**
```bash
python3.11 -m venv venv
```
**With `virtualenv`:**
```bash
python3.11 -m pip install virtualenv
python3.11 -m virtualenv venv
```
### 2⃣ Activate the Virtual Environment
**On Linux/macOS:**
```bash
source venv/bin/activate
```
**On Windows:**
```bash
venv\Scripts\activate
```
### 3⃣ Install Dependencies
```bash
pip install -r requirements.txt
```
### 4⃣ Run the Script 🚀
```bash
python script.py
```
---
## Features & Customization 🛠️
### Features
- 🖼️ **Image Recognition:**
Uses screenshots in the `img` folder to locate and interact with UI elements (browser icon, YouTube buttons, etc).
- 🔍 **Region-based Search:**
The script splits the screen into left and right halves to speed up image searches.
- 🗂️ **Automatic Tab Handling:**
Automatically opens/closes tabs and navigates to your "Watch Later" playlist.
- ⏱️ **Timing Controls:**
You can adjust `sleep` and `duration` values in the code to match your PC's speed.
- 🛑 **Hotkey Listener:**
Press `q` at any time to safely stop the script.
- 🖱️ **Easy Customization:**
Change the images in the `img` folder or tweak the logic in functions like `locate_img` and `change_to_not_available` to adapt to UI changes or other platforms.
### Customization
- 🖼️ **Browser Image:**
Replace the browser icon image in the `img` folder with a screenshot of your browser's icon. Make sure the filename matches the value of the `browser_img` variable in `script.py` (e.g., `brave.png` for Brave browser).
- 🔗 **Playlist URL:**
You can change the playlist URL by editing the value of the `playlist_url` variable at the top of the `script.py` file.
- ⏱️ **Adjust Timing:**
The script uses `sleep` and `duration` values to wait for your PC to respond. You may need to increase or decrease these values depending on your computer's speed and internet connection.
- 📌 **Pin Your Browser:**
For the script to work, your browser must be pinned to your taskbar.
--- ---
@@ -20,14 +96,90 @@ Execute the script and follow the on-screen instructions. Press `q` at any time
Este script automatiza el proceso de eliminar videos de tu lista de "Ver más tarde" en YouTube usando PyAutoGUI. Este script automatiza el proceso de eliminar videos de tu lista de "Ver más tarde" en YouTube usando PyAutoGUI.
## Instrucciones (Español) 🇪🇸 ---
### 🖼️ Imagen del Navegador ## Requisitos 📦
Reemplaza la imagen del icono de tu navegador en la carpeta `img` con una captura de pantalla del icono de tu navegador. Asegúrate de que el nombre del archivo coincida con el valor de la variable `browser_img` en `script.py` (por ejemplo, `brave.png` para el navegador Brave).
### ⏱️ Ajusta los Tiempos - Python **3.11.10** 🐍
El script utiliza valores de `sleep` y `duration` para esperar la respuesta de tu PC. Puede que necesites aumentar o disminuir estos valores dependiendo de la velocidad de tu computadora y conexión a internet.
### ▶️ Ejecuta el Script ---
para que el script funcione, es indispensable que tengas tu navegador anclado a tu barra de tareas, sino no podra encontrar el icono
Ejecuta el script y sigue las instrucciones en pantalla. Presiona `q` en cualquier momento si quieres detenerlo. ## Configuración y Uso (Español) 🇪🇸
### ⚙️ Requisitos
- Python **3.11.10** 🐍
### 1⃣ Crear un Entorno Virtual
**Con `venv`:**
```bash
python3.11 -m venv venv
```
**Con `virtualenv`:**
```bash
python3.11 -m pip install virtualenv
python3.11 -m virtualenv venv
```
### 2⃣ Activar el Entorno Virtual
**En Linux/macOS:**
```bash
source venv/bin/activate
```
**En Windows:**
```bash
venv\Scripts\activate
```
### 3⃣ Instalar las Dependencias
```bash
pip install -r requirements.txt
```
### 4⃣ Ejecutar el Script 🚀
```bash
python script.py
```
---
## Funcionalidades y Personalización 🛠️
### Funcionalidades
- 🖼️ **Reconocimiento de Imágenes:**
Usa capturas en la carpeta `img` para localizar e interactuar con elementos de la interfaz (icono del navegador, botones de YouTube, etc).
- 🔍 **Búsqueda por Regiones:**
El script divide la pantalla en mitades izquierda y derecha para acelerar la búsqueda de imágenes.
- 🗂️ **Manejo Automático de Pestañas:**
Abre/cierra pestañas y navega automáticamente a tu lista de "Ver más tarde".
- ⏱️ **Control de Tiempos:**
Puedes ajustar los valores de `sleep` y `duration` en el código según la velocidad de tu PC.
- 🛑 **Escucha de Teclas:**
Presiona `q` en cualquier momento para detener el script de forma segura.
- 🖱️ **Fácil Personalización:**
Cambia las imágenes en la carpeta `img` o ajusta la lógica en funciones como `locate_img` y `change_to_not_available` para adaptarlo a cambios en la interfaz o a otras plataformas.
### Personalización
- 🖼️ **Imagen del Navegador:**
Reemplaza la imagen del icono de tu navegador en la carpeta `img` con una captura de pantalla del icono de tu navegador. Asegúrate de que el nombre del archivo coincida con el valor de la variable `browser_img` en `script.py` (por ejemplo, `brave.png` para el navegador Brave).
- 🔗 **URL de la Playlist:**
Puedes cambiar la URL de la playlist que se usa modificando el valor de la variable `playlist_url` al inicio del archivo `script.py`.
- ⏱️ **Ajusta los Tiempos:**
El script utiliza valores de `sleep` y `duration` para esperar la respuesta de tu PC. Puede que necesites aumentar o disminuir estos valores dependiendo de la velocidad de tu computadora y conexión a internet.
- 📌 **Ancla tu Navegador:**
Para que el script funcione, es indispensable que tengas tu navegador anclado a tu barra de tareas.