title: Get html tags and loop over them using bash
body: <p>I have this input file</p>
  <pre><code>&lt;article class=&quot;article column large-12 small-12 article--nyheter&quot;&gt;
      &lt;a class=&quot;article__link&quot; href=&quot;/nyheter/14341175/&quot;&gt;
          &lt;figure class=&quot;image image__responsive&quot; style=&quot;padding-bottom:42.075%;&quot;&gt;
  
              &lt;img class=&quot;image__img lazyload&quot; itemprop=&quot;image&quot; title=&quot;&quot; alt=&quot;&quot; /&gt;
  
  
          &lt;/figure&gt;
          &lt;div class=&quot;article__content&quot;&gt;
              &lt;h2 class=&quot;article__title t54 tm24&quot;&gt;Mann savnet etter &amp;Atilde;&amp;yen; ha blitt angrepet av to haier&lt;/h2&gt;
          &lt;/div&gt;
      &lt;/a&gt;
  
  &lt;/article&gt;
  &lt;article class=&quot;article column large-6 small-6 article--nyheter&quot;&gt;
      &lt;a class=&quot;article__link&quot; href=&quot;/nyheter/14315514/&quot;&gt;
          &lt;figure class=&quot;image image__responsive&quot; style=&quot;padding-bottom:42.075%;&quot;&gt;
  
              &lt;img class=&quot;image__img lazyload&quot; itemprop=&quot;image&quot; title=&quot;&quot; alt=&quot;&quot; /&gt;
                  
  
          &lt;/figure&gt;
          &lt;div class=&quot;article__content&quot;&gt;
              &lt;h2 class=&quot;article__title t34 tm24&quot;&gt;Flere blir 100 &amp;Atilde;&amp;yen;r &amp;acirc;&amp;#128;&amp;#147; Tordis (102) tror hun
                  vet noe av oppskriften&lt;/h2&gt;
          &lt;/div&gt;
      &lt;/a&gt;
  
  &lt;/article&gt;
  &lt;article class=&quot;article column large-6 small-6 article--nyheter&quot;&gt;
      &lt;a class=&quot;article__link&quot; href=&quot;/nyheter/14336393/&quot;&gt;
          &lt;figure class=&quot;image image__responsive&quot; style=&quot;padding-bottom:42.075%;&quot;&gt;
  
              &lt;img class=&quot;image__img lazyload&quot; itemprop=&quot;image&quot; title=&quot;&quot; alt=&quot;&quot; /&gt;
  
  
          &lt;/figure&gt;
          &lt;div class=&quot;article__content&quot;&gt;
              &lt;h2 class=&quot;article__title t34 tm24&quot;&gt;To menn i 30-&amp;Atilde;&amp;yen;rene tiltalt for grov voldtekt av mann tidlig
                  i 20-&amp;Atilde;&amp;yen;rene&lt;/h2&gt;
          &lt;/div&gt;
      &lt;/a&gt;
  
  &lt;/article&gt;
  </code></pre>
  <p>These are three article tags. I want to make three files from these three article tags having info from them. Example of the output would be</p>
  <p>news1.txt</p>
  <pre><code>http://example.no/news/123456789/af31/4928  // link (a tag)
  Franzens djevelsk gode forstadsfabel // name (h2 tag)
  http://imgs.example.no/pics/0291817572384234.jpg // image (img tag)
  2021-10-27 10:45 // date (when the file was created)
  </code></pre>
  <p>Can this be done in bash using sed, awk?</p>