Horje
Get text without inner tags text in selenium Code Example
Get text without inner tags text in selenium
data = '''<td height="21" class="xl7024240">Other Financial Services<font class="font711087"><sup>1</sup></font></td>'''

from bs4 import BeautifulSoup
import bs4

soup = BeautifulSoup(data, 'html.parser')

external_span = soup.find('td')

text = []
for x in external_span:
    if isinstance(x, bs4.element.NavigableString):
        text.append(x.strip())
print(" ".join(text))




Python

Related
python multiprocessing queu empty error Code Example python multiprocessing queu empty error Code Example
.lstrip() Code Example .lstrip() Code Example
import nifti to numpy Code Example import nifti to numpy Code Example
fetch data from excel in pYTHON Code Example fetch data from excel in pYTHON Code Example
pandas resample fill missing values Code Example pandas resample fill missing values Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
7