I have parsed a bs4 object from a website:
my_list2 = soup.find_all(‘span’, class_=‘player-detail’)
There is a possibility of 7 ‘player-detail’ items in each player. If there isn’t 7 then it throws off my_list2 and I can possibly get an out of range. Is there a way to only read in the first 5 player-items to the bs4 object?