At least a couple of options, the first using BeautifulSoup:
import urllib
import BeautifulSoup
soup = BeautifulSoup.BeautifulSoup(urllib.urlopen("https://www.google.com"))
print soup.title.string
And the second one using lxml:
import lxml.html
t = lxml.html.parse(url)
print t.find(".//title").text
Related:
- Reddit developers, please fix this I previously mentioned how dumb it was for someone to...
- Double click/tap detection on android’s MapView If there is a cleaner way to do it, please...






Popular