Here is my html source code
<h1 class="companyName__9bd88132">Chipotle Mexican Grill Inc</h1>
<div class="description__ce057c5c">Chipotle Mexican Grill, Inc. owns and operates quick serve Mexican restaurants. The Company manages restaurants throughout the United States.</div>
I want to get only the description: Chipotle Mexican Grill, Inc. owns and operates quick serve Mexican restaurants. The Company manages restaurants throughout the United States.
Input:
soup = BeautifulSoup(source_code, "html.parser")
print(soup.find("div", {"class" : "description"})
Output: script hangs
Input:
soup = BeautifulSoup(source_code, "html.parser")
for n in soup.find_all("div", {"class" : "description"}):
print(n)
Output: Script hangs
Input:
soup = BeautifulSoup(source_code, "html.parser")
for n in soup.find_all("div", {"class" : "description"}):
print(n)
Output: None
What am I doing wrong?