In Python 3, how would you go about taking the string between header tags, for example, printing Hello, world!
, out of <h1>Hello, world!</h1>
:
import urllib
from urllib.request import urlopen
#example URL that includes an <h> tag: http://www.hobo-web.co.uk/headers/
userAddress = input("Enter a website URL: ")
webPage = urllib.request.urlopen(userAddress)
list = []
while webPage != "":
webPage.read()
list.append()