I want to check to see if a website have at least 1 of multiple words. I can only find one word. When I try to add multiple words, I get error.
import requests
url = 'https://www.python.org/'
r = requests.get(url)
html_content = r.text
list = "Calculations" # This works
# list = ("Calculations", "simple") # this would fail
if list in html_content:
print("word exist")
thanks to everybody that helps.
Aucun commentaire:
Enregistrer un commentaire