title: How to parse yahoo finance stock price using beautifulsoup?
body: <p>For the learning purpose, I tried to extract the current stock price of AAPL using yahoo finance.
  However, I am getting empty outputs.</p>
  <p><strong>How to extract the stock value?</strong></p>
  <p>Required value: 134.69 (as shown in image below) (note this value changes with time, but this is just an example)</p>
  <h1>MWE</h1>
  <pre class="lang-py prettyprint-override"><code>import numpy as np
  import pandas as pd
  import json
  import requests
  
  from bs4 import BeautifulSoup
  
  
  ticker = 'aapl'
  url = f&quot;https://finance.yahoo.com/quote/{ticker.upper()}&quot;
  
  response = requests.get(url)
  soup = BeautifulSoup(response.text, 'html.parser')
  
  soup.find_all(&quot;div&quot;, class_=&quot;Trsdu(0.3s) Fw(b) Fz(36px) Mb(-4px) D(ib)&quot;)
  </code></pre>
  <h1>Inspect</h1>
  <p><a href="https://i.stack.imgur.com/S5biI.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/S5biI.png" alt="enter image description here" /></a></p>