delete an HTML tag while keeping its content

Stefan Behnel stefan_ml at behnel.de
Sun Sep 7 01:56:17 EDT 2008


[fixing the subject appropriately]

Jackie Wang wrote:
> How should I delete the 'font' tags while keeping the content inside?

Amongst many other goodies for working with HTML, the Elements in lxml.html
have a ".drop_tag()" method specifically for that purpose.

http://codespeak.net/lxml/

Stefan



More information about the Python-list mailing list