Answers for "beutiful soup all tags"

0

beutiful soup all tags

head_tag = soup.head
head_tag
# <head><title>The Dormouse's story</title></head>

head_tag.contents
# [<title>The Dormouse's story</title>]

title_tag = head_tag.contents[0]
title_tag
# <title>The Dormouse's story</title>
title_tag.contents
# ['The Dormouse's story']
Posted by: Guest on June-16-2021

Browse Popular Code Answers by Language