Can only find by id, not by class, with BeautidulSoup4 (Python3.x) Can only find by id, not by class, with BeautidulSoup4 (Python3.x) selenium selenium

Can only find by id, not by class, with BeautidulSoup4 (Python3.x)


Below are the commands i run and it works great for me

In [1]: from bs4 import BeautifulSoupIn [2]: import requestsIn [3]: res = requests.get("http://www.spotrac.com/mlb/atlanta-braves/freddie-freeman-7359/")In [4]: soup = BeautifulSoup(res.text,"lxml")In [5]: len(soup.findAll('div', {'class': 'main-container'}))Out[5]: 1In [6]:  soup = BeautifulSoup(res.text,"html5lib")In [7]: len(soup.findAll('div', {'class': 'main-container'}))Out[7]: 1In [8]: import sys; sys.versionOut[8]: '3.6.2 (default, Jul 17 2017, 16:44:45) \n[GCC 4.2.1 Compatible Apple LLVM 8.1.0 (clang-802.0.42)]'

As you can see it works for me in both parsers.