This should have an easy solution but I can't understand how to avoid it.
content1 = soup.find('div', class_='fusion-text fusion-text-6') content2 = soup.find('div', class_='fusion-text fusion-text-7') for para in content1: comp_name = para.find_all('a')['href'] print(comp_name)
The error comes because I have a list at
['href'] together with
comp_name = para.find('a')['href']
doesn't return an error and gives the right output (an URL), but just the first one. Since I want to scrape all of them inside my
content1 I wanted to use
find_all but inevitably I get the error.
How can I avoid this?