Archive

Posts Tagged ‘title’

get the title of a web page

September 8, 2015 Leave a comment

Problem
You need the title of a web page.

Solution

from bs4 import BeautifulSoup

soup = BeautifulSoup(html)
print soup.title.string

I found the solution here.

Categories: python Tags: , , ,