I have below piece of html and need to extract only text from there between
<p>Current</p> and <p>Archive</p>
Html chunk looks like:
<p>Current</p>
<a href="some link to somewhere 1">File1</a>
<br>
<a href="some link to somewhere 2">File2</a>
<br>
<a href="some link to somewhere 3">File3</a>
<br>
<p>Archive</p>
<a href="Some another link to another file">Some another file</a>
so the desired output should looks like File1, File2, File3.
This is what I've tried so far
import re
m = re.compile('<p>Current</p>(.*?)<p>Archive</p>').search(text)
but doesn't work as expected.
Is there any simple solution how to extract text between specified chunks of html tags in python?