title: How to insert new element after EVERY tag with class name?
body: <p>After every <code>&lt;div class=&quot;myclass&quot;&gt;&lt;/div&gt;</code> I want to insert <code>&lt;p&gt;abc&lt;/p&gt;</code>.</p>
  <p><strong>My code</strong></p>
  <pre><code>from bs4 import BeautifulSoup
  
  txt = '''
  &lt;div class=&quot;myclass&quot;&gt;
      &lt;p&gt;Some content.&lt;/p&gt;
  &lt;/div&gt;
  &lt;div class=&quot;myclass&quot;&gt;
      &lt;p&gt;Some other content.&lt;/p&gt;
  &lt;/div&gt;
  '''
  
  soup = BeautifulSoup(txt, 'html.parser')
  
  new_element = soup.new_tag('p')
  new_element.string = 'abc'
  
  for div in soup.find_all('div', 'myclass'):
      div.insert_after(new_element)
  
  print(soup)
  </code></pre>
  <p><strong>My output</strong></p>
  <pre><code>&lt;div class=&quot;myclass&quot;&gt;
  &lt;p&gt;Some content.&lt;/p&gt;
  &lt;/div&gt;
  &lt;div class=&quot;myclass&quot;&gt;
  &lt;p&gt;Some other content.&lt;/p&gt;
  &lt;/div&gt;&lt;p&gt;abc&lt;/p&gt;
  </code></pre>
  <p>My code only inserts the new element after the last appearance of <code>myclass</code>. What did I wrong?</p>