title: Data scraping of an aria-label with beautifulsoup
body: <p>From the following, i am trying to extract the analysts price targets.
  I am interested in the information present inside the aria-label.</p>
  <p>I tried multiple versions of <code>BeautifulSoup</code> I found online with the following setup:</p>
  <pre><code>import requests
  from bs4 import BeautifulSoup
  headers = {'User-Agent' : 'XXXXX'} &gt;&gt; XXXXX replaced with actual
  url = 'https://finance.yahoo.com/quote/AAPL/analysis?p=AAPL'
  r = requests.get(url, headers=headers)
  soup = BeautifulSoup(r.text, 'html.parser')
  </code></pre>
  <ol>
  <li><p>The aria-label seems to be between a <code>'div'</code> and a <code>'class'</code>, so I tried the following:</p>
  <pre><code>  target = soup.find('div', {'class':'Px(10px)'})
  </code></pre>
  </li>
  </ol>
  <p>Result = None</p>
  <ol start="2">
  <li><p>It is inside a section, so I tried the following:</p>
  <pre><code>  target = soup.find('section', attrs={'data-test':'price-targets'})
  </code></pre>
  </li>
  </ol>
  <p>Result = None</p>
  <ol start="3">
  <li><p>Then I tried to go even upper, using the ID:</p>
  <pre><code>  target = soup.find('div', {'id':'mrt-node-Col2-5-QuoteModule'}).find_all('div')[0]
  </code></pre>
  </li>
  </ol>
  <p>Result = <code>&lt; div data-react-checksum=&quot;2049647463&quot; data-reactid=&quot;1&quot; data-reactroot=&quot;&quot; id=&quot;Col2-5-QuoteModule-Proxy&quot;&gt;&lt; span data-reactid=&quot;2&quot;&gt;&lt; /span&gt;&lt; /div&gt;</code></p>
  <p>Thus, I am getting closer with option 3, but I receive an error when I modify the <code>find_all</code> div index</p>
  <p>Is there any solution or turnaround to extract the 4 data present in the aria-label?</p>
  <p>The numbers next to <code>'Low'</code>, <code>'Current'</code>, <code>'Average'</code> &amp; <code>'High'</code> are my target.</p>
  <p><a href="https://i.stack.imgur.com/SJYZm.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/SJYZm.png" alt="enter image description here" /></a></p>