title: Python Beautiful soup: Target a particular element
body: <p>I am trying to scrape a particular part of a website(<a href="https://flightmath.com/from-CDG-to-BLR" rel="nofollow noreferrer">https://flightmath.com/from-CDG-to-BLR</a>) but I am unable to target the element that I need. </p>
  
  <h2>Below is the part of the html</h2>
  
  <p><code>&lt;h2 style="background-color:#7DC2F8;padding:10px"&gt;&lt;i class="fa fa-plane"&gt;&lt;/i&gt;
  &amp;nbsp;flight distance = &lt;strong&gt;4,866&lt;/strong&gt; miles&lt;/h2&gt;</code></p>
  
  <h2>This is my code</h2>
  
  <pre><code>dist = soup.find('h2', attrs={'class': 'fa fa-plane'}) 
  </code></pre>
  
  <p>I just want to target the "4,866" part.</p>
  
  <p>I would be really grateful if someone can guide me on this.
  Thanks in advance.</p>