I'm trying get the names of the stocks that are hyperlinked in a website. For reproducibility:
import requests
from bs4 import BeautifulSoup
URL = 'https://seekingalpha.com/news/3592559-nvax-nbl-among-premarket-gainers'
page = requests.get(URL)
soup = BeautifulSoup(page.content, 'html.parser')
results = soup.find(id='bullets_ul')
stock_elems = results.find_all('span', class_='ticker-hover-wrapper')
I'm trying to get the names underlined in a list.
I've tried some variations of the following code without success:
for stock_elem in stock_elems:
stock_name = stock_elem.find('href', class_='*')
print(symbol_name.text.strip())
Any help would be greatly appreciated.

a, nothref.symbol_name. You must have meantstock_name.