look at my code:
import requests
import pandas as pd
import re
from datetime import date, datetime
from bs4 import BeautifulSoup
import numpy as np
import os
import pytz
#ZZZZZZ
URL = (
    "https://eur-lex.europa.eu/legal-content/es/TXT/HTML/?uri=CELEX:32019D1341&from=en"
)
PEOPLE_FILE = "./list_eu/data/list_eu_people_"
ENTITIES_FILE = "./list_eu/data/list_eu_entities_"
DATA_PATH = "./list_eu/data/"

class Utilities:
    def __init__(self):
        pass

    def name_validation(self, x):
        if len(x) == 2:
            return x[1].lower().strip()
        elif len(x) == 3:
            if (x[1][0].isupper() & ~x[1][-1].isupper()) & (
                x[2][0].isupper() & ~x[2][-1].isupper()
            ):
                return x[1].lower() + " " + x[2].lower()
            else:
                return x[2].lower()

    def lastname_validation(self, x):
        if len(x) == 3:
            if (x[0][0].isupper() & x[0][-1].isupper()) & (
                x[1][0].isupper() & x[1][-1].isupper()
            ):
                return x[0].lower() + " " + x[1].lower().strip()
            else:
                return x[0].lower()
        else:
            return x[0].lower()

    def separate_names_lastnames(self, df):
        nombres = df["nombre"].tolist()
        nombres = list(map(lambda x: x.split(","), nombres))
        indice = 0
        for i in nombres:
            if len(i) < 2:
                nombres[indice] = i[0].split(" ")
            indice += 1

        df["apellido"] = list(map(self.lastname_validation, nombres))
        df["nombre_"] = list(map(self.name_validation, nombres))
        df.drop(columns=["nombre"], inplace=True)
        df.rename(columns={"nombre_": "nombre"}, inplace=True)
        df.loc[df["pasaporte"] == "", "pasaporte"] = np.NaN
        df.loc[df["identificacion"] == "", "identificacion"] = np.NaN
        return df

    def read_page(self, soup):
        tabla = soup.find(id="L_2019209ES.01001701")
        personas = []
        entidades = []

        current_section = 'personas'
        for element in tabla.find_all(['p', 'table']):
            if 'II.' in element.text:
                current_section = 'entidades'
                continue

            if element.name == 'table':
                for row in element.find_all('tr'):
                    content = row.find_all('td')[2].text.strip()
                    if current_section == 'personas':
                        personas.append(content)
                    else:
                        entidades.append(content)

        return personas, entidades


    def fill_people_data(self, personas):
        df = pd.DataFrame(personas, columns=['content'])
        df['nombre'] = ''
        df['apellido'] = ''
        df['pasaporte'] = ''
        df['identificacion'] = ''  # Optional for future identification handling

        for index, row in df.iterrows():
            content = row['content']
            
            # Step 1: Extract the full content of the <span>, remove alias part (in parentheses)
            name_passport_part = re.sub(r'\(.*?\)', '', content).strip()

            # Step 2: Use regex to extract surname (first uppercase word) and first name (second word)
            name_match = re.match(r'([A-ZÁÉÍÓÚÜ]+)\s+([A-Z][a-záéíóúü]+)', name_passport_part)
            if name_match:
                df.at[index, 'apellido'] = name_match.group(1).lower()  # First uppercase word as surname
                df.at[index, 'nombre'] = name_match.group(2).lower()    # Second word as first name

            # Step 3: Extract passport number (if present)
            passport_match = re.search(r'Pasaporte:\s*([A-Z0-9]+)', content)
            if passport_match:
                df.at[index, 'pasaporte'] = f"[{passport_match.group(1)}]"

        # Step 4: Add timestamp for data processing time
        df['hora_consulta'] = datetime.now(pytz.timezone("America/Bogota")).strftime(
            "%Y%m%d %H %M %p"
        )

        return df



    def clean_people_data(self, df):
        df["nombre"] = df["nombre"].str.replace(r"\(", "")
        df["nombre"] = df["nombre"].str.strip()
        df["nombre"] = df["nombre"].str.replace(r",$", "")
        df["nombre"] = df["nombre"].str.replace("-", " ")
        df.drop(columns=["content"], inplace=True)
        df.rename(
            columns={"pasaporte": "pasaporte", "identificacion": "identificacion", "nombre": "nombre"},
            inplace=True,
        )
        df["hora_consulta"] = datetime.now(pytz.timezone("America/Bogota")).strftime(
            "%Y%m%d %H %M %p"
        )
        return df

    def fill_entities_data(self, entidades):
        entidades = list(
            map(
                lambda x: self.normalize(x)
                .replace("-", " ")
                .replace(" – ", " ")
                .replace("\xa0", " ")
                .replace(".", "")
                .replace("/", " "),
                entidades,
            )
        )

        df = pd.DataFrame(entidades)
        df["col1"] = ""

        entidad = re.compile(r'«(.+?)»')
        for index, row in df.iterrows():
            match = entidad.search(row[0].lower())
            if match:
                row["col1"] = match.group(1)

        entidad = re.compile(r'\d+\.\s*(.+)')
        for index, row in df.iterrows():
            if row["col1"] == "":
                match = entidad.search(row[0].lower())
                if match:
                    row["col1"] = match.group(1)

        df.drop(columns=[0], inplace=True)
        df.rename(columns={"col1": "nombre"}, inplace=True)
        df["hora_consulta"] = datetime.now(pytz.timezone("America/Bogota")).strftime(
            "%Y%m%d %H %M %p"
        )
        return df

    def normalize(self, s):
        replacements = (
            ("á", "a"),
            ("é", "e"),
            ("í", "i"),
            ("ó", "o"),
            ("ú", "u"),
            ("ü", "u"),
        )
        for a, b in replacements:
            s = s.replace(a, b).replace(a.upper(), b.upper())
        return s

    def remove_punctuation(self, text):
        return re.sub("[%s]" % re.escape(string.punctuation), "", text)

    def get_data_eu_list(self):
        req = requests.get(URL)
        soup = BeautifulSoup(req.content, "html.parser")
        
        personas, entidades = self.read_page(soup)
        print('Sitio de terroristas de la Unión Europea leído correctamente')

        df_personas = self.fill_people_data(personas)
        df_personas = self.clean_people_data(df_personas)
        df_personas = self.separate_names_lastnames(df_personas)

        df_entidades = self.fill_entities_data(entidades)

        df_personas = df_personas[['pasaporte', 'identificacion', 'hora_consulta', 'apellido', 'nombre']]
        
        return df_personas.to_csv(
            PEOPLE_FILE + date.today().strftime("%d%m%Y") + ".csv",
            sep=";",
            index=False,
        ), df_entidades.to_csv(
            ENTITIES_FILE
            + date.today().strftime("%d%m%Y")
            + ".csv",
            sep=";",
            index=False,
        )

    def read_data(self):
        data_files = os.listdir(DATA_PATH)
        files_people = []
        files_entities = []
        for i in data_files:
            if "list_eu_people" in i:
                files_people.append(datetime.strptime(i[15:-4], "%d%m%Y").date())
            elif "list_eu_entities" in i:
                files_entities.append(datetime.strptime(i[17:-4], "%d%m%Y").date())

        return pd.read_csv(
            PEOPLE_FILE
            + max(files_people).strftime("%d%m%Y")
            + ".csv",
            sep=";",
        ), pd.read_csv(
            ENTITIES_FILE
            + max(files_entities).strftime("%d%m%Y")
            + ".csv",
            sep=";",
        )

if __name__ == "__main__":
    utl = Utilities()
    utl.get_data_eu_list()