Webscraper in Python - How do I extract exact text I need?
<p>Good day</p>

<p>I am trying to write my first webscraper. I have managed to write the following:</p>

<pre><code>import requests
from bs4 import BeautifulSoup

s = requests.Session()

r = s.get("http://www.sharenet.co.za/v3/quickshare.php?scode=BTI")

r = s.post("http://www.sharenet.co.za/v3/quickshare.php?scode=BTI")

soup = BeautifulSoup(r.text, "html.parser")
print(soup.find_all("td", class_="dataCell"))
</code></pre>

<p>I am trying to extract a share price. When Inspect the element this is the HTML code:</p>

<pre><code>&lt;td class="dataCell" align="right"&gt;85221&lt;/td&gt;
</code></pre>

<p><a href="http://i.stack.imgur.com/Vi8e1.png" rel="nofollow">Image of share price table</a></p>

<p>Basically, my issue is that can search for all the tags but can't extract the exact tag I want.</p>

<p>Thanks in advance for any help.</p>

<p>Tags have a <code>get_text()</code> method. <code>find_all</code> returns a list of tags.</p>

<pre><code>for cell_tag in soup.find_all("td"):
    print(cell_tag.get_text())
</code></pre>

python beautifulsoup