Answer the question
In order to leave comments, you need to log in
How to get content tag from using bs4 python?
There is this snippet of html code:
<meta property="og:description" content="Студенческая ул., 187, Энгельс, Саратовская область" />
Answer the question
In order to leave comments, you need to log in
>>> from bs4 import BeautifulSoup
>>> html_chunk = '<meta property="og:description" content="Студенческая ул., 187, Энгельс, Саратовская область" />'
>>> soup = BeautifulSoup(html_chunk)
>>> desc = soup.find("meta", property="og:description")
>>> desc.get("content")
'Студенческая ул., 187, Энгельс, Саратовская область'
>>>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question