I am very new to web scraping. I read about BeautifulSoup and tried to use it. But I am not able to extract text with given class name "company-desc-and-sort-container". I am not even able to extract the title from html page. This is the code which I tried:
from BeautifulSoup import BeautifulSoup
import requests
url= 'http://fortune.com/best-companies/'
r = requests.get(url)
soup = BeautifulSoup(r.text)
#print soup.prettify()[0:1000]
print soup.find_all("title")
letters = soup.find_all("div", class_="company-desc-and-sort-container")
I am getting the following error:
print soup.find_all("title")
TypeError: 'NoneType' object is not callable