Beautifulsoup extracts html, Filter line feeds and spaces, but retains the tag content

use Beautifulsoup to parse html content, extract the body of a tag content, need line breaks and spaces in Filter, but to retain the html tag, how to solve

original content
clipboard.png

clipboard.png

keep the html tag, spaces and line breaks in Filter

Mar.28,2021

solved
use. Replace ('nasty,')


is there any sample content? the basic idea can be achieved by string-related operations such as replace or regular


upstairs positive solution, replace, or re


see the first floor

.
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e5941c-45511.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e5941c-45511.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?