I am trying to scrape the site https://www.pro-football-reference.com/years/2021/rushing.htm#, and I am trying to sort by the column Y/A.
Code
from urllib.request import urlopen
from bs4 import BeautifulSoup
url = f'https://www.pro-football-reference.com/years/2021/rushing.htm'
html = urlopen(url)
stats_page = BeautifulSoup(html, features="lxml")
rows = [[i.getText() for i in row.findAll('td')] for row in stats_page.findAll('tr')[1:]]
for row in rows:
if len(row) == 0: rows.remove(row)
rows.sort(key=lambda x: float(x[11]), reverse=True)
Output
[['C.J. Moore', 'DET', '26', '', '8', '0', '1', '28', '0', '1', '28', '28.0', '3.5', '0'], ['Diontae Johnson', 'PIT', '25', 'wr', '6', '6', '1', '25', '0', '1', '25', '25.0', '4.2', '0'], ['Marcus Mariota', 'LVR', '28', '', '2', '0', '2', '35', '0', '1', '31', '17.5', '17.5', '0']...
Problem
While this does technically return what I asked for, I wanted something different. I realized that when I go to the website I see this toggle: 
There is a toggle that says "When table is sorted, hide non-qualifiers". When that is toggled, the output should look something more like [[Lamar Jackson, BAL, 24, qb, 7, 7, 76, 480, 2, 29, 31, 6.3, 68.6, 5], [Jalen Hurts, PHI, 23, qb 8, 8, 73, 432, 5, 29, 27, 5.9, 54.0, 5]...]. But when it's not toggled, it looks like the output I posted above.
However, when you scrape the website it defaults to off. Is there a way to toggle this to be on?
