Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

retrieve content inside the meta tag python

soup = BeautifulSoup(webpage)
for tag in soup.find_all("meta"):
    if tag.get("property", None) == "og:title":
        print tag.get("content", None)
    elif tag.get("property", None) == "og:url":
        print tag.get("content", None)
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #retrieve #content #meta #tag #python
ADD COMMENT
Topic
Name
6+2 =