Python Forum

Full Version: Beautifulsoap can't get page title
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I can't get the tilte of the following page
here is my code:
from bs4 import BeautifulSoup
import urllib.request
page3 = urllib.request.urlopen("").read()
soup3 = BeautifulSoup(page3, "lxml")
print (titulo[0]['content'])

Any help with this issue?
Thank you
from bs4 import BeautifulSoup
import requests

url = ''
url_get = requests.get(url)
soup = BeautifulSoup(url_get.content, 'lxml')
Balenciaga loja online perfumes, os seus perfumes mais baratos
So use Requests and not urllib,some more info in tutorial here.
Thank you. Problem solved