I'm relatively new to python and have only done projects doing dataframe analysis. I am trying to learn web scraping to complete a personal proejct.
I'm practicing this basics and this is my current code:
import pandas as pd
from bs4 import BeautifulSoup
from selenium import webdriver
import requests
html_text = requests.get('https://www.pff.com/news/nfl-quarterback-rankings-all-32-starters-ahead-of-the-2021-nfl-season').text
soup = BeautifulSoup(html_text,'lxml')
players = soup.find('div',class_ = 'm-longform-copy')
for player in players:
name = players.h3.a.text
print(name)
When I run this, it just prints "Patrick Mahomes" repeatedly instead of going onto the next entry. I looked up a few other similar questions like this on here, but don't know the syntax well enough to apply it to my issue. Any help would be great!