Script to find a series of words on a webpage and output if found

Problem is here:

 if (searchword in sourcetext):

'searchword' is not a single word but is a collection. when you try to use it like that (acting like it's a single word) only the first word will be searched.

So the solution here is to iterate over the 'searchword' and then search for the words inside it on the sourcetext.

Here's the last part of your code:

while True:
   
    browser.refresh()
    sourcetext=browser.page_source
    searchword= ["Mobile", "standalone", "desktop"]
    
    for word in searchword:
        if word in sourcetext:
    
            print("FOUND!" + word)
            now = datetime.now()
            current_time = now.strftime("%H:%M:%S")
            print("Current Time =", current_time)

        else:
            print("not found")
    sleep(5)

You can use intersection function by converting string to array.

This code print intersect words between searchword and sourcetext.

print( set(sourcetext.split()).intersection(searchword) )