Menu

[Solved]-Python Program Add 3 Websites Print Title Site Import Urllibrequest Bs4 Import Beautifulso Q37301060

Python Program

How can I add 3 more websites on it and print the title of eachsite?

import urllib.request
from bs4 import BeautifulSoup

def main():

url = ‘https://www.columbia.edu/’

myurl = urllib.request.urlopen(url)

soup = BeautifulSoup(myurl, ‘lxml’)

columbia = soup.find(‘h1′, class_ =’sr-only’).text
print(columbia)

main()

Expert Answer


Answer to Python Program How can I add 3 more websites on it and print the title of each site? import urllib.request from bs4 impo… . . .

OR


Leave a Reply

Your email address will not be published. Required fields are marked *