Python – remove hyperlink from html

from bs4 import BeautifulSoup
soup = BeautifulSoup(html)
for m in soup.find_all('a'):
    m.replaceWithChildren()
print soup

 

发表评论

电子邮件地址不会被公开。 必填项已用*标注

How to Install JAVA 8 on Ubuntu 18.04/16.04, Linux Mint 19/18
Previous post
MySQL避免全表查询的方法
Next post