from urllib.request import urlopen from bs4 import BeautifulSoup html = urlopen("https://www.google.com") soup = BeautifulSoup(html, 'html.parser') print(soup.find('title').text) # Check source for more details