In a dataframe prior to this, I have hundreds of urls that I am iterating to get the same information out of all of them.
Right now, I'm trying to scrape this div class grid so that I can get the row name on one side and the result on the other. Then, it would be to convert it into a dataframe.
I've tried to do it by positions but I can't because the row names change between elements and they are not always the same.
I've tried something like this but it doesn't get me anywhere. It's the wrong approach
principalTable = soup.find_all('div', attrs = {'class': 'info-table info-table--right-space'})
areas = soup.find_all('span', attrs={'class': 'info-table__content info-table__content--regular'})
for i in areas:
listPrueba.append(i.text.strip())
results = soup.find_all('span', attrs={'class': 'info-table__content info-table__content--bold'})
for i in results:
listPrueba2.append(i.text.strip())
The web is this for example: "https://www.transfermarkt.com/ederson/profil/spieler/238223"
And the HTML code is the following: