BeautifulSoup: How to extract content?
<p>on the website that I'm trying to parse are tags like:</p>

<pre><code>&lt;a class="sku" href="http://pl.farnell.com/tdk/c3225x6s0j107m250ac/capacitor-mlcc-x6s-100uf-6-3v/dp/2526286" title="2526286"&gt;2526286&lt;/a&gt;
</code></pre>

<p>I would like to get a list of their content (here it is 2526286 value). How can I do that? I tried with</p>

<pre><code>for node in soup.find_all('a', {'class': 'sku'}):
print(node.content)
</code></pre>

<p>but it returns 'None' for each tag found.</p>

<p>You can use:</p>

<pre><code>for node in soup.find_all('a', {'class': 'sku'}):
    print(node.string)
</code></pre>

<p>As whole code:</p>

<pre><code>from bs4 import BeautifulSoup

string = """
&lt;div&gt;
    &lt;a class="sku" href="http://pl.farnell.com/tdk/c3225x6s0j107m250ac/capacitor-mlcc-x6s-100uf-6-3v/dp/2526286" title="2526286"&gt;2526286&lt;/a&gt;
&lt;/div&gt;
"""
soup = BeautifulSoup(string, "lxml")
for node in soup.find_all('a', {'class': 'sku'}):
    print(node.string)
</code></pre>

python css-selectors beautifulsoup html-parsing