|
2 | 2 | "cells": [ |
3 | 3 | { |
4 | 4 | "cell_type": "code", |
5 | | - "execution_count": 3, |
| 5 | + "execution_count": 1, |
6 | 6 | "id": "5aa9f8ee", |
7 | 7 | "metadata": {}, |
8 | 8 | "outputs": [], |
|
15 | 15 | }, |
16 | 16 | { |
17 | 17 | "cell_type": "code", |
18 | | - "execution_count": 4, |
19 | | - "id": "97507541", |
| 18 | + "execution_count": 3, |
| 19 | + "id": "9f7eb9ed", |
20 | 20 | "metadata": {}, |
21 | 21 | "outputs": [], |
22 | 22 | "source": [ |
| 23 | + "# Set up Selenium\n", |
23 | 24 | "driver = webdriver.Chrome()\n", |
24 | | - "# driver = webdriver.Firefox()\n", |
| 25 | + "driver.maximize_window()\n", |
| 26 | + "driver.maximize_window()\n", |
| 27 | + "\n", |
| 28 | + "# Navigate to the Bumeran website\n", |
25 | 29 | "url = \"https://www.bumeran.com.pe/empleos.html\"\n", |
26 | | - "driver.get(url)\n" |
27 | | - ] |
28 | | - }, |
29 | | - { |
30 | | - "cell_type": "code", |
31 | | - "execution_count": 5, |
32 | | - "id": "9f7eb9ed", |
33 | | - "metadata": {}, |
34 | | - "outputs": [], |
35 | | - "source": [ |
36 | | - "driver.maximize_window()" |
| 30 | + "driver.get(url)" |
37 | 31 | ] |
38 | 32 | }, |
39 | 33 | { |
40 | 34 | "cell_type": "code", |
41 | 35 | "execution_count": 8, |
42 | | - "id": "19083ed4", |
| 36 | + "id": "f80eca5e", |
43 | 37 | "metadata": {}, |
44 | 38 | "outputs": [], |
45 | 39 | "source": [ |
46 | 40 | "from selenium import webdriver\n", |
47 | | - "from selenium.webdriver.chrome.service import Service\n", |
48 | | - "from selenium import webdriver\n", |
49 | | - "from selenium.webdriver.chrome.service import Service\n", |
50 | 41 | "from selenium.webdriver.common.by import By\n", |
51 | | - "from selenium.webdriver.support.ui import WebDriverWait\n", |
52 | | - "from selenium.webdriver.support import expected_conditions as EC" |
| 42 | + "from selenium.webdriver.common.action_chains import ActionChains\n", |
| 43 | + "from selenium.webdriver.common.keys import Keys\n", |
| 44 | + "import time\n", |
| 45 | + "\n", |
| 46 | + "# Configurar el navegador (usar Chrome en este caso)\n", |
| 47 | + "driver = webdriver.Chrome()\n", |
| 48 | + "\n", |
| 49 | + "# Ir a la página web donde están los botones\n", |
| 50 | + "driver.get(url) # Reemplaza con la URL real\n", |
| 51 | + "\n", |
| 52 | + "# Esperar a que la página cargue completamente\n", |
| 53 | + "time.sleep(3) \n", |
| 54 | + "\n", |
| 55 | + "# Hacer clic en \"Fecha de publicación\"\n", |
| 56 | + "fecha_pub_button = driver.find_element(By.XPATH, \"//button[contains(text(), 'Fecha de publicación')]\")\n", |
| 57 | + "fecha_pub_button.click()\n", |
| 58 | + "time.sleep(2)\n", |
| 59 | + "\n", |
| 60 | + "# Hacer clic en \"Menor a 15 días\"\n", |
| 61 | + "menor_15_button = driver.find_element(By.XPATH, \"//button[contains(text(), 'Menor a 15 días')]\")\n", |
| 62 | + "menor_15_button.click()\n", |
| 63 | + "time.sleep(2)\n", |
| 64 | + "\n", |
| 65 | + "# Hacer clic en \"Área\"\n", |
| 66 | + "area_button = driver.find_element(By.XPATH, \"//button[contains(text(), 'Área')]\")\n", |
| 67 | + "area_button.click()\n", |
| 68 | + "time.sleep(2)\n", |
| 69 | + "\n", |
| 70 | + "# Hacer clic en \"Tecnología, Sistemas y Telecomunicaciones\"\n", |
| 71 | + "tecnologia_button = driver.find_element(By.XPATH, \"//button[contains(text(), 'Tecnología, Sistemas y Telecomunicaciones')]\")\n", |
| 72 | + "tecnologia_button.click()\n", |
| 73 | + "time.sleep(2)\n", |
| 74 | + "\n", |
| 75 | + "# Hacer clic en \"Subárea\"\n", |
| 76 | + "subarea_button = driver.find_element(By.XPATH, \"//button[contains(text(), 'Subárea')]\")\n", |
| 77 | + "subarea_button.click()\n", |
| 78 | + "time.sleep(2)\n", |
| 79 | + "\n", |
| 80 | + "# Hacer clic en \"Programación\"\n", |
| 81 | + "programacion_button = driver.find_element(By.XPATH, \"//button[contains(text(), 'Programación')]\")\n", |
| 82 | + "programacion_button.click()\n", |
| 83 | + "time.sleep(2)\n", |
| 84 | + "\n", |
| 85 | + "# Hacer clic en \"Departamento\"\n", |
| 86 | + "departamento_button = driver.find_element(By.XPATH, \"//button[contains(text(), 'Departamento')]\")\n", |
| 87 | + "departamento_button.click()\n", |
| 88 | + "time.sleep(2)\n", |
| 89 | + "\n", |
| 90 | + "# Hacer clic en \"Lima\"\n", |
| 91 | + "lima_button = driver.find_element(By.XPATH, \"//button[contains(text(), 'Lima')]\")\n", |
| 92 | + "lima_button.click()\n", |
| 93 | + "time.sleep(2)\n", |
| 94 | + "\n", |
| 95 | + "# Hacer clic en \"Carga horaria\"\n", |
| 96 | + "carga_horaria_button = driver.find_element(By.XPATH, \"//button[contains(text(), 'Carga horaria')]\")\n", |
| 97 | + "carga_horaria_button.click()\n", |
| 98 | + "time.sleep(2)\n", |
| 99 | + "\n", |
| 100 | + "# Hacer clic en \"Full-time\"\n", |
| 101 | + "fulltime_button = driver.find_element(By.XPATH, \"//button[contains(text(), 'Full-time')]\")\n", |
| 102 | + "fulltime_button.click()\n", |
| 103 | + "time.sleep(5)\n", |
| 104 | + "\n" |
53 | 105 | ] |
54 | 106 | } |
55 | 107 | ], |
|
0 commit comments