(Regex)如何通过使用Python忽略特定div(p、span等)包含的HTML来检索其内容

2024-04-20 15:12:35 发布

您现在位置:Python中文网/ 问答频道 /正文

enter image description here

家人好

元素来选择要恢复的元素。 这里的目标是重现所有的内容,一个quelquonque灯塔都不知道它的代码HTML,其中包含

My regex is ((<p)([\s]+|([a-zA-Z=(\"|')_[\s]+|]+)([\s]+|)>)|<p>)([a-zA-Z ]+)< <ol class="arabic"> <li> <div class="first"> Start the notebook server from the <a class="reference internal" href="glossary"> <span class="xref std std-term">command line</span> </a> : yes very good </div> <div class="highlight-default notranslate"> The notebook open in your browse. <span>ok very good</span> <span class="n">ok nice</span> <span class="n">notebook</span> </div> </li> </ol>

Tags: theimagediv元素okliclassvery