import re
import requests
# a function to clean all HTML tags and attributes (def Clean_HTML(raw_html))
# returns clean_text
site_URL = input("\n Enter a site URL:")
request_site= requests.get(site_URL)
raw_html = request_site.text
text = Clean_HTML(raw_html)
LIST = [""]
x = input("\n enter the number of words to search for:")
for i in range(int(x)):
LIST.append(input("\n input a word please:")
for item in LIST:
match = re.search(r"("item")",clean_text)
print (match)
Мне нужен способ напечатать целое предложение, в котором найдено совпадение, и, если возможно, весь абзац.