0
如何獲取html標記與美麗的內容?例如<title>
標籤的內容?python beautifulsoup獲取html標記內容
我想:
from bs4 import BeautifulSoup
url ='http://www.websiteaddress.com'
soup = BeautifulSoup(url)
result = soup.findAll('title')
for each in result:
print(each.get_text())
但是什麼都沒有發生。我正在使用python3。
謝謝你有幫助:) – niloofar
@niloofar很高興能幫到你! –