from bs4 import BeautifulSoup
soup = BeautifulSoup('<script>a</script>baba<script>b</script>', 'html.parser')
for s in soup.select('script'):
s.extract()
print(soup)
baba
More Related Contents:
- How to find elements by class
- Beautiful Soup findAll doesn’t find them all
- BeautifulSoup findAll() given multiple classes?
- How can I get href links from HTML using Python?
- BeautifulSoup webscraping find_all( ): finding exact match
- How to load all entries in an infinite scroll at once to parse the HTML in python
- How to find children of nodes using BeautifulSoup
- BeautifulSoup innerhtml?
- Understand the Find() function in Beautiful Soup
- Convert a HTML Table to JSON
- python beautifulsoup iframe document html extract
- BeautifulSoup: extract text from anchor tag
- How to find all comments with Beautiful Soup
- How to find tag with particular text with Beautiful Soup?
- How find specific data attribute from html tag in BeautifulSoup4?
- Exclude unwanted tag on Beautifulsoup Python
- How to install beautiful soup 4 with python 2.7 on windows
- How to find the comment tag with BeautifulSoup?
- BeautifulSoup return unexpected extra spaces
- BeautifulSoup: get css classes from html
- How to get inner text value of an HTML tag with BeautifulSoup bs4?
- How to scrape dynamic webpages by Python
- Using Find_All function returns an unexpected result set
- BeautifulSoup Grab Visible Webpage Text
- BeautifulSoup: just get inside of a tag, no matter how many enclosing tags there are
- ImportError: No module named BeautifulSoup
- How can I get all the plain text from a website with Scrapy?
- beautiful soup just get the value inside the tag
- HTML to IMAGE using Python
- Missing parts on Beautiful Soup results