I have a Python script using Selenium for web scraping company information from a website. The script was working properly yesterday, but today it's not returning any results even though I haven't made any changes to the code.
When the script performs a search, the webpage displays "No matches" or no results. However, if I manually perform the same search on the website, there are visible results.
I'm unsure what I'm doing wrong or why the script is no longer working as expected. Any insights or suggestions would be greatly appreciated.
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
import time
import pandas as pd
from webdriver_manager.chrome import ChromeDriverManager
import re
url = "https://ruesfront.rues.org.co/"
nom_empresa = "LINEAS ESCOLARES Y TURISMO S.A.S"
def extrae_nit(nom_empresa, url):
options = webdriver.FirefoxOptions()
driver = webdriver.Firefox(options=options)
driver.get(url)
driver.find_element(By.ID, "search") \
.send_keys(nom_empresa)
driver.implicitly_wait(10)
driver.find_element(By.CLASS_NAME,
"d-none d-sm-block btn btn-primary input-group-append btn-busqueda busqueda__button--xs".replace(
" ", ".")) \
.click()
driver.implicitly_wait(30)
text = driver.find_element(By.CLASS_NAME, "row card-result p-4 bg-featured".replace(" ", ".")) \
.text
print(text)
driver.quit()
result = text.split('\n')
id_index = result.index("Identificación")
nit = result[id_index + 1]
return nit
print(extrae_nit(nom_empresa,url))

