Hello. I need to copy the link from canonical html tag to the other tags below. I have many html files with these lines, so I must change in all the folder.
and
<link rel="canonical" href="https://website.com/en/dono.html" />
and
<div class="somers"><a href="https://website/amadonperrish.html" class="flags bg" hreflang="bg" title="bk"></a> <a href="https://website.com/test-lofet.html" class="flags sk" hreflang="sk" title="sk"></a> <a href="https://website.com/mercy.html" class="flags uk" hreflang="uk" title="uk"></a>The output should be
<div class="somers"><a href="https://website.com/en/dono.html" class="flags bg" hreflang="bg" title="bk"></a> <a href="https://website.com/en/dono.html" class="flags sk" hreflang="sk" title="sk"></a> <a href="https://website.com/en/dono.html" class="flags uk" hreflang="uk" title="uk"></a>Does anyone know a solution in Python for this problem?