Python: Exclude tags from html data

Exclude tags with Beautifule Soup

text = '<br />Red<br />Ao<br />Green<br />yellow<br />'

import requests
from bs4 import BeautifulSoup

soup = BeautifulSoup(text,"html.parser")
soup_text = soup.get_text()

EXECUTION EXAMPLE

In [86]: soup_text
Out[86]: 'Aka Ao Midori Kiiro'

Recommended Posts

Python: Exclude tags from html data
Hit treasure data from Python Pandas
Get data from Quandl in Python
Receive textual data from mysql with python
[Note] Get data from PostgreSQL with Python
Use PostgreSQL data type (jsonb) from Python
Python: Reading JSON data from web API
[Python] Web application from 0! Hands-on (4) -Data molding-
Convert from Markdown to HTML in Python
Data analysis python
sql from python
MeCab from Python
[python] Read data
Get time series data from k-db.com in Python
Receive and display HTML form data in Python
[Python] How to read data from CIFAR-10 and CIFAR-100
[Python] Flow from web scraping to data analysis
Run a Python file from html using Django
Extract data from a web page with Python
Use thingsspeak from python
Data analysis with python 2
Touch MySQL from Python 3
Reading CSV data from DSX object storage Python code
Operate Filemaker from Python
Use fluentd from python
Extract data from S3
How to scrape image data from flickr with python
Python Data Visualization Libraries
Access bitcoind from python
Changes from Python 3.0 to Python 3.5
Changes from Python 2 to Python 3.0
Data analysis using Python 0
Receive dictionary data from a Python program in AppleScript
Data analysis overview python
Python from or import
Use MySQL from Python
Run python from excel
Install python from source
Get data from GPS module at 10Hz in Python
Execute command from Python
Data cleaning using Python
Operate neutron from Python!
Send data from Python to Processing via socket communication
Use MySQL from Python
Operate LXC from Python
Python data analysis template
Manipulate riak from python
Force Python from Fortran
Use BigQuery from python.
[Python tutorial] Data structure
[Python] Sorting Numpy data
Execute command from python
[Basics of data science] Collecting data from RSS with python
Data analysis with Python
Get data from database via ODBC with Python (Access)
[Python] Read From Stdin
Generate Word Cloud from case law data in python3
Use mecab-ipadic-neologd from python
Visualize plant activity from space using satellite data and Python
Notes on importing data from MySQL or CSV with Python
[Python] Extract text data from XML data of 10GB or more.