Answers for "get page title by python bs4"

0

get page title by python bs4

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
Posted by: Guest on July-19-2021

Python Answers by Framework

Browse Popular Code Answers by Language