All pastes #2048529 Raw Edit

Someone

public text v1 · immutable
#2048529 ·published 2011-04-20 04:45 UTC
rendered paste body
# By Brian Gross #
# Co editor Liz Henry #
# 4/19/11 #
url = raw_input('Please enter a website url: ')
x = raw_input('Please enter a search word: ')
import urllib
var_html = urllib.urlopen(url).read()
if x in var_html:
	print x,'was found in the webpage'
	y = list.count(str(x))
	print 'The word,',x,'was found',y,'times.'
if x not in var_html:
	print 'Sorry, the string',x,'was not found in the website contents.'
answer = raw_input('Would you like to see the source code of that webpage? ')
if answer=="yes" or answer=="y" or answer=="sure" or answer=="okay":
	print var_html
if answer=="no" or answer=="n":
	exit()
else:
	print 'Sorry, that command was not recognized.'
exit()
# http://en.wikibooks.org/wiki/Python_Programming/Internet #