<jupyter_start><jupyter_text>`get_text`returns text inside the parsed element<jupyter_code>print(el_2.get_text())<jupyter_output>This list item is also very special.<jupyter_text>get all the text<jupyter_code># by function
def getting_text(li_class):
    for el in li_class:
        print(el.get_text())
        
getting_text(li_class)
# by for-loop
for el in soup.select(".special"):
    print(el.get_text())<jupyter_output>This list item is special.
This list item is also very special.<jupyter_text>`name`returns name of the parsed element<jupyter_code>print(el.name)
# get all name
for el in soup.select(".special"):
    print(el.name)<jupyter_output>li
li<jupyter_text>`attrs` returns attributes of its class and id<jupyter_code>print(el_2.attrs)
for el in soup.select(".special"):
    print(el.attrs)<jupyter_output>{'class': ['special']}
{'class': ['special'], 'id': 'first'}
{'fraction_non_alphanumeric': 0.1326530612244898, 'fraction_numerical': 0.0022675736961451248, 'mean_word_length': 6.007936507936508, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '4', 'dir': 'jupyter-structured-clean-dedup', 'id': '338447', 'license': 'MIT', 'n_tokens_mistral': 317, 'n_tokens_neox': 313, 'n_words': 74, 'path': '2_python_Packages_Libraries/5_beautifulSoup/01_reviewNote_BS/03_get_text_name_attrs.ipynb', 'repo_name': 'lucaseo/TIL', 'size': '882'}