title: is there a method to detect common form in html code?
body: <p>I have a lot of html pages that are formatted differently but the content that interests me is the same , for example :</p>
  <p>Page_1.html :</p>
  <pre><code>&lt;div class = &quot;block_person&quot;&gt;
       &lt;div class=&quot;persons&quot;&gt;&lt;span&gt;Jules Rodrigez&lt;/span&gt;&lt;/div&gt;
       &lt;div class=&quot;contents&quot;&gt;&lt;h1&gt;Jules Rodrigez is a programmer specialized in machine learning&lt;/h1&gt;&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class = &quot;block_person&quot;&gt;
       &lt;div class=&quot;persons&quot;&gt;&lt;span&gt;James Alfonso&lt;/span&gt;&lt;/div&gt;
       &lt;div class=&quot;contents&quot;&gt;&lt;h1&gt;James  is a singer&lt;/h1&gt;&lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  <p>page_2.html :</p>
  <pre><code>&lt;div class=&quot;many_speakers&quot; &gt;
     &lt;div class=&quot;speakers&quot;&gt;&lt;h1&gt;Jules Rodrigez&lt;/h1&gt;&lt;/div&gt;
     &lt;div class=&quot;summary&quot;&gt;&lt;span&gt;Jules Rodrigez is a programmer specialized in data science&lt;/span&gt;&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class=&quot;many_speakers&quot; &gt;
     &lt;div class=&quot;speakers&quot;&gt;&lt;h1&gt;Peka Yaya&lt;/h1&gt;&lt;/div&gt;
     &lt;div class=&quot;summary&quot;&gt;&lt;span&gt;Peka is a professor&lt;/span&gt;&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class=&quot;many_speakers&quot; &gt;
     &lt;div class=&quot;speakers&quot;&gt;&lt;h1&gt;Cristiano dimaria&lt;/h1&gt;&lt;/div&gt;
     &lt;div class=&quot;summary&quot;&gt;&lt;span&gt;Cristiano is a football player&lt;/span&gt;&lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  <p>from a page html (page_1 or page_2), i want to get a list of objects like :</p>
  <p>from page_1.html</p>
  <pre><code>[{&quot;person&quot;:&quot;Jules Rodrigez&quot;,&quot;content&quot;:&quot;Jules Rodrigez is a programmer specialized in machine learning&quot;},{&quot;person&quot;:&quot;James Alfonso&quot;,&quot;content&quot;:&quot;James  is a singer&quot;}]
  </code></pre>
  <p>the problem is that each page is formatted with an structure : how can we detect in an html page that a block is repeated several times and therefore it contains the requested information : for example in the page_1.html the bloc which is repeated several times is :</p>
  <pre><code>&lt;div class = &quot;block_person&quot;&gt;
       &lt;div class=&quot;persons&quot;&gt;&lt;span&gt;Jules Rodrigez&lt;/span&gt;&lt;/div&gt;
       &lt;div class=&quot;contents&quot;&gt;&lt;h1&gt;Jules Rodrigez is a programmer specialized in machine learning&lt;/h1&gt;&lt;/div&gt;
  &lt;/div&gt;
  </code></pre>