Through some searching I was able to figure out that what I was trying to scrape was inside of an iframe. Which was the main reason I always recieved None back as my results. I was able to start pulling in some data like the headers but when it comes to the data within the table i can only get the first result which is the number 1. Here is the code:
from bs4 import BeautifulSoup
from selenium import webdriver
from selenium.common.exceptions import NoSuchElementException
from selenium.webdriver.common.keys import Keys
driver = webdriver.Firefox()
driver.get('http://www.nhl.com/stats/player?aggregate=1&reportType=game&dateFrom=2017-10-20&dateTo=2017-10-31&filter=gamesPlayed,gte,1&sort=shots')
html = driver.page_source
driver.quit()
soup = BeautifulSoup(html,"html.parser")
stat_cat = soup.find('div',attrs={'class':'rt-tr'})
header = stat_cat.text.strip()
stats = soup.find('div',attrs={'class':'rt-td'})
player_stats = stats.text.strip()
print(header,player_stats)
What I am trying to figure out is how to get the Player and his stats scraped from the second soup.find but it only returns the first rt-td result. Once I have all of the data I would then like to not just print it but to save it to a csv. Thanks for taking a look!