I want to scarp the table from this webpage to pandas table: https://www.perfectgame.org/College/CollegePlayerReports.aspx
I've used both requests and request-HTML but both don't seem to be effective,
from requests_html import HTMLSession
from requests import *
from bs4 import BeautifulSoup
import pandas as pd
def get_stats( name, year ) :
with HTMLSession() as s :
source = 'https://www.perfectgame.org/College/CollegePlayerReports.aspx'
response = s.get( source )
table = response.html.find('table.Grid', first=True)
df = pd.read_html( table.html, header = 0 ) [ 0 ]
print( df )
any solutions?