Actually I want to scrape the " content " attribute from the below html code:
<meta name="description" content="Definition: What is a leadership performer?"/>
I want to scrape "Definition: What is a leadership performer?" from the above code but I do not know how to do that.
Can anyone guide me?
Here's my code, not working and I can't get what I stated above!
from bs4 import BeautifulSoup
import requests
import time
import pandas
r=requests.get('https://neculaifantanaru.com/en/definition-what-is-a-performer.html')
#print(r.text)
soup=BeautifulSoup(r.text, 'html.parser')
var2=soup.find_all('meta', attrs={'content':"Definition: What is a leadership performer?"})
for z in var2:
print(z.text.strip())