title: Returning body text using BeautifulSoup
body: <p>I'm trying to use BeautifulSoup to scrape HTML tags off of something that was returned using ExchangeLib. What I have so far is this:</p>
  
  <pre><code>from exchangelib import Credentials, Account
  import urllib3
  from bs4 import BeautifulSoup
  
  credentials = Credentials('myemail@notreal.com', 'topSecret')
  account = Account('myemail@notreal.com', credentials=credentials, autodiscover=True)
  
  for item in account.inbox.all().order_by('-datetime_received')[:1]:
      soup = BeautifulSoup(item.unique_body, 'html.parser')
      print(soup)
  </code></pre>
  
  <p>As is, this will use exchangeLib to grab the first email from my inbox via Exchange, and print specifically the <code>unique_body</code> which contains the body text of the email. Here is a sample of the output from <code>print(soup)</code>:</p>
  
  <pre><code>&lt;html&gt;&lt;body&gt;&lt;div&gt;
  &lt;div&gt;&lt;span lang="en-US"&gt;
  &lt;div style="margin:0;"&gt;&lt;font face="Calibri,sans-serif" size="2"&gt;&lt;span style="font-size:11pt;"&gt;Hey John,&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;
  &lt;div style="margin:0;"&gt;&lt;font face="Calibri,sans-serif" size="2"&gt;&lt;span style="font-size:11pt;"&gt; &lt;/span&gt;&lt;/font&gt;&lt;/div&gt;
  &lt;div style="margin:0;"&gt;&lt;font face="Calibri,sans-serif" size="2"&gt;&lt;span style="font-size:11pt;"&gt;Here is a test email&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;
  &lt;/span&gt;&lt;/div&gt;
  &lt;/div&gt;
  &lt;/body&gt;&lt;/html&gt;
  </code></pre>
  
  <p>My end goal is to have it print:</p>
  
  <pre><code>Hey John,
  Here is a test email
  </code></pre>
  
  <p>From what I'm reading on BeautifulSoup documentation, the process of scraping falls between my "<code>Soup ="</code> line and the final <code>print</code> line.</p>
  
  <p>My issue is that in order to run the scraping portion of BeautifulSoup, it requires a class and h1 tags such as: <code>name_box = soup.find(‘h1’, attrs={‘class’: ‘name’})</code>, however from what I currently have, I have none of this.</p>
  
  <p>As someone who is new to Python, how should I go about doing this?</p>