title: How can I get the next child in BeautifulSoup
body: <p>This is the HTML and code I have:</p>
  <pre><code>&lt;a class=&quot;card__article-link&quot; href=&quot;linktoarticle&quot; title=&quot;articletitle&quot;&gt;
  &lt;span class=&quot;card__egida&quot;&gt;TEXT&lt;/span&gt;
  &lt;span class=&quot;card__title &quot;&gt;TITLE&lt;/span&gt;
  &lt;span class=&quot;card__subtitle&quot;&gt;SUBTITLE&lt;/span&gt;
  &lt;/a&gt;
  </code></pre>
  <hr />
  <pre><code>import requests
  from bs4 import BeautifulSoup
  r = requests.get(&quot;link&quot;).text
  soup = BeautifulSoup(r, &quot;html.parser&quot;)
  
  for span in soup.find_all(&quot;span&quot;, {&quot;class&quot;: &quot;card__egida&quot;}):
      print(span.get_text())
  </code></pre>
  <p>The code correctly prints TEXT but I want the code to also print TITLE and SUBTITLE. I have tried with nextSibling but with no success.
  How can I do that?</p>