# program to access a web page, and search for
# a string on the web page
import sys, urllib.request
# now open connection to the URL:
resp = urllib.request.urlopen(sys.argv[1])
#resp.read() will be a (huge!) string 
#with the full (HTML) of the web page
#Since it is a string we can use find() method
#if resp.read().find(sys.argv[2].encode()) > 0:
#or, we can use an if statement.
#in any case sys.argv[] has to be converted
#from string to BYTE object 
if sys.argv[2].encode() in resp.read():
	print('found')
else:
	print('not found')
